Machine Types
This document summarizes the machines and models available in Klive IDE.
Choosing a machine
The Machine | Machine Type menu lists only your favourite models, followed by Select machine… (Cmd+Shift+M on macOS, Ctrl+Shift+M on Windows and Linux). If the machine you are running is not a favourite, the menu still shows it, ticked, below the favourites.
Select machine… opens a dialog with every model Klive emulates:
- The left side lists the machine types; open one to see its models. The filter box at the top matches names and hardware facts, so typing
128K,NTSC,diskorOZnarrows the list. - Selecting a model shows its hardware details on the right: CPU and clock, ROM and RAM, the screen (resolution, colours, the visible area with its border), frame timing, sound devices, storage and input.
- Switch to … (or double-clicking a model, or pressing Enter) switches the emulator to it.
The dialog also edits the menu. Click the star next to a model, or Add to Machine type menu above its details, to make it a favourite. The Favourites section at the top lists them in menu order: drag them, or use the arrow buttons (Alt+↑ / Alt+↓), to reorder them, and use the separator button to put a menu separator after an item. Save keeps the changes; Restore default favourites brings back the original list. Favourites belong to you, not to a project.
ZX Spectrum 48K
Machine ID: sp48
Available models:
pal: The original ZX Spectrum 48K model with PAL video output.ntsc: The original ZX Spectrum 48K model with NTSC video output.pal-16k: The original ZX Spectrum 48K model with PAL video output and 16K RAM.
ZX Spectrum 128K
Machine ID: sp128
One machine with two models. Both run the ZX Spectrum 128K’s ROMs and have its $7FFD paging and
AY chip; they differ in timing:
sp128: The original ZX Spectrum 128K.pentagon: The Pentagon 128, a Russian 128K clone much of the demoscene writes for. It runs at 3.5 MHz with a longer frame (224 T-states by 320 lines, 71,680 T-states, about 48.8 frames per second), has no memory or I/O contention, and has no floating bus: an unattached port reads$FF.
Which one to pick. Choose the Pentagon for software written for it, such as demos whose effects are timed to its frame, or to check that your own code runs on both machines. Choose the 128K for everything else. Running, debugging, injecting code, the tape Loader, snapshots and Klive state files work the same on both.
The Pentagon has the Beta 128 disk interface: two drives (A and B) that take TR-DOS disk images
(.trd and .scl), and TR-DOS itself. Klive cannot ship the TR-DOS ROM, so you name your own copy
under Settings > Machine > TR-DOS ROM; until you do, the Pentagon runs without its disks. See
Using TR-DOS Disks on the Pentagon 128.
A .z80 or .szx snapshot of a Pentagon 128 opens on the Pentagon model. A 128K snapshot opens on
the 128K model, unless your project already uses the Pentagon: a 128K .sna file does not say
which of the two machines it came from. A snapshot saved from the Pentagon is written as a Pentagon
128.
ZX Spectrum +2A/+3/+2E/+3E
Machine ID: spp3e
One machine with two families of ROMs. The hardware is Amstrad’s +2A/+3 (the gate array, the
$7FFD/$1FFD paging, the floppy controller and the AY chip) in every model; the models differ in
their drives and in the ROMs they boot.
The +2E/+3E models boot Garry Lancaster’s +3E ROMs, a modern replacement for the Amstrad ones:
nofdd: ZX Spectrum +2E (without floppy disk drive).fdd1: ZX Spectrum +3E (with a single floppy disk drive).fdd2: ZX Spectrum +3E (with two floppy disk drives).
The +2A/+3 models boot Amstrad’s original ROMs, unmodified:
plus2a: ZX Spectrum +2A (v4.1 ROMs, no floppy disk drive).plus2a-es: ZX Spectrum +2A (Spanish v4.1 ROMs).plus3-fdd1,plus3-fdd2: ZX Spectrum +3 (v4.1 ROMs, one or two floppy disk drives).plus3-v40-fdd1,plus3-v40-fdd2: ZX Spectrum +3 v4.0 (the 1987 ROMs of the first +3s).plus3-es-fdd1,plus3-es-fdd2: ZX Spectrum +3 (Spanish v4.1 ROMs).
Which one to pick. Choose a +2A or +3 model when a program must behave exactly as on the
original machine: software that calls the Amstrad ROM directly, or needs a particular ROM version
or the Spanish ROMs. Choose a +2E or +3E model for everyday use: the +3E ROMs are compatible with
the Amstrad ones and add their own improvements. Running, debugging, injecting code, the tape
Loader, .dsk disks, snapshots and Klive state files work the same on every model.
A .z80 or .szx snapshot of a +2A or +3 opens on a +2E/+3E model by default, with a warning that
it runs on the +E ROMs. When your project already uses a +2A or +3 model, the snapshot stays on it
and the warning goes. A snapshot saved from a +2A or +3 model is written as a +2A or +3.
ZX Spectrum Next
Machine ID: zxnext
Available models: Only the original ZX Spectrum Next (KS2) model is available; it is still in development.
Timex TC2048/TC2068/TS2068
Machine ID: timex
Available models:
tc2048: The Timex Computer 2048, a 48K Spectrum made in Portugal, whose ULA is Timex’s SCLD.tc2068: The Timex Computer 2068, the European 2068 (PAL, 50 Hz).ts2068: The Timex Sinclair 2068, the American 2068 (NTSC, 60 Hz).
Every model runs 48K software, and adds the SCLD’s features:
- Screen modes, selected by port
$FFbits 0-2:0the normal screen;1a second screen at$6000(attributes at$7800);2extended colour, one attribute byte for every 8 × 1 pixels, at$6000plus the pixel byte’s offset;6a 512 × 192 two-colour screen, whose even columns come from$4000and odd columns from$6000. Bits 3-5 pick that mode’s ink (the paper is its complement, and the border shows the paper colour); the TC models show these colours BRIGHT, the TS2068 does not. Reading port$FFreturns what was written. - Interrupt control: port
$FFbit 6 set stops the frame interrupt.
The CPU runs at the SCLD’s 3.528 MHz. The TC2048 and TC2068 keep the 48K’s frame (224 T-states by 312 lines); the TS2068’s is 262 lines (58,688 T-states, 60 frames a second).
The TC2048 has a built-in Kempston joystick port, driven by joystick 1’s bindings (Machine > Input > Kempston Joystick).
The TC2068 and TS2068 add:
- Bank switching in 8K chunks. Each of the eight 8K chunks of the address space comes from the
HOME bank (the 16K ROM and 48K of RAM), or - when its bit in port
$F4is set - from the cartridge (the DOCK) or, with port$FFbit 7 set, from the 8K Extension ROM (EXROM). The screen always comes from HOME. The memory and disassembly views and the breakpoints name the chunksH0-H7,D0-D7andX0-X7. - An AY-3-8912 sound chip on ports
$F5(register select) and$F6(data), clocked at 1.764 MHz, with the PSG panel. - Two joysticks, read through the AY’s register 14 (Machine > Input > Joysticks).
- Cartridges: Machine > Cartridge > Insert Cartridge… puts a
.dckfile into the DOCK, and the media strip shows it. The machine restarts, because its ROM looks for a cartridge when it starts. - Ports
$FE,$F4,$F5,$F6and$FFare decoded on their full low byte.
ROMs. Klive cannot ship Timex’s ROMs. Name your own copy under Settings > Machine (the
TC2048 ROM, TC2068 ROM or TS2068 ROM option, shown while that model runs): the TC2048’s is 16K; a 2068’s is one 24K file, its 16K HOME ROM
followed by its 8K EXROM. Until you do, the machine boots the Sinclair 48K ROM (a 2068 then has no
EXROM). Klive knows the TS2068 ROM (CRC-32 48004230): with it, running and debugging code, and
loading tapes from the IDE, use its own main loop and tape routines. With a 2068 ROM Klive has not
seen, the machine runs, but the IDE cannot start a program or a tape in it.
Running, debugging, injecting code (code built for the 48K runs as it is), tapes, snapshots and Klive state files work on every model.
Snapshots. A .szx or .z80 snapshot of a TC2048, TC2068 or TS2068 opens on its model, with its
screen mode, its chunk map and the 2068s’ AY; a .szx also keeps the cartridge’s pages. A Timex
machine saved as .sna loads as a 48K, and Klive names what it loses.
Scorpion ZS-256
Machine ID: scorpion
Available models:
zs256: The Scorpion ZS-256, a Russian 128K-compatible machine with 256K of RAM and a built-in Beta 128 disk interface.
The Scorpion runs on the ZX Spectrum 128K’s core, and adds:
- 256K of RAM in sixteen banks. Port
$7FFDpages banks as on the 128K; port$1FFDbit 4 adds 8 to the bank at$C000(banks 8-15), bit 0 puts RAM bank 0 at$0000, and bit 1 puts the service monitor ROM there.$7FFDbit 5 locks$7FFDonly, never$1FFD. Both ports are decoded on more address lines than the 128K’s. - Four ROMs: the 128K editor, 48K BASIC, the service monitor and TR-DOS. The memory and
disassembly views and the breakpoints name them
R0-R3, and the banksB0-B15. - The Beta 128 disk interface, built in, with two drives (
.trdand.scldisks), as on the Pentagon 128 - see Using TR-DOS Disks on the Pentagon 128. - Timing: 3.5 MHz, the 48K’s frame (224 T-states by 312 lines, 69,888 T-states), and no memory or I/O contention. Unattached ports read the floating bus.
ROMs. Klive cannot ship the Scorpion’s 64K ROM. Name your own copy under Settings > Machine >
Scorpion ROM. Until you do, the Scorpion boots the ZX Spectrum 128K’s ROMs, the service monitor’s page reads
$FF, and TR-DOS comes from the TR-DOS ROM you name under Settings > Machine > TR-DOS ROM. With the 128K
ROMs, running and debugging code, the Tape Loader and booting a disk work as on the 128K and the
Pentagon. With the Scorpion’s own ROM the machine runs, but the IDE cannot start a program, a tape or
a disk in its editor, which Klive does not know; load them by hand.
Snapshots. A .szx or .z80 snapshot of a Scorpion opens on it with all sixteen banks and
$1FFD. A Scorpion saved as .sna loads as a 128K without banks 8-15, and Klive refuses it while
$1FFD is in use.
Cambridge Z88
Machine ID: z88
Available models:
OZ50: Cambridge Z88 (OZ v5.0B Int.)OZ47: Cambridge Z88 (OZ v4.7)OZ40: Cambridge Z88 (OZ v4.0 UK)OZ40FI: Cambridge Z88 (OZ v4.01 SE/FI)OZ30: Cambridge Z88 (OZ v3.0 UK)OZ323IT: Cambridge Z88 (OZ v3.23 IT)OZ326FR: Cambridge Z88 (OZ v3.26 FR)OZ319ES: Cambridge Z88 (OZ v3.19 ES)OZ321DK: Cambridge Z88 (OZ v3.21 DK)OZ318DE: Cambridge Z88 (OZ v3.18 DE)
Klive can open, run and debug Z88 snapshots saved by the OZvm emulator; see Using Z88 Snapshots.
Sinclair ZX81
Machine ID: zx81
Available models:
zx81-16k: Sinclair ZX81 with 16K RAM.zx81-1k: Sinclair ZX81 with its own 1K RAM.zx81-64k: Sinclair ZX81 with 64K RAM.zx81-16k-us: The US machine (Timex Sinclair 1000), NTSC, with 16K RAM.zx81-1k-us: The US machine with 1K RAM.
Sinclair ZX80
Machine ID: zx80
Available models:
zx80-16k: Sinclair ZX80 with 16K RAM.zx80-1k: Sinclair ZX80 with its own 1K RAM.zx80-8krom-16k: Sinclair ZX80 with the 8K ROM upgrade (the ZX81 ROM) and 16K RAM.