M1 signal usage for I/O on MSX cartridge

By JeroenTaverne

Resident (48)

JeroenTaverne さんの画像

25-04-2022, 14:02

I want to understand if it's required to check the M1 signal in a cartridge that uses the IORQ pin for I/O reads and writes. As example I had a look at the Philips Music Module schematics, but the M1 signal isn't used. I would like to create a cartridge with an i8255 PIO chip in it.

ログイン/登録して投稿

By xavirompe

Resident (59)

xavirompe さんの画像

29-04-2022, 14:04

According to my experience, to avoid problems, it is best to consider the /M1 signal, since there are cases in which it can interfere with I/O operation.

By xavirompe

Resident (59)

xavirompe さんの画像

29-04-2022, 14:08

For more information check here:
Hardware Design

引用:

Don't forget to differentiate I/O operations from interrupt acknowledges. This a catch in the Z80 spec: I/O operations must have the /M1 pin high, and interrupt acknowledges will have both /RD and /WR high. If the /M1 pin is low at the same time as the /IORQ, this signals that the Z80 is in fact acknowledging an interrupt. So I/O decoders must also check either /RD, /WR or /M1 to be sure if it's really an I/O operation.

By ducasp

Paladin (712)

ducasp さんの画像

29-04-2022, 16:48

xavirompe wrote:

For more information check here:
Hardware Design

引用:

Don't forget to differentiate I/O operations from interrupt acknowledges. This a catch in the Z80 spec: I/O operations must have the /M1 pin high, and interrupt acknowledges will have both /RD and /WR high. If the /M1 pin is low at the same time as the /IORQ, this signals that the Z80 is in fact acknowledging an interrupt. So I/O decoders must also check either /RD, /WR or /M1 to be sure if it's really an I/O operation.

If /RD and /WR will be high and you use those, then there is no need to use /M1, the catch is in the "either /RD and /WR" being part of the I/O decoder and making sure it is selected only when one of those signals is low as well as IORQ... I really don't think anyone would do a device without /RD or /WR, but if that doesn't matter and is not checked, only then you need to check /M1