Wednesday, July 26, 2017

Fast-loading via serial monitor for development (part 2)

I woke up in the middle of the night, so decided to finish the serial monitor fast loader for supporting development.

After a bit of fiddling, it is now possible to compile and use the monitor_load program to:

1. Load a fresh bitstream and completely reset the MEGA65, thus allowing reloading a program regardless of the state of the machine.

2. Wait until the M65 boots to C65 mode.

3. Switch to C64 mode via GO64

4. As soon as it is in C64 mode, load the program you provide on the command line.

Example command line:

tools/monitor_load /dev/ttyUSB1 something.prg nexys4ddr.bit

As the serial monitor interface runs at 230Kbps, this gives a maximum load speed of around 20KB/sec.  At the moment it is probably around 15KB/sec, so quite acceptable.

From typing the command to having the program completely loaded takes about 10.5 seconds, for a 16KB program. That is, about 9.5 seconds is spent loading the bitstream, and waiting for Kickstart to prepare the SD card, load the C65 ROM etc, and get to the C65 prompt.

No comments:

Post a Comment