Goals are to find a fastloader where:
1: Works with SD2IEC/SD Cards
2: Works with "fb", the SD2IEC File Browser V1.0
3: Smallest in size
4: Can be merged or be part of an "batch" operation.
I searched long and hard through my gadzillion of D64 and C64 files by using my excellent SOTDS Database system and ended up on a no-name fastloader for 1541 called "disc turbo" from the "c64disks.hvilket.net\frank_gasking\disks\disk0012.d64". Details: "disc turbo", checksum: 3d933bad5b2b8657d649091c2cd636f8, filesize: 1213 bytes.
Secondary goal was to:
1: Make it run before the "fb" file browser automatically without touching the keyboard.
So, I managed to dig around the internet for code that could either load a file via assembly or copy bytes from memory to certain positions of the C64 memory to make sure they behave as if they where loaded by regular LOAD "",8,1 + RUN or SYS.
This had to be done, since the "disc turbo" and "fb" loads themselves into more or less the same location in memory making it hard to just load them with some basic code and serious crashes would occur or stuff wont simply work.
As you already know it isn't always easy to chain-load of the C64 and yet even if there are suitable linkers and packers (which useally contain too much other junk or parameters you have no clue what to do jack shit with), I wanted to do it as simple as possible using my own ways and ideas, which others can also benefit from, including any future projects that I could potentionally cook up.
Basically I managed to cook up a very nice routine that:
1: Autostarts
2: Assembled prg file contains both the "disc turbo" and my own little loader.
3: Copy memory so that we can SYS to "disc turbo" and ready for next commmand.
3: Then SYS to my own loader.
4: Which then loads the actual "fb" browser.
All you have to do is basically type LOAD "ffb",8,1 and the rest goes automatic with fastloader enabled, loading "fb" and present the directory view at once. See video proof below :-)
The video loads the game "sorcery.prg":
Normal loading time of "sorcery" (the game) took: 51 seconds
With fastloader: Just around 3-4 seconds!
Sorcery is 105 blocks (26460 bytes).
Play Video: Stone Oakvalley Fastload File Browser (SOFFB) Video proof
I have zipped up all the files you need to get going at the links at bottom of page.
Contents are:
"b"
= The original "fb" program, but removed header to minimize filesize.
"fastload_sys2104.prg"
= The original "disc turbo", but removed header to minimize filesize.
"fb_loader.asm"
= My small loader for "b" (the fb program).
"fb_loader.prg"
= The assembled version. Starts with SYS820.
"main_loader.asm"
= My main code (ffb) to setup everything and include fastloader and my mini fb_loader
"main_loader.prg"
= The assembled version, start with SYS49152.
"autostart/" directory which contains:
"auto_bootmaker.prg" = The original program to make any program autostart during/after load.
"ffb" = The final version of the autostart maker above.
"main_loader.prg" = The original assembled version by me, which you load into auto_bootmaker if you want.
"finals_copy_to_sdcard_sd2iec/" directory which contains:
"b" = The modified "fb" loader without headers.
"ffb" = The final file you start with to ignite everything automatic just as shown in video above.
"originals/" directory which contains:
"disc turbo.prg" and "fb.prg"
The main "ffb" loader.asm
*=$C000
startaddress=faststart
storeaddress=$0838
storeaddress2=$0C01
storeaddress3=$0334
loopcount=4
movemem
ldx #$00
ldy #loopcount
loop
lda startaddress,x
sta storeaddress,x
inx
bne loop
inc loop+2
inc loop+5
dey
bne loop
lda #>startaddress
sta loop+2
lda #>storeaddress
sta loop+5
lda #$00
sta movemem+1
lda #loopcount
sta movemem+3
ldx #00
loop1
txa
lda faststart+969,x
sta storeaddress2,x
inx
cpx #186
bne loop1
ldx #00
loop2
txa
lda loadstart,x
sta storeaddress3,x
inx
cpx #34
bne loop2
JSR storeaddress
JMP storeaddress3
RTS
faststart
incbin "fastload_sys2104.prg",2
loadstart
incbin "fb_loader.prg",2
The fb_loader.asm
*=$334
LDA #fname_end-fname
LDX #<fname
LDY #>fname
JSR $FFBD
LDA #$01
LDX $BA
BNE .skip
LDX #$08
.skip LDY #$01
JSR $FFBA
LDA #$00
JSR $FFD5
BCS .error
JSR $80D
.error
RTS
fname
TEXT "b"
fname_end