Close

Installing a small ROM monitor

A project log for Repurposing a Z80 controller board

A failed attempt to put old hardware to use

ken-yapKen Yap 12/26/2018 at 14:520 Comments

I've put this aside for too long. It occurred to me the other day to put a small ROM monitor on board so that I can find out if things are working. Something that will give a prompt, allow me to show and modify registers, memory, and I/O ports. I found the MINOS monitor written in C to be compiled by SDCC, which will make modification easier. I'll have to change the ROM and RAM locations to suit. Also to write I/O routines for the Z8440 SIO, the ones in the original appear to be for the Z8470 DART. The original did some convolutions to fit the code in 2 kB, but I have no such constraint. I'll probably start with a 2764 or a 27128 EPROM giving 8 or 16 kB code space.

With this in mind I needed to find out what the Tx/Rx clock sources for the SIO were. So more tracing with a continuity meter. First thing I found out was the Tx and Rx clocks of both channels were tied together so there was only one clock source. I thought it might come from the CTC, but it turned out to come from a 74HC393 binary counter, which was wired up to divide by 32. The input came from the crystal, running at 4.9562 MHz. Doing the arithmetic shows that this means with the SIO in x16 mode, the baud rate is 9600, with an error of 0.8% as the division is not exact. This is tolerable as up to 2% is allowed for async comms. Still I wonder why they chose 4.9562 MHz for the system clock. Probably a standard crystal frequency.

I'm not going to get the RS232 transceivers working, this would require getting the +/- 8V power lines working, and I'll need a serial port at the computer end. Instead I'll connect one of those USB to TTL level converters that are only a buck or so from eBay. What I'll probably do is remove the RS232 chips and put IC sockets in place in case I want to revert to them. Then I'll solder some headers to connect the appropriate pins of the sockets to the converter. I'll dispense with handshaking and flow control, so I'll only need 3 wires. It should be possible to program the SIO to not require handshaking.

Discussions