I cleaned up XeO3 loader (yes, it's for Commodore 264 family) slightly and added couple of comments. You can find the loader + source code here, I hope it gets added to Plus/4 World soon so people can actually find it.
The loader works with 1541/157x and 1581. Every bit is clocked separately, so it's safe to use interrupts while loading. It beats many 2-bit loaders, and allows keeping the screen on.
Resident loader part is less than 256 bytes. Save works too, but maximum size is 252 bytes and file to overwrite must be on the disk already. It's only meant for high scores anyway ;)
Porting back to C64 is easy enough, just change couple of variable definitions and remove unnecessary code.
Update:
This is not a generic turbo you would use to load programs with. It was meant for game/demo use and so it has some limitations.
- You can't LOAD "$",8.
- Drive code is disabled (drive is reset) as soon as ATN line is active. This means that it's gone as soon as you access any device on IEC bus with kernal routines.
- Drive code is installed only once, so once it's gone, it's really gone. That's the dark secret behind small resident code.
- If you try to LOAD/SAVE without restoring kernal vectors once drive code is gone, computer will hang waiting for drive response.
Optimal interleave is 16 sectors, unless your interrupt takes lots of time. In that case try interleave 17 or 18 to see if that speeds up loading. Normal interleave used by 1541 is 10, which means that the loader must wait additional 10+ sectors to pass by the r/w head before reading next sector from disk surface.
3 comments:
Got it (Mike alerted me), I'm ready to upload it but I need a definitive name for it! :D
One bit wonder :)
Remember to tell that it's not meant as generic turbo, but for demo/game authors. For starters, it disables drive end of code as soon as ATN line is active which means you can't do LOAD "$" among other things. Also, the resident part doesn't contain drive code so once it's gone it is really gone. Resetting drive and then trying to load without restoring LOAD/SAVE vectors at computer causes it to hang when it waits for drive response.
Post a Comment