Close

Really Booting from the ROM

A project log for Z80 Computer

Yet another Z80 computer.

james-otsJames Ots 06/15/2017 at 18:031 Comment

Previously, although I could boot from the ROM, I found that after a while it stopped working. I eventually worked out that it was down to two things: 1. I hadn't write protected the ROM and 2. there was a bug in the monitor code which was accidentally overwriting itself. Now that I've written a PROTECT (and UNPROTECT) routine, and fixed the bug, booting from the ROM works nicely.

One interesting thing which I hadn't initially thought of was that when the system is running from the ROM instead of from RAM it isn't possible to write to the ROM. This is because once you've written to the ROM it goes into a mode where each byte you read is different from the previous one until the write has completed. So as soon as you write to the ROM then the next instruction it reads from the ROM is incorrect and it crashses. So I should probably load the ROM programme into RAM as soon as it has booted.

And after that I can start work on the SD card.

Discussions

James Ots wrote 06/16/2017 at 07:22 point

P.S. The monitor is now loaded into RAM on startup, which makes everything work much more nicely. And I've written the SD card CPLD routines, but haven't tested them yet.

  Are you sure? yes | no