Close

Simplification

A project log for Bootstrapping a ROMless Z80 using RS-232

Is it possible to bootstrap a simple ROMless Z80 system using only two wires - e.g. from an RS232 interface? This project explores this.

willstevenswill.stevens 01/14/2024 at 09:020 Comments

I’ve been thinking more about initialization, and I think that it is sufficient to initialise A, and leave initialization of everything else to the first boot program written to RAM. Then write a second boot program (i.e. any 256-byte program) after that. The rationale is that:

The sequence to initialise A is:

3E 00111110 LD A,n
2E 00101110
76 01110110 HALT
76 01110110 HALT

This sequence only needs to be executed once.

The programming sequence is:

3D 00111101 DEC A
2C 00101100 INC L
77 01110111 LD (HL),A
76 01110110 HALT

followed by this after NMI
(PC=0066h)

F7 11110111 RST 30h


The sequences only differ in how D1 and D0 are configured.

For the programming sequence the configuration is:

D7=A2
D6=A1
D5=1
D4=A1 or /A0
D3=/A1
D2=1
D1=A1
D0=/A0

For the initialisation sequence it is as above except D1=1, D0=0. So a DPDT can be used to switch between the two.

So the complete sequence of steps required to bootstrap the system will be:

Discussions