When my CHOCHI (
http://forum.6502.org/viewtopic.php?f=10&t=2644) boards start up, they contain a binary loader that flashes an LED (to indicate that the system is up) and waits for a binary upload via the serial port. The protocol is very simple:
-A 2-byte load/execution address
-A 2-byte byte count (actual code, excluding this 4-byte header)
-data...
The original loader code was sitting high up in page $FF and used $FFFC/$FFFD to store the load/execute address initially received (I thought I was clever). This worked pretty well, but while trying to port ehBASIC I realized that my arrangement is not very smart.
I like the ability to load right over high RAM and vectors. That means that the loader should not be in page $FF, and it should not use the reset vector to store the load/execute address.
Where to put it? I stuck it into page 0! There is really no need to load anything into page 0, and it's a safe until the code starts executing (at which point it will overwrite it). I shall also move the 2-byte address to a page 0 location. I am a little concerned as I am feeling clever again
I am doing some final adjustments and tests. I will be posting a bitstream update soon here:
http://apple2.x10.mx/CHOCHI/#Bitstreams