I think I have a better idea. I could use the power-on timer to set an IO port-controlled register bit which forces the address decoder to select an alternative ROM on start-up........
The more I think about this Frankenstein ROM-switching hardware scheme, the less enamored I am with it.
The Level III OS is full chock full of non-relative Jump instructions. For example a JP instruction to $3015 (the beginning of the boostrap/initialization routine) already begins at $0002.
The Keyboard memory space has four mirrors in the 1KB of RAM space partially decoded for it.
Lets say that I redesign the address decoding to assign the top-most keyboard mirror ($3B00-$3BFF) to ROM, effectively increasing ROM memory area by 256 bytes.
256 bytes is more than enough for a Colour RAM initialisation routine.
Lets say that I assign the top 1KB of RAM address space ($FC00-$FFFF) to Colour RAM. All things considered, I think this would be the least problematic area to poke the Colour RAM.
I then just need to find a JP instruction in the operating system ROM at an appropriate point at the conclusion of the bootstrap routine(s) and modify the address value bytes to $3B00 - the start of my extended ROM area and the 1st instruction of my custom Colour RAM initialisation routine. This routine would terminate and return the system to normal operation by simply executing a JP instruction having the address value that was modified in the original ROM.
I could even deal with the slight potential issue of having appropriated the top-most keyboard mirror. I could have an I/O port address register bit (just a flip flop), set on power-up by the power-on timer, which controls the address decoder to enable the ROM expansion. The ROM expansion becomes superfluous once the system has booted and keying in an instruction if required to reset this register bit would revert the keyboard address decoding to the standard mode of operation. So there I have a fix for the slight possibility of one day encountering some sloppily written program that uses the top-most keyboard mirror.
Last edited: