Corrected Spectrum ROM

Type: ROM
Platform(s): TS 2068
Tags: Emulation, ROM

This ROM corrects a well-known bug in the Spectrum’s NMI handler — one so notorious that the ROM disassembly flags it with an inline comment: “Note: This should have been ‘JR Z’!”

The NMI routine (at 0066h) is designed to allow a controlled system reset: if the system variable NMIADD holds a non-zero value when the NMI line fires, the CPU is supposed to jump to that address and reset. But in the original Spectrum ROM, a single wrong opcode — JR NZ (20h) instead of JR Z (28h) at 006Dh — inverts the logic entirely, making the reset trigger when it shouldn’t and suppressing it when it should fire. The mechanism is effectively dead in every unmodified Spectrum.

This ROM replaces 20h with 28h, applying the canonical one-byte correction. With JR Z in place, the routine behaves as intended: NMIADD = 0000h safely bypasses the reset, while any non-zero value causes the jump — giving NMI-capable hardware a working reset hook for the first time.

Content

Appears On

Related Products

Untested EPROM. There is a one byte difference at 6Dh in the NMI routine. The original Spectrum ROM has 20h...

Related Articles

Related Content

Image Gallery

Source Code

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

People

No people associated with this content.

Scroll to Top