Close

Flash ROM Support

A project log for z80ctrl

AVR-based bootloader and IO card for RC2014 retrocomputer

jb-langstonJ.B. Langston 06/07/2018 at 01:560 Comments

I have added built-in Flash ROM support directly to the z80ctrl monitor.  There is a flash command, which takes the same arguments as the loadbin command, and an erase command, which takes either an address less than 7ffff (512K) and erases the 4k sector that it lies within, or "all", which will erase the entire chip. After a region of flash has been written once, it must be erased first to be flashed successfully again. 

The flash command is currently limited to flashing the first 64K of RAM, but that is a limitation of the UI, not the underlying code.  I plan to make paging transparent from the monitor, so that for any command that takes an address, you can just specify any addresses from 0-fffff (1MB), and it will automatically take care of the paging necessary to access that address.  This will apply to the dump, loadhex, loadbin, flash, and other commands.  

When this is done, the page command will be relegated to setting the default pages for the Z80 to boot from, not controlling the pages used by the monitor.  For convenience, I may provide a "base" command that will allow specifying a base address to be added to 16-bit addresses, but I haven't yet decided if the convenience is worth the added complexity.  Also, "flash" may not remain a separate command, but instead become an option on the loadbin and loadhex commands.

Discussions