08 May 2024, 16:53 | #21 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,110
|
You made something wrong.
Every Amiga library has own LVOs. Errors 23 showed in your post are LVOs from exec library, not from graphics library. |
08 May 2024, 21:29 | #22 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
More information
I have like this the code:
HTML Code:
PROGNAME = ZenerDrive HDBASE = C:/whdloadde WHDBASE = $(HDBASE)/WHDLoad WHDLOADER = $(PROGNAME).slave SOURCE = $(PROGNAME).s CONFIG= C:/whdloadde/testswhdload.uae #CONFIG=whdload-test-jit.uae all : $(WHDLOADER) $(WHDLOADER) : $(SOURCE) Makefile date > datetime "C:/whdloadde/vasmm68k_mot.exe" -pic -x -DDATETIME -I$(HDBASE)/includes/NDK_3.9/Include/include_i -I$(WHDBASE)/Include -I$(HDBASE)/includes -I$(WHDBASE) -I$(WHDBASE)/Src/sources -nosym -Fhunkexe -o $(WHDLOADER) $(SOURCE) test: $(WHDLOADER) cp $(WHDLOADER) .. cmd /c start “C:/Program Files (x86)/Cloanto/Amiga Forever/WinUAE/WinUAE64.exe” -config=$(CONFIG) -G INCLUDE lvo/dos.i INCLUDE lvo/exec.i INCLUDE lvo/graphics.i The dos.i and exec.i I could find find from other places but these are the versions: exec.i: HTML Code:
** ** $VER: exec.i 39.0 (15.10.1991) ** Includes Release 45.1 ** ** Include all other Exec include files in non-overlapping order. ** ** (C) Copyright 1985-2001 Amiga, Inc. ** All Rights Reserved ** HTML Code:
** $VER: dos.i 36.27 (5.4.1992) ** Includes Release 45.1 ** ** Standard asm header for AmigaDOS ** ** (C) Copyright 1985-2001 Amiga, Inc. ** All Rights Reserved ** HTML Code:
* Automatically generated header (sfdc 1.11)! Do not edit! IFND LVO_GRAPHICS_LIB_I LVO_GRAPHICS_LIB_I SET 1 _LVOBltBitMap EQU -30 _LVOBltTemplate EQU -36 _LVOClearEOL EQU -42 I don’t think is something apparently as the ‘make’ runs very good in the cygwin. Is there a way to have that 3 lvo libraries to be sure everything is fine? INCLUDE lvo/dos.i INCLUDE lvo/exec.i INCLUDE lvo/graphics.i As I said graphics.i with such name is impossible find and rename the other one it doesn’t looks normal or with a header. What can be done here? |
08 May 2024, 22:27 | #23 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,429
|
graphics.i is missing the "ENDC" directive (unless you truncated the paste). Use my files from the zone!
|
08 May 2024, 22:33 | #24 | |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
Quote:
Just one thing I detected the cygwin previous to the library errors I just changed as you see in the script from the \ to / and worked very good. One thing just to know I saw there these libraries request: incdir gore:asm/include/ include goredesign.i Where are included that ones? |
|
08 May 2024, 22:53 | #25 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,429
|
Those are specific includes from a now retired whdload coder.
I have source for most released whdload slaves but I don't even have those. They possibly define stuff or macros that can be replaced. Try not including goredesign.i see what happens. At worst, I have a whdload resourcer tool which can rebuild/partially reverse slaves where source was lost. Starting from binary .slave, the contents of the missing file can be figured out. This cannot happen with my slaves: https://github.com/jotd666/whdload_slaves |
09 May 2024, 01:42 | #26 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
I see. All is working perfect. It’s amazing remember the Assembly in Amiga. I used to do in Action Replay cartridge but now with this vasm and the WHDLoad is a boom!
|
09 May 2024, 03:24 | #27 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
Another thing. I’m trying to load the boot sector track 0 from DF0: to have a executable file of that boot sector. How is used? I’m using the InstallBB from WHDLoad developer that is located inside the compressed file WHDLoad/C directory.
I tried to read: InstallBB boot UNIT/0/0 To Write InstallBB boot UNIT/0/0 WRITE/S Both cases there is error how you enter the command? I’m running inside Amiga OS of course. |
09 May 2024, 22:24 | #28 | ||||
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 879
|
Quote:
Quote:
Or use these: https://whdload.de/whdload/lvo.lha Quote:
Quote:
Code:
installbb boot Code:
installbb boot write |
||||
10 May 2024, 02:36 | #29 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
Oh @Wepl wonderful about the pragma. I will try in a free time. Now I see is very interesting the deep it is to program assembly language from PC just like that and that runs in Amiga amazing. If we had that tools in that times we would be something as extraterrestrials.
The issue of the boot sector. That boot sector really is executable in AMIGA OS? I mention because I have some of my releases that I protected in the old times on some of my releases, for example in the boot sector I entered routines that are needed to preserve and if are removed some detection of characters in screen, instructions, checksums, etc. it will not properly continue executing in the workbench other things, if they are not present there is a crash. Then it has several years I developed that and I’m trying to remember what I did but in my figuration would be good have the boot sector running as an executable in the first place to run then continue with other routines in the Workbench from the other executables, I just need that boot sector files execute before the other files and like I have instructions there in the boot sector to continue with the mouse, etc. there is not a problem to put before the other executables but it’s important I run the boot block because of that. |
10 May 2024, 10:40 | #30 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,429
|
no, amigados bootblock is not executable. IIRC the boot checksum must be correct for it to make bootable (install does that). Just emulate that with kickemu and DISKSONBOOT, and use the _bootblock callback, make sure it returns 0 (not sure of that) so it keeps on booting.
in the _bootblock call you can set the variables you want then give back control to the virtual OS to boot your disk. |
11 May 2024, 05:30 | #31 | |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
Quote:
|
|
12 May 2024, 01:30 | #32 | ||
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,291
|
Quote:
Quote:
IMO you want to be mostly thinking about what *needs* to be patched, and go from there, and only later think about improvements. If you have a disk with a custom boot block that does stuff, later loads startup-sequence and continues normally, just try to use the generic kick13 slave and see where it falls over (i.e. first let everything play out). Then analyze and think about what steps need to be take to make it work. If the boot block does something that's incompatible with whdload (like directly reading from the disk or modifying interrupts via VBR) it needs to be patched, but if it's doing more benign stuff, you may be able to leave it alone. All of the conditional assembly in the generic kick slaves are just there to give you hooks into the loading process so you can patch problematic parts (or insert later hooks). You want to (initially) strive to patch as little as possible. |
||
13 May 2024, 06:44 | #33 |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
@paraj and @jotd Very good information. Yes I think I have an idea now how it works. It’s a passion the Amiga OS. It Amazes me that the assembly language despite the years still strong. I use a little Assembly Language in PC and yes there are things but the Amiga OS it was really strong. I never understood the bankruptcy but thing happen. I will study more other codes and to apply the boot clocks as I see also WHDLoad is such strong that has some strong features that by itself can fix a lot of things.
Now I have some simple maybe fool questions. I’m crafting some routines to test and they are running fine and is just wan to know if in WHDLoad exists: 1.-For example. Put a breakpoint or make a stop where I mark ‘I want break point here’. The code is fictitious but is just to illustrate, is not specific of a Game or something is just to understand how to enter this and track values. PLINTRO PL_START PL_PS $ffff,SetStack PL_PSS $fffff,xxxx,1 I want break point here PL_B $ffff,$ff PL_SA $ffff,$ffff PL_PSS $ffff, PL_END I tried to do enter in that line loop: jmp loop or: loop: jmp loop And the errors to compile are undefined. 2.-Is there a way to print D0 or any register in the screen in the AMIGA OS? I just want to know. I don’t;t have any troubles with this because I can use a cartridge and see the registers at that moment or memory. But if there is something to send the variable, sometimes you see the CLI loading and other windows and maybe print there. 3.-I heard there is a debug option in the slaves codes, how you activate it? And is there a list of features you can make, as for example, breakpoints, see registers, etc.? |
13 May 2024, 08:33 | #34 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,429
|
1. I never used breakpoints, I usually used "blitz" macro, then I break with debugger. With WinUAE you can call some code to call winuae debugger (some fake address in $FF0062)
"And the errors to compile are undefined.": huh? can you be maybe clearer? 2. No. What I usually do is to put a memory watchpoint on, say $100 (rarely used) and write the value of D0 there. WinUAE can print things in the WinUAE debugger console, but I never got that to work. 3. you mean "DEBUG" macro in kickemu. It enables more checks on kickstart, specially amigaDOS part. For instance if an assign can't be performed, the slave breaks. Kind of "assert". |
13 May 2024, 17:47 | #35 | |
Registered User
Join Date: Feb 2019
Location: USA/Texas
Posts: 81
|
Quote:
Now for example I think my last question. I see in patches some examples this for example: lea (_pl,pc),a0 ;patch list lea ($10000),a1 ;destination move.l (_resload,pc),a2 jsr (resload_Patch,a2) Using the previous destination and guessing this fictional patches: PL_B $3500,$44 PL_S $696,8 PL_SA $696,$705 Exactly: 1.-PL_B - In what exact memory position writes the value of $44? 2.-PL_S - Skip 8 bytes from what exact memory position? 3.-PL_SA - What it does exactly this? It stores the skipped position from pot 2 ‘PL_S’ or what it does and if writes something in what exact memory position. |
|
13 May 2024, 18:28 | #36 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,291
|
In addition to what jotd mentioned, I will often also add a "tst.b $100.w" and then break in WinUAE when address $100 is read, but that's really only necessary inside slave, as you can just break on the real address inside the game. Now for the latter part it can be an issue for games that use EXPMEM - i.e. it will be different between configurations, and you can't correlate it with classic 512k+512k setup. That's why it's often useful to have a "CHIPONLY" configuration that uses only chipmem, that way you can be sure the addresses in the game are fixed, and with a little bit of tweaking match it with a true 1MB chip setup.
Sometimes I also find it useful to log stuff to a file with resload_Log (add FILELOG LogBuffer=100000 on the command line). Especially when I need to check it on real HW. http://www.whdload.de/demos/TBL_Eon.lha has an example of doing that (PRINTF macro) as well as the WinUAE control stuff JOTD mentioned. For your questions: The address are relative to the start of the destination when using resload_Patch, so PL_B $3500,$44 changes the byte at $13500 to $44. PL_S $696,8 skips to $1069e PL_SA isn't standard, but a common macro, it's "skip absolute" so would skip to $10705 here. Note that when you use resload_PatchSeg the destination address are in "IRA" (the disassembler) format, which is very convenient. |
13 May 2024, 22:26 | #37 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 879
|
If you want to enter a monitor at a specific address of the code you patch via resload_Patch/Seg you also have these two commands:
PL_BKPT off lets WHDload write an ILLEGAL ($4afc) to destination+offset and saving the original contents, when the ILLEGAL is executed the original contents is restored, a NMI stackframe is created and the detected freezer called, if there is no freezer nothing will be done, the VBR should be moved by WHDLoad to allow catching the illegal instruction exception (breakpoint) PL_BELL off,tim similar to PL_BKPT but instead of entering a freezer a color cycle will be shown for the given time or LMB pressed, time is given in 1/10s (ring the bell) (https://whdload.de/docs/autodoc.html#resload_Patch) PL_BKPT will enter the monitor when PC reaches the address you specified. This requires a monitor detected by WHDLoad (eg. hrtmon). With PL_BELL you a get a color cycle and can for example enter the WinUAE debugger at this point. Logging can be done via resload_Log or winuaelog. You need to inject the code for this somehow. E.g. by patching the program. For resload_Log there is also a LOG macro in whdmacros.i which can be used to log from your slave code. It all depends a bit on if you are working with WinUAE or real hw. |
14 May 2024, 00:28 | #38 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,429
|
When i debug kickemu games, I often use CHIPONLY with a properly calibrated AllocMem before loading the segments, so the first segment (if we're lucky there aren't a lot of different segments) is loaded in $20000 and it matches IRA offsets. Much easier to follow the code.
Without calibrated AllocMem, exe usually loads around $1Dxxx something, so not as convenient. |
14 May 2024, 12:01 | #39 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 879
|
For kickemu stuff I like to recommend setting SEGTRACKER in the Slave source.
WHDLoad will then report on all exceptions the name of the binary together with the (relocated) offset. The offset is then the same as when loaded into ReSource or disassembled with IRA. Using resload_PatchSeg you can set breakpoints (PLBKPT) or asserts (PL_I). |
15 May 2024, 00:02 | #40 |
Registered User
Join Date: Jul 2009
Location: Lala Land
Posts: 608
|
Is there a resource that will let one get set up in using whdload for patches avoiding the problems above? There was some thought expressed to creating an hdf for instance to streamline the process, but that was dismissed due to it requiring on device assembly using barfly.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ASM: Asm-ONE or AsmPro - how to set a Hello amiga coders, I hope it is ok to hijack ? | Fireball | Coders. Asm / Hardware | 8 | 31 May 2024 10:22 |
Tool to convert asm to gnu asm (gas) | Asman | Coders. Asm / Hardware | 13 | 30 December 2020 11:57 |
Help with compile | JimDrew | Coders. Language | 23 | 30 October 2014 22:42 |
Trying to compile some ASM in StormC V4 | NovaCoder | Coders. General | 2 | 29 September 2009 01:44 |
WHDload ASM Slave | Retro1234 | Coders. General | 21 | 27 October 2008 13:20 |
|
|