[MZ-80 K / MZ-80 A / MZ-700] undetermined $Exxx I/O range?

Post Reply
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

[MZ-80 K / MZ-80 A / MZ-700] undetermined $Exxx I/O range?

Post by hlide »

[ MZ-80 K ]

IC47 154 is outputting up to 16 /CS so /CS0 means $0000-0FFF, /CS1 $1000-1FFF, ..., /CSE $E000-EFFF, /CSF $F000-FFFF. It is interesting that if you have just an MZ-80 K with no I/O expansion, you can use /CSF as a chip select for an SRAM or a ROM by just connecting the wires with no extra decoding circuit.
MZ-80 K.png
But the point here is to check which I/O ranges are determined. So the chip select is /CSE (pin #14 of IC47). It is connected to IC30 LS42 which can dispatch to one amongst 10 chip selectors: /CSE0 ($Ex00-Ex03), /CSE1 ($Ex00-Ex03), /CSE2 ($Ex04-Ex07), ..., /CSE9 ($Ex24-Ex27). if the 4-bit input value is above 9, there are no active chip selector output, which makes the range $Ex2C-$Ex3F only usable by an external circuit with its own address decoder. As for $E040-E067, $E080-E0A7, ..., $E0C0-ExE3, they are just mirrors of $E000-E027. And $E100-$E127, $E200-$E227, ..., $EF00-$EF27 are also mirrors of $E000-E027.

However /CSE0, /CSE1 and /CSE2 are already in use so they are not candidates for /CSEx.

Note that we cannot map an SRAM or a ROM to $E800-EFFF.

So we have from /CSE3 to /CSE9 to create our own I/O mapping and need to wire:
- 1 x /CSEx as the chip selector of a controller (one pin of IC30)
- 1 x /RD to tell a read I/O memory access (from pin #7 of IC 35)
- 1 x /WR to tell a write I/O memory access (from pin #5 of IC 35)
- 8 x D0-7 to read/write an 8-bit data (from bus-side of IC 36 and IC 37)
- 2 x A0-1 to read the I/O memory register index (from bus-side of IC 44)
- 1 x /WAIT to pause a read/write memory access if necessary(from pin #24 of IC 46 Z80)

So you'll need at least 14 wires with clips that we can connect on an Arduino MEGA turned into an I/O controller. If this Arduino needs to emulate several I/O controllers then add extra /CSEx wires.
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: [MZ-80 K / MZ-80 A / MZ-700] undetermined $Exxx I/O range?

Post by hlide »

[ MZ-80 A ]
it uses a custom chip: /CSE is active when in range $E000-EFFF.
MZ-80 A-1.png
But there is an extra circuit which combines /CSE and A11 to determine an access to I/O memory mapping ($E000-E7FF) or to SRAM/ROM ($E800-EFFF).
MZ-80 A-2.png
The circuit is a little complex here but it can sum up this way: /CSE0, /CSE1, /CSE2, /CSE3, /CS4 and /CS5 are in use and cannot be candidates for /CSx. So only /CSE6, /CSE7, /CSE8 and /CSE9 are usable for external I/O controller.

We have the same mirroring effects as MZ-80 K ones except for it is limited in the $E000-E7FF range.

So we have from /CSE6 to /CSE9 to create our own I/O mapping and need to wire:
- 1 x /CSEx as the chip selector of a controller (one pin of IC 41 or 44)
- 1 x /RD to tell a read I/O memory access (from pin #7 of IC 7)
- 1 x /WR to tell a write I/O memory access (from pin #5 of IC 7)
- 8 x D0-7 to read/write an 8-bit data (from bus-side of IC 12)
- 2 x A0-1 to read the I/O memory register index (from bus-side of IC 5)
- 1 x /WAIT to pause a read/write memory access if necessary(from pin #24 of IC 13 Z80)

So you'll need at least 14 wires with clips that we can connect on an Arduino MEGA turned into an I/O controller. If this Arduino needs to emulate several I/O controllers then add extra /CSEx wires.
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: [MZ-80 K / MZ-80 A / MZ-700] undetermined $Exxx I/O range?

Post by hlide »

[ MZ-700 ]
it also has a custom chip (IC 7A M60719) which outputs /CSE when in range $E000-$E7FF. Unlike MZ-80 A, I think this custom chip does not output an active /CSE when in the range $E800-EFFF because it would make impossible for an external I/O expansion to provide a ROM at this range.

However, the number of /CSEx is even more limited to 4 instead of 10 because they chose to ground the third input bit so the four-bit input can only vary between 0 and 3 instead of between 0 and 9.
MZ-700.png
MZ-700.png (32.93 KiB) Viewed 6343 times
So in the end, only /CSE3 is usable for an external I/O controller!

If you want to be able to extend from /CSE4 to /CSE9, you must pull off the pin #13 of IC 6E to unground it and wires it to A4. What a pity!

So we have only /CSE3 to create our own I/O mapping and need to wire:
- 1 x /CSE3 as the chip selector of a controller (from pin #3 of IC 6E)
- 1 x /RD to tell a read I/O memory access (from pin #9 of IC 1F)
- 1 x /WR to tell a write I/O memory access (from pin #7 of IC 1F)
- 8 x D0-7 to read/write an 8-bit data (from bus-side of IC 1G)
- 2 x A0-1 to read the I/O memory register index (from bus-side of IC 4G)
- 1 x /WAIT to pause a read/write memory access if necessary(from pin #24 of IC 2E Z80)
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: [MZ-80 K / MZ-80 A / MZ-700] undetermined $Exxx I/O range?

Post by hlide »

As seen above, while it may be possible to keep the I/O address range compatibility of an external I/O controller between an MZ-80 K and an MZ-80 A. It is harder to achieve it with the MZ-700.
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: [MZ-80 K / MZ-80 A / MZ-700] undetermined $Exxx I/O range?

Post by hlide »

I watched the MZ-700 /CSE signal while varying the memory mapped I/O address and this signal goes low only if the range is between $E000 and $E00F. Outside, it is always high, i.e, inactive. So it is safe for an external device with the fitting decoder to use from $E010 to $E7FF without any conflict with the current chips. It also means you can not cut the pin 13 to connect it to A4 with the hope to increase the current 4 chip selectors into 10 chip selectors. It won't work because /CSE will never be active for those above the fourth chip selector and that explains why they ground the pin 13.
Post Reply