I spent the morning frustrated by my MCU. It seemed to work intermittently. Eventually, I tracked down the problem to the fact that address lines 14 and 15 weren’t connected to the MCU. I had connected them from the MCU to the Z-80 socket, but no connections to the flash programmer/turned bus controller. I realized when I tried measuring the voltage on the pins and the voltage kept switching between 0 and 5. The M4A5 CPLDs have a circuit that weakly holds the last output, but it is easy to make it swap by measuring the voltage.

So, once I got that figured out and got my test code all worked out, it finally started working. I still have a little more testing to do before I rewire the A14-A15 and A14-A17 and plug in the Z-80 and SRAM, but it will be very soon.

I suppose I have to start figuring out something to put into flash. Oh, and I have to ensure that my flash file program code works so that I can upload a file. Also, I think the sdcc tool-chain makes Intel Hex files, so I need to make sure I can upload an Intel Hex file. Right now, it just does binary files.