Stone Oakvalley's Authentic SID Collection (SOASC=)
The automated Commodore 64 SID Music recorded to MP3/FLAC. Project based on High Voltage SID Collection & Compute's Gazette SID (CGSC)


                              



T H E   R E A L   D E A L   I N    - A U T H E N T I C -    C O M M O D O R E   6 4   M U S I C  !



1541 Fastloader and SD2IEC File Browser v1.0 - AutoCombo!
in All about SOASC= | Saturday, April 27, 2019 | 11:53


During my recent Hardware project for connecting a USB relay to the Joystick port on a real C64, I started researching how I could use the SD2IEC more effective when it comes to loading and browsing quickly around D64 disk images and regular PRG's.

I call it "Stone Oakvalley's Fastload File Browser" (SOFFB), which basically is "Fastloader w/SD2IEC File Browser (fb)" type of combo project!


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

Download Movie instead (Right click, save as)




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


The "disc turbo.prg" file of 1213 bytes presented as original below. It basically loads itself to 2049 ($80D) and with a call to SYS2104 shows the message below after it had injected the fastloader code for 1541 devices successfully.

From this point, it will blank the screen if any further programs are loaded which naturally is a trick to speed things up even more.

Its fully compatible with the SD2IEC that I tried and we all know not all of the disc turbo/fastloaders out there are, so good find!

Program is available in the links below.



The contents of "c64disks.hvilket.net\frank_gasking\disks\disk0012.d64" where "disc turbo" was found.

It seems the disc is a type of utility disc with entries sent to Avalon.

Diskimage .d64 is available in the links below.



The only trace of information on how or who made "disc turbo" isn't very clear here either.

So technically I am unable to credit the author of this small effective fastloader, touche!



This tool I used on my finalized and assembled "ffb" program to make it autostart.

The filesize went from 1269 bytes to 1527.

Program is available in the links below.



The hex view of my "ffb" loader (note, the one without autostart).

Loads into 49152 ($C000) location.

This program has includes via "incbin" of both the "disc turbo" and the "fb_loader" which are both copied into their original positions in the C64 memory and executed from thereon.



The hex view of my small "fb" separate loader.

Loads into 280 ($0334) tape buffer location.

This program was "incbin" into the main "ffb" loader.




Please review these related article links:
Click to open prgOriginal Auto BootMaker.prg
Click to open prgOriginal "disc turbo" prg
Click to open d64DISK0012.D64 (where "disc turbo" was found)
Click to open urlFB (FileBrowser) V1.0 for SD2IEC (2011) by Sailor
Click to open asmfb_loader.asm
Click to open asmmain_loader.asm
Click to open zipComplete package of project. Asm code, prg files, support files, autostart files, files for SD card(SD2IEC)


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Posted by: Old-schooler, Stone Oakvalley | Publisher: Crazy Multi Talent, Stone Oakvalley
Last revised: December 07, 2022 - 17:33 | Page views: 2094


Website Design by post@stone-oakvalley-studios.com - Copyright © 2024 www.stone-oakvalley-studios.com