Classic — eZX Classic Spectrum image

The eZX's Classic Spectrum image emulates the pre-Next Spectrum range at cycle-accurate per-model timing: 16K, 48K, +, 128, +2, +2A, +3, Pentagon 128, Timex TS2068 / TC2048, Didaktik Gamma, and Scorpion ZS-256 (including Turbo+ mode). Every model runs with bit-exact original ULA contention, floating-bus behaviour, and instruction timing that the games and demos written for these machines depend on. The Classic image is the most thoroughly authentic pre-Next Spectrum emulation available on hardware, combining the cycle-precision of an FPGA implementation with the convenience of modern storage, output, and debug.

The Classic image uses the same Z80NG CPU as the Next-compatible image, configured in Z80 strict mode (Z80N extensions disabled — execute as illegal-instruction / NOP per original Zilog Z80 behaviour). Memory architecture is BSRAM-backed system RAM with HyperRAM-backed ROM, both selected because they best match the original Spectrum's deterministic timing model. See also Nextgen for the Next-compatible image's improvements; Z80NG for the CPU; spec for the underlying hardware.


Compatibility commitment

The Classic image's purpose is bit-exact emulation of the original pre-Next Spectrum models. Specifically:

  • Per-model Z80 clock matches the original (3.5 MHz for 16K/48K/+/128/+2/+2A/+3/Pentagon/Didaktik, 3.58 MHz for Timex TS2068, 7 MHz for Scorpion Turbo+)
  • ULA-CPU contention matches the original per-model contention pattern (which differs between the 48K, 128K, +2A/+3, Pentagon, Timex, etc.)
  • Floating bus returns the same values software has historically been able to read from it on the original hardware
  • Memory paging matches per-model: no paging on 16K/48K, the 128K's $7FFD paging on 128/+2, the +2A/+3's $7FFD + $1FFD paging, Pentagon's extended paging, Scorpion's bank scheme
  • ROM behaviour including the Sinclair 48K BASIC, 128 BASIC, +2/+2A/+3 ROMs, +3DOS, Pentagon ROM, Timex ROM, Didaktik ROM, Scorpion ROM all served as on the original hardware
  • Peripheral signalling for Interface 1 Microdrive, Interface 2 joystick / cartridge, Kempston joystick, DivIDE / DivMMC, ZX Printer, and Currah Microspeech all behaves identically
  • All undocumented Z80 behaviours that real-world software depends on (SLL, IX/IY half-register access, undocumented flag effects, etc.)

Software that runs on a real Spectrum 48K, 128, Pentagon, etc. runs on the Classic image with identical timing-visible behaviour. The Classic image is not a Z80N machine in Z80 strict mode — it's the closest thing to a real pre-Next Spectrum that the eZX hardware can produce.


Per-model emulation

The Classic image supports a configurable per-session model selection (spectrum-mode classic <model> from AntOS). Each model entry is a complete cycle-accurate emulation including its specific ROM, paging behaviour, contention pattern, and peripheral set.

Sinclair / Amstrad line

Model Clock RAM ROM Paging Notable features
ZX Spectrum 16K 3.5 MHz 16 KB 16 KB (Sinclair) None Original 1982 machine
ZX Spectrum 48K 3.5 MHz 48 KB 16 KB (Sinclair) None The most-targeted Spectrum
ZX Spectrum + 3.5 MHz 48 KB 16 KB (Sinclair) None 48K in new case
ZX Spectrum 128 3.5 MHz 128 KB 32 KB (128 + editor) $7FFD 7 RAM banks
ZX Spectrum +2 3.5 MHz 128 KB 32 KB (Amstrad +2 grey) $7FFD 128 with built-in tape
ZX Spectrum +2A 3.5 MHz 128 KB 64 KB (+3 ROM) $7FFD + $1FFD +3 without disk
ZX Spectrum +3 3.5 MHz 128 KB 64 KB (+3 ROM with +3DOS) $7FFD + $1FFD Floppy disk model

Russian / Eastern European clones

Model Clock RAM ROM Paging Notable features
Pentagon 128 3.5 MHz 128 KB 32 KB Pentagon paging No ULA contention (key timing difference); Pentagon 8×1 multicolour mode supported
Pentagon 1024 3.5 MHz 1024 KB 32 KB Extended Pentagon paging Very large memory variant; same display
Scorpion ZS-256 3.5 / 7 MHz Turbo+ 256 KB 64 KB Scorpion paging Selectable Turbo+ mode at 7 MHz; ZX BIOS support

Timex variants

Model Clock RAM ROM Paging Notable features
Timex TS2068 3.58 MHz 48 KB 24 KB (Timex EX) None Timex hi-res 512×192 mono + hi-colour 8×1 attribute modes
Timex TC2048 3.5 MHz 48 KB 16 KB (modified Sinclair) None European Timex with Sinclair-style ROM

Other regional variants

Model Clock RAM ROM Paging Notable features
Didaktik Gamma 3.5 MHz 80 KB 16 KB Didaktik paging Czechoslovak clone with floppy interface

The full per-model list is selectable at the AntOS command line:

> spectrum-mode classic 48k          # Sinclair 48K (most common)
> spectrum-mode classic 128          # Sinclair 128
> spectrum-mode classic +3           # Amstrad +3 with floppy
> spectrum-mode classic pentagon     # Pentagon 128
> spectrum-mode classic scorpion     # Scorpion ZS-256
> spectrum-mode classic timex        # Timex TS2068
> spectrum-mode classic didaktik     # Didaktik Gamma

Switching between models within the Classic image is a quick FPGA-internal reconfiguration — paging logic and ROM contents change but the FPGA fabric layout doesn't need a full reload (the model differences are configuration data, not different bitstreams).


Memory architecture

The Classic image's memory architecture is the eZX's most cycle-accurate, because the timing of the original Spectrum models depends on deterministic single-cycle memory access that BSRAM provides naturally.

System RAM in BSRAM

All emulated Spectrum models' system RAM lives in on-chip BSRAM. Memory access is single-cycle deterministic at the FPGA clock (~2.6 ns at 380 MHz), well within the Z80's per-T-state budget at any classic-model clock (~285 ns at 3.5 MHz). The Z80NG's nominal-clock rendezvous in cycle-accurate mode (see Z80NG § Cycle-accurate timing) ties Z80-visible memory accesses to the per-model T-state boundary.

BSRAM allocation per model (approximate BRAM blocks at 2.25 KB per block):

Model RAM BSRAM blocks
16K 16 KB ~8
48K 48 KB ~22
128 / +2 / +2A / +3 128 KB ~58
Pentagon 128 128 KB ~58
Pentagon 1024 1024 KB (exceeds the GW5AST-LV138's BSRAM tier; runs from HyperRAM with prefetch — see below)
Scorpion ZS-256 256 KB ~114
Timex TS2068 / TC2048 48 KB ~22
Didaktik Gamma 80 KB ~36

Pentagon 1024 — runs from HyperRAM in the base configuration. The 1 MB Pentagon variant exceeds the GW5AST-LV138's BSRAM tier, but it fits comfortably in the 16 MB HyperRAM tier and runs without DDR3. At Pentagon 1024's native 3.5 MHz Z80 clock, each T-state is ~286 ns — far longer than HyperRAM's 70 ns effective first-byte latency (35 ns intrinsic × 2× from the dual-die fixed-latency mode) — so the Z80NG's prefetch buffer hides all access latency and the cycle-accurate rendezvous mechanism preserves bit-exact Pentagon 1024 timing. The DDR3 SODIMM upgrade isn't needed for any Classic Spectrum model; every model from 16K through Pentagon 1024 runs in the eZX's base configuration. Sub-256-KB models use BSRAM for system RAM with single-cycle deterministic timing; the 1 MB Pentagon 1024 uses HyperRAM with prefetch.

ROM in HyperRAM

All model ROMs live in HyperRAM (see spec § HyperRAM (Infineon S70KL1282)). The Classic image's memory controller maps the ROM address range (low 16 KB for unpaged models, low 32 KB for the 128-series, etc.) to HyperRAM offsets. ROM reads see HyperRAM's 70 ns effective first-byte latency (35 ns intrinsic × 2× from the dual-die fixed-latency mode), which fits comfortably within every cycle-accurate Z80 T-state budget (≥ 143 ns at 7 MHz, ≥ 285 ns at 3.5 MHz). Sequential ROM reads stream at 400 MB/s — orders of magnitude faster than any classic Z80 can request data.

HyperRAM stores the complete ROM library for every supported model simultaneously: Sinclair 48K, Sinclair 128 BASIC and Editor, +2 grey ROM, +3 ROM with +3DOS, Pentagon ROM, Timex EX ROM, Didaktik ROM, Scorpion ROM. Selecting a model at session start is a memory-controller remap, not a copy operation; the appropriate ROM image immediately becomes accessible at the simulated CPU's ROM address range.

Interface ROMs and cartridges

Interface 1 ROM (8 KB), Interface 2 cartridge images (16 KB each), and other peripheral ROMs also live in HyperRAM. The Interface 2 cartridge library — every historically released Interface 2 cartridge plus user-loaded images — can sit entirely in HyperRAM and be selected per session via AntOS. Cartridge swaps are instant because the entire library is resident; switching between cartridges is just a memory-controller remap.


ULA implementation: cycle accuracy as first-class

The pre-Next Spectrum's most defining feature is its timing-coupled ULA-CPU memory contention. The 48K's ULA accesses screen memory at specific cycle counts within each 224-T-state scanline; when the Z80 tries to access the same memory region during a contended cycle, it stalls. This contention is what produces the snow-effect demos, the multicolour bars, the precise tape-loader timing windows, the floating-bus reads, and dozens of other classic Spectrum tricks.

The Classic image implements bit-exact per-model contention:

Behaviour 48K 128 / +2 +2A / +3 Pentagon Timex
Screen contention Yes Yes Yes No (defining Pentagon feature) Yes
Contention pattern 8 T-state cycle, slots 14336–58015 Same as 48K + paging Different from 48K (early termination) None Differs from Sinclair
Floating bus Yes (returns ULA last-read byte+0xFF) Yes No (different chip) Yes Yes
I/O contention Slow ports (low bit 0=0) Same as 48K Same as +2A None Differs
Snow effect Reproducible Reproducible Reproducible Doesn't occur Reproducible

The contention pattern is implemented by the ULA emulation block, not by the CPU — the Z80NG simply responds to the wait-state signal the ULA asserts when contention occurs. This means the same Z80NG core that runs in turbo mode for the Next-compat image runs cycle-accurately for the Classic image without any CPU-internal logic change — only the surrounding contention logic differs.

Floating bus behaviour

The 48K Spectrum's floating bus returns the last byte the ULA read from screen memory, ORed with 0xFF. The Classic image emulates this exactly:

  • Reads from unused I/O ports (specifically the famously-floating ports) return the ULA's last-read value with the high bits set
  • Games like Cobra and Sidewize that use floating bus reads for sync detection work identically

Snow effect

The 48K's "snow effect" — visible white-noise artefacts when the I register points to contended memory during interrupt-disabled IM 1 execution — is reproducible on the Classic image. Demos that use this for visual effects work as on real hardware.


Enhanced video modes

Each model entry gets the enhanced video modes inherent to that specific platform. The Classic image is the first hardware platform to combine ULAplus, Timex hires modes, and Pentagon 8×1 multicolour selectable from one image.

ULAplus (64-colour palette mode)

Available on: 48K, 128, +2, +2A, +3, Pentagon, Didaktik (i.e., any model where ULAplus was retroactively defined as an enhancement standard).

ULAplus is the universal post-2010 enhanced-ULA standard — 64 simultaneous on-screen colours from a 256-colour 8-bit RGB (3R + 3G + 2B) palette in place of the original 15-colour palette. Addressable via I/O ports $BF3B (register select) and $FF3B (data). Fully backward-compatible: any program that ignores ULAplus sees standard Spectrum colours. Programs that opt in get a substantial colour upgrade.

Toggleable per session — games that depend on the original palette can disable ULAplus. Note that the Next-compatible image also supports ULA+ natively (it's a Next feature via NextReg $68); the Classic image brings the same capability to the pre-Next models that never had ULA+ in real hardware.

Timex high-resolution modes

Available on: Timex TS2068 and TC2048 model entries only.

The Timex variants supported two enhanced video modes inherent to their hardware:

  • Mono 512×192 at 50/60Hz with single-colour-per-pixel display (foreground/background defined globally)
  • Hi-colour 8×1 attribute mode — 256×192 with attribute resolution 8 pixels wide × 1 pixel tall (instead of standard 8×8), giving per-scanline colour changes

Both modes are addressed through the Timex-specific port $FF and are accessible exactly as on real TS2068 / TC2048 hardware.

Pentagon 8×1 multicolour

Available on: Pentagon 128, Pentagon 1024 model entries only.

The Pentagon-specific 8×1 multicolour mode — per-scanline attribute resolution (8 pixels wide × 1 pixel tall) — is reproducible on Pentagon model entries. Used by various Russian demos and demos targeting Pentagon hardware specifically.

Combined: a unique platform

The Classic image is the first hardware platform to support all three enhanced video flavours selectable from one image. Real hardware required choosing one at machine-purchase time: ULAplus is a retroactive standard requiring +ULA modifications, Timex hires modes only ship on Timex hardware, Pentagon 8×1 only on Pentagon hardware. The eZX Classic image lets a user select any of the supported models and get the corresponding enhanced video capability.


Peripheral emulation

The Classic image emulates the standard set of pre-Next peripherals, selectable on or off per session via AntOS command-line arguments:

Interface 1

ZX Microdrive (4 drives × 85 KB cartridges via virtual cartridge file mounting), RS-232 serial (presented to AntOS as a virtual serial port), and ZX Net (Spectrum-specific networking presented as a virtual interface). Microdrive cartridge images live in HyperRAM alongside the other ROM/cartridge data. ROM is the standard Interface 1 ROM (also in HyperRAM).

Interface 2

Joystick ports (Interface 2 defines two DE-9 connectors) and ROM cartridge slot (cartridge ROM library entirely in HyperRAM, instant swaps via AntOS). The eZX has four physical DE-9 ports via Sticky — the Interface 2 emulation can map any two of them as the Interface 2 ports, with the remaining two available for adapters that expected ports beyond the Interface 2 set (Cheetah 125+, Sinclair joystick adapter cards) or for multiplayer setups using non-standard joystick interfaces.

Kempston joystick

Industry-standard 8-bit joystick interface at port $1F. Maps to one of the eZX's four DE-9 ports via Sticky — by default the primary port, with the other three available for Interface 2 emulation, Cursor-protocol adapters, or session-configurable mappings. Multi-Kempston setups (multiple Kempston interfaces in parallel for two-player games that supported it) are also supported by remapping additional eZX ports to Kempston I/O addresses.

DivIDE / DivMMC

Mass-storage interfaces for the IDE / SD card protocols. Both addressed via their canonical I/O paths; storage images live in HyperRAM for fast access, with the underlying SD card acting as the persistent store.

ZX Printer

The Sinclair ZX Printer interface, presented to AntOS as a virtual print spool that can render to file or to a connected modern printer.

Currah Microspeech

The Currah µSpeech voice synthesis peripheral, emulated through the audio path. Software that uses Microspeech (Knight Lore's voice samples, Cyclone, Currah's own demos) produces the same output it would on real hardware.

Multiface

The Romantic Robot Multiface 1 / 128 / +3 / +3E "freezer" peripherals can be emulated as a session-toggleable feature. Snapshots taken via Multiface produce snapshot files in standard formats (see Snapshot formats below).


Display output

The Classic image's display output is 1080p like the Next-compatible image — see Nextgen § Display output for the integer-scaling pipeline and CRT simulation options. Specific to the Classic image:

Per-model refresh rate

  • PAL Spectrum models (48K, 128, +2, +2A, +3, Pentagon, Didaktik): exact 50.080 Hz, output at 1920×1080@50Hz via HDMI
  • NTSC variants (Timex TS2068): 60 Hz output at 1920×1080@60Hz
  • Pentagon at 50 Hz with no contention: exact Pentagon timing preserved

The native Spectrum framebuffer is rendered at its model-specific resolution (256×192 standard ULA, 512×192 Timex hires, etc.) and integer-scaled to 1080p with optional CRT simulation overlay.

Border colour treatment

The Classic image's display output preserves the model's border behaviour exactly — including the 5-pixel-precision border colour changes that demos use for raster effects, and the border-colour writes from games' loading screens. At 1080p the border fills the 60 pixels of vertical padding (above/below the 960-pixel content area at 5× ULA scaling) and the 320 pixels of horizontal padding on each side.

Simultaneous RGB output

As with the Next-compatible image, the analogue RGB output runs in parallel with HDMI. CRT enthusiasts get authentic scanline timing on a connected CRT while the HDMI output drives modern displays.


Storage: tape, disk, cartridge

The Classic image presents virtual peripherals to the emulated machine but stages all the underlying data through HyperRAM and SD for speed and convenience.

Tape image loading

.tap, .tzx, .pzx tape image formats are loaded from SD into HyperRAM at session start and presented to the Classic image as a virtual cassette interface. Tape loading speed is HyperRAM-fast instead of cassette-slow: multi-load games and demos with mid-program tape stops complete instantly, with no audible "loading screen" delay.

For users who specifically want the original loading-screen experience (some demos and games have iconic loading screens that take 4–6 minutes on real tape), an optional "tape playback timing" mode emits the loading audibly at the original timing through the audio path, with the screen colours pulsing as on real hardware. Toggleable per session.

Disk image loading

.dsk, .trd, .scl (TR-DOS), .mdr (Microdrive), .ipf floppy disk formats are loaded into HyperRAM at session start. The +3 / +D / Didaktik / TR-DOS interfaces present the disks to the running software at HyperRAM speed (so disk seek and read take milliseconds instead of seconds). Multi-disk games flip sides essentially instantly.

Cartridge swaps

Interface 2 cartridges live in HyperRAM (see ROM in HyperRAM above). Selecting a different cartridge at the AntOS command line is a memory-controller remap, not a load.

Snapshot formats

The Classic image supports the standard Spectrum snapshot formats:

  • .sna — 48K and 128K snapshot format, full RAM + register state
  • .z80 — most common snapshot format, supports all models, multiple versions
  • .szx — extended format used by ZX Spectrum Next, supports per-model state including paging, ULA mode, AY state

Snapshots can be loaded and saved at any point via AntOS. The hardware snapshot ring (32+ slots in HyperRAM, see Nextgen § Snapshot / quick-save ring) captures the full simulated-system state per slot, with the saved data interchangeable with software emulators via export to .z80 or .szx.


Performance: choice of authenticity

The Classic image's central design choice is authenticity over speed. Unlike the Next-compatible image (which offers turbo mode beyond 28 MHz), the Classic image runs at the per-model nominal clock and stays there. The Z80NG's NextReg $07 speed control is ignored — software that pokes $07 thinking it's running on a Next gets a no-op (reads still report the current speed; writes are silently dropped).

Why this trade-off:

  • Almost all pre-Next Spectrum software depends on cycle-exact timing. Speeding up the CPU breaks more software than it helps
  • The Spectrum's user-facing performance is fine for what these models do — the games and demos written for the original hardware were designed around the original speed
  • The eZX has a faster image (Next-compat in turbo mode) and a faster CPU (eZX primary) for users who want speed; the Classic image stays focused on authenticity

For software development on the Classic image, the Z80NG hardware debug subsystem is fully available — breakpoints, watchpoints, single-step, register inspection, branch trace, full-instruction trace through HyperRAM debug ring. The debug capability is better than any real classic-Spectrum debugger ever was. See Z80NG § Debug across the three images for the per-image debug story.


What stays the same — the compatibility ledger

The Classic image's compatibility promise, summarised:

Behaviour eZX Classic
Per-model Z80 clock (3.5 / 3.58 / 7 MHz) Identical
ULA contention pattern per model Bit-exact match
Floating bus behaviour Bit-exact match
Memory paging (per-model) Identical to original
All ROM-resident routines and timing Identical
All undocumented Z80 opcodes and side effects Identical
Interface 1 (Microdrive) timing Bit-exact match
Interface 2 cartridge access Identical
Kempston / Sinclair / Cursor joystick protocols Identical
DivIDE / DivMMC behaviour Identical
ULAplus / Timex hires / Pentagon 8×1 (per applicable model) Bit-exact reproduction of each
Border colour timing for raster effects Bit-exact match
Snow effect Reproducible
Tape loading edge timing Bit-exact at original speeds; fast-load mode optional

Anything that any pre-Next Spectrum software examines reads the same as on the corresponding real hardware. Anything that any pre-Next Spectrum software measures by timing reads the same as on the corresponding real hardware. Improvements appear only as faster boot, faster load (with optional original-speed mode), better visible output quality, more debug capability, and the convenience of having every classic model selectable from one machine.


Future ideas

Possibilities not yet committed but worth recording:

  • Additional models. SAM Coupé as a Spectrum-adjacent option (different chipset but related lineage), or other regional clones (Hobbit, Hobby, Leningrad, ATM Turbo) that share the Spectrum core but extend or modify it
  • 128K Spectrum at higher clock for compatibility-preserving acceleration. Same idea as the Next's "+1 wait state at 28 MHz" approach — let users opt in to a 7 MHz mode that's mostly cycle-accurate but with wait states matching the additional load. Would break some software but accelerate the rest. Opt-in only
  • Persistent disk / tape state. Tape images and disk images modified during a session can be auto-saved back to SD at session end, preserving game saves and program edits across sessions
  • Multi-tape projects. Multi-disk games with separate save tape would benefit from staging both data tapes and save tapes in HyperRAM simultaneously, with hot-swap between them
  • Audio replay. The Currah Microspeech, AY-3-8912 (128K models), and tape-loading audio routes through Pulse's high-quality DAC chain — see Nextgen § Audio
  • Multi-player adapters. Two-player joystick splitters, Sinclair joystick adapter cards, Cheetah 125+ adapters — could be selectable as session peripherals

These are out of scope for the initial Classic image release. The first release targets every supported model with cycle-accurate behaviour, the three enhanced video modes (ULAplus, Timex hires, Pentagon multicolour), the standard peripheral set, and 1080p display output.

Important: The eZX Spectrum board is at early design/prototype stage, everything you see here is subject to change.