| retrohackers.org http://retrohackers.org/ |
|
| Loader for VIC20 and C64 released http://retrohackers.org/viewtopic.php?f=14&t=360 |
Page 1 of 1 |
| Author: | SounDemoN [ Tue Mar 11, 2008 1:42 am ] |
| Post subject: | Loader for VIC20 and C64 released |
I recently decided to release this loader. It should have been done a long time ago but.... Well, I'm lazy You can leech it from the new tools page at dekadence64.org: http://www.dekadence64.org/prodstools.html |
|
| Author: | FMan [ Tue Mar 11, 2008 3:41 am ] |
| Post subject: | |
Loads ok, but does it return the last address loaded? Without it depacker fails so this loader cannot be used. Teh installer seems to load to $4000, so why not use that in the example instead of $2000? |
|
| Author: | SounDemoN [ Tue Mar 11, 2008 1:56 pm ] |
| Post subject: | |
FMan wrote: Loads ok, but does it return the last address loaded? Without it depacker fails so this loader cannot be used. Teh installer seems to load to $4000, so why not use that in the example instead of $2000?
It doesn't return the address, but I guess it could easily be checked by reading directly from the loader code: ldx loader+something ldy loader+something_else x and y now contain the last address loaded. I can check later what the something and something_else values should be. In the example I just wanted to demonstrate that the init routine can go anywhere and it will still work... |
|
| Author: | FMan [ Tue Mar 11, 2008 2:31 pm ] |
| Post subject: | |
Yeah, it's cool. |
|
| Author: | SounDemoN [ Tue Mar 11, 2008 11:54 pm ] |
| Post subject: | |
SounDemoN wrote: FMan wrote: Loads ok, but does it return the last address loaded? Without it depacker fails so this loader cannot be used. Teh installer seems to load to $4000, so why not use that in the example instead of $2000? It doesn't return the address, but I guess it could easily be checked by reading directly from the loader code: ldx loader+something ldy loader+something_else And the magic numbers are: $a8 and $a9 So if the loader goes to $0100: lda #$01 ; load file ldx #<$0801 ldy #>$0801 jsr $0100 ldx $01a8 ; read last address to x and y ldy $01a9 Now you can initialize whatever ZP values the packer needs... Notice that the value is the address of the last byte written+1. I'm guessing the kernal does the same thing. |
|
| Author: | FMan [ Wed Mar 12, 2008 7:14 pm ] |
| Post subject: | |
Cool. Thanks, dude! |
|
| Author: | tnt/beyond force [ Wed Mar 12, 2008 11:11 pm ] |
| Post subject: | |
FMan wrote: KERNAL stores last address loaded + 1 in VARTAB (45-46)
No, it doesn't. BASIC does. |
|
| Author: | FMan [ Thu Mar 13, 2008 12:44 pm ] |
| Post subject: | |
Right, of course. |
|
| Page 1 of 1 | All times are UTC [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|