|
Post by buzbard on Jul 24, 2016 23:29:26 GMT
Here is a patch for the C128 KERNAL or JiffyDOS ROM that will disable auto-booting, but will auto-boot if the Control key is held during the startup process.
To apply the patch open the KERNAL ROM in a hex editor and starting at offset 0F19 change 13 of the FFs to this:
58 A6 D3 E0 04 D0 03 A2 08 60 68 68 60 Then at offset 388B change:
58 A2 08 to:
20 19 CF save it, write the rom to a eprom or try it out in a emulator.
Here's what's happening. At address $F88B, which is the 388B offset above, is where the KERNAL has just finished checking for cartridge (function) roms and is just about to check the drive for an auto-boot signature on track 1 sector 0. The original code there is:
F88B CLI F88C LDX #$08
we changed those 3 bytes to
F88B JSR $CF19 starting at $CF19 in the kernal rom there are a few unused bytes there which are filled with $FFs, yes, that space is also unused in the JiffyDOS ROM.
At address $CF19 we inserted some new code which looks like this:
$CF19 CLI ; Clear the interrupt disable flag so we can LDX $D3 ; read the SHFLAG CPX #$04 ; Is the Control key being pressed? BNE no_boot ; No: Then don't auto-boot
boot LDX #$08 ; Yes: Then perform normal auto-boot RTS
no_boot PLA ; Pull the return address ($F88D) off the stack PLA ; so we don't return to $F88E RTS ; Return to BASIC skipping the auto-boot process
|
|