The ZXI (ZX Interface) standard is for devices that are attached to the Spectrum edge connector. ZXI compliant devices are inter-operable with each other without conflicts. Certified devices may display the logo on their case, in their manuals, and on-screen.

Contents

Background

The Z80 provides 16-bit I/O decoding, so in theory the Spectrum has 65536 ports available for hardware devices. In practice the Spectrum does not fully decode the I/O and there are no spare I/O ports available that do not clash with at least one existing peripheral. For example, the ULA alone uses 32768 ports (every even port). It is worth noting that the Timex clones do fully decode the I/O ports.

During the development of the ULAplus replacement ULA, a comprehensive search was carried out to determine a 16-bit port range that clashed with the least devices. An 8-bit port was located that clashed with a single device, the ZX Printer, and a hardware fix created to prevent the ZX Printer using that address.
The following modification to the ZX Printer circuit prevents it being triggered by access to port xx3B.

Meanwhile, during the development of the Spectranet ethernet card, a solution was devised to enable multiple devices to page in their own ROMs using 'ripple priority'. The ZXI standard combines these two approaches into a single standard. Legacy devices that do not use ROM paging may also be certified as ZXI compliant on a case by case basis.

Port Allocation

Port allocations are currently in flux - be advised that assignments may change in the future

To have your device certified as ZXI compliant, you must apply for the required number of I/O ports in the range #hh3B. This can be done by posting a request to usenet's comp.sys.sinclair, or to the zxi-specification-discussion mailing list

Allocations as of 05 September 2012
It is proposed that the 256 ZXI ports (#xx3B) be divided into two areas based on the state of the A15 line.

A plug-in ULA replacement (such as a ULAPlus implementation) fitted in place of the original ULA can only access the A14 and A15 lines of the high address byte. This means that only partial decoding is possible and the device will respond to 128 of the available 256 ports.

A complete clone (i.e. not a plug-in ULA replacement) however can be given access to the full address bus and hence should decode the high bytes fully. It is proposed that any ports needed for internal functions in a clone (for example changing clock speed) be allocated from the higher 128 ports (i.e. A15 high).

Devices with the same function, for example IDE interfaces, may be allocated the same ports on the basis that only one of these devices should be connected at a time.

Port Decoding

ZXI compliant devices must perform complete bus decoding and take into account the M1 signal and the RFSH signal.

NMI Handling

The device must only respond to its own NMI. This is particularly important if the machine is using a ROM with a working NMI handler routine.

INT Triggering

It is possible on machines which have a straight connection from the INT signal at the rear bus, to the INT pin at the Z80 for an external devices to trigger an INT. It can block the normal ULA interrupt and inject its own INT pulses. ZXI compliant devices that use the INT signal should put a 0xFF on the data bus during the INTA cycle if the device does not use vector interrupts.

IORQULA/IORQGE

More detail required.

Legacy Device Certification

Legacy devices that do not use their own ROMs may also be certified as compliant on a case by case basis. For example, an AY expansion for the 48K machine that uses the same ports as the 128K machine, or an IF2 compatible Sinclair Joystick interface would both be certified compliant.