It is currently Thu Dec 14, 2017 8:56 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Mar 11, 2008 2:42 am 
Offline

Joined: Thu Jan 12, 2006 2:11 am
Posts: 27
I recently decided to release this loader. It should have been done a long time ago but.... Well, I'm lazy :) In short, it's a 1541 compatible loader and there's a VIC20 and C64 version available. It's fast and compatible and very easy to use. Especially the VIC20 version might be of interest because it's the only "proper" loader for VIC that exists. These are the loaders that have been used in almost all of the Dekadence productions.

You can leech it from the new tools page at dekadence64.org:

http://www.dekadence64.org/prodstools.html


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 11, 2008 4:41 am 
Offline
User avatar

Joined: Sun Jun 03, 2007 6:43 am
Posts: 130
Location: Rethan Manor, Balmora, Hlaalu District
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?

_________________
Commodore 128 Programmer
City of Kouvola, Finland

http://mydarkgothvampiricplace.endofthe ... Commodore/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 11, 2008 2:56 pm 
Offline

Joined: Thu Jan 12, 2006 2:11 am
Posts: 27
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...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 11, 2008 3:31 pm 
Offline
User avatar

Joined: Sun Jun 03, 2007 6:43 am
Posts: 130
Location: Rethan Manor, Balmora, Hlaalu District
Yeah, it's cool. :) I tested and it actually loaded my file. Of course, it would not be that difficult to just write the known values to AE/AF, when used to load a particular program.

_________________
Commodore 128 Programmer
City of Kouvola, Finland

http://mydarkgothvampiricplace.endofthe ... Commodore/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 12, 2008 12:54 am 
Offline

Joined: Thu Jan 12, 2006 2:11 am
Posts: 27
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 12, 2008 8:14 pm 
Offline
User avatar

Joined: Sun Jun 03, 2007 6:43 am
Posts: 130
Location: Rethan Manor, Balmora, Hlaalu District
Cool. Thanks, dude! :D Yes. KERNAL stores last address loaded + 1 in VARTAB (45-46) and EAL (174-175). The information in the progrefguide is wrong, btw, as it says "the last RAM location loaded". :)

_________________
Commodore 128 Programmer
City of Kouvola, Finland

http://mydarkgothvampiricplace.endofthe ... Commodore/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 13, 2008 12:11 am 
Offline

Joined: Thu Jan 12, 2006 10:10 am
Posts: 177
FMan wrote:
KERNAL stores last address loaded + 1 in VARTAB (45-46)

No, it doesn't. BASIC does.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 13, 2008 1:44 pm 
Offline
User avatar

Joined: Sun Jun 03, 2007 6:43 am
Posts: 130
Location: Rethan Manor, Balmora, Hlaalu District
Right, of course. :) Minor slip. Tanx for correcting. :wink:

_________________
Commodore 128 Programmer
City of Kouvola, Finland

http://mydarkgothvampiricplace.endofthe ... Commodore/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group