CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: doragasu on 16:05, 22 January 17

Title: CPC Z80 buses and synchronous design
Post by: doragasu on 16:05, 22 January 17
I would like to know if digital interfaces to the Z80 buses inside the CPC can be designed fully synchronous.

Having a look to the Z80 CPU User's Manual it would seem so:

(http://i.imgur.com/24q7a3U.png)

For reads, I can remove data from the bus at the end of T3 (when both #mreq and #rd are removed). For writes, I can easily obtain the data at the end of T2. But I'm asking because some time ago I made a MBC3 memory controller for the Gameboy, and I had to go the asynchronous way because even though the Gameboy CPU is a Z80 derivative, it looks like it has different timigs. E.g. this is the write cycle (extracted from here (http://dhole.github.io/post/gameboy_cartridge_emu_1/)):

(http://dhole.github.io/media/gameboy_stm32f4/screen_dump_write_timings.png)

Write signal is not stable at the beginning of neither a rising nor a falling edge, so design cannot be synchronous (unless of course if you decide using another independent and much higher clock and implement a proper clock domain change, that is something I would like to avoid).

So the question is: are the graphs from the Z80 User Manual correct? Can the interface be made in a fully synchronous way?
Title: Re: CPC Z80 buses and synchronous design
Post by: gerald on 17:00, 22 January 17
The user manual is correct.
The traces on the gameboy does not show the actual Z80 clock, but a slower one.
I also have doubt that the others signals straight from the Z80.
Title: Re: CPC Z80 buses and synchronous design
Post by: andycadley on 18:16, 22 January 17
It's worth remembering that the Gameboy CPU isn't a Z80 derivative. It's more like an 8080 derivative, with some of the Z80 instructions borrowed and a few of it's own thrown in for good measure (along with borrowing Z80 assembly syntax, rather than 8080, presumably because it was more well known). I doubt they were too worried about bus compatibility, they removed the entire I/O space so peripherals designed for the Z80 weren't going to be compatible anyway.
Title: Re: CPC Z80 buses and synchronous design
Post by: doragasu on 20:27, 23 January 17
Thanks for the info!

Didn't know the DMG CPU was derived from the 8080, everywhere I read before listed it as a modified Z80.
Powered by SMFPacks Menu Editor Mod