I asked around in the Zilog Z-80 DIY Facebook group and got some great feedback on the best choice for toolchain for Z80 C and ASM. I settled on z88dk. It's a bit complicated to get it set up but it does work well. It's command line driven and has a lot of options that have to be set.
The Target: Embedded_Z80 webpage was very helpful in figuring out command line options. I was able to compile a very simple program and get it running.
void main(void)
{
while(1);
}
The business end of the code compiled to:
244 0000 _main: 245 0000 l_main_00102: 246 0000 18 FE jr l_main_00102
When I ran the code the oscilloscope connected to the Output Enable line of the SRAM showed that there were three accesses to addresses 0, 1 and 2 which is what I expected.
MREQ* (top) and CPUCLK (bottom). Looks good.
Propagation delay from the PSoC logic. MREQ* on the bottom, SRAMOE* on the top. Less than 20 nS. Comparable to LSTTL speeds "in the day".
So far, so good.
Next task is getting some I/O emulation running.
Perhaps start with a single 1-bit register connected to an LED? Need some Output to I/O space code to make that work.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.