ZX Spectrum 128

From Sinclair Wiki
Jump to navigation Jump to search
  • This article is about the original Spectrum 128. For other Spectrum models with 128KB of RAM see ZX Spectrum 128K models
Infobox: ZX Spectrum 128
Manufacturer Sinclair Research / Investrónica
Mfg. volume
CPU Z80A @ 3.5469MHz
ROM 32KB
RAM 128KB
as pages 8×16KB
Gfx Res 256×192
Gfx Colours 15 (2 per 8×8 cell)

The ZX Spectrum 128 was jointly developed by Sinclair Research and Investrónica under the code-name "Derby". The Spanish version was released first in September 1985, with the UK version following in January 1986. The 128 is often referred to by the nickname "Toastrack", referring to the large external heatsink attached to the right-hand side of the computer.

Case Design

The industrial design was by Rick Dickinson, who had previously done the industrial design for the ZX80, ZX81, ZX Spectrum 16K/48K and ZX Spectrum +. One of the iconic elements of the design, brought over from the 16k/48k design, is the coloured stripes symbol at the bottom right of the keyboard in the colours Red, Yellow, Green and Cyan. The exact Pantone colour values couldn't yet be retrieved. The angle of the stripes was measured as being at 24-degrees.

Hardware

  • Processor: Zilog Z80A microprocessor clocked at 3.5469MHz.
  • ROM: 32KB ROM, arranged in 2 pages of 16KB.
  • RAM: 128KB of Dynamic RAM, arranged in 8 pages of 16KB.
  • Graphics: 256 × 192 pixels, 16 colours, attribute based. See Spectrum Video Modes.
  • Sound: AY-3-8912 3 channel, 8 octave Programmable Sound Generator and "beeper". Modulated onto video signal.
  • Keyboard: 58 plastic keys above a rubber pad and plastic membrane. Optional editor keypad.
  • I/O: Software controlled RS232 serial port. Keypad Port. Tape In (ear) and Tape Out (mic). Expansion I/O port.

Timings

Paging

The memory space of the ZX Spectrum 128 is divided into four 16KB pages. The 32KB of ROM and 128KB of RAM can be paged into the memory space as shown in the diagram below:

0xFFFF
-
0xC000
Bank 0 Bank 1 Bank 2 Bank 3 Bank 4 Bank 5
(screen 0)
Bank 6 Bank 7
(screen 1)
0xBFFF
-
0x8000
Bank 2
0x7FFF
-
0x4000
Bank 5
(screen 0)
0x3FFF
-
0x0000
ROM 0 ROM 1

Paging is controlled by performing I/O writes to ports 0x7ffd. The paging logic decodes the address bus partially (uses A15 and A1 lines only), so the exact port is 0xxx xxxx  xxxx xx0x.

The bits are described in the table below:

Port Bit
7 6 5 4 3 2 1 0
0x7ffd Disable Paging ROM Bank Active Screen RAM Bank

HAL bugs

Reads from port 0x7ffd cause a crash, as the 128's HAL10H8 chip does not distinguish between reads and writes to this port, resulting in a floating data bus being used to set the paging registers.

Due to a bug either in the 128's HAL10H8 chip or in the PCB, memory banks 1, 3, 5 and 7 are contended (and the rest uncontended) as opposed to 4, 5, 6 and 7 as documented in the service manual. Whereas the +2 (with grey case) shares this behaviour, the +2A and +3 apply contention to pages 4–7 instead. The paging scheme documented in the manual would have been implemented as was (presumably) originally intended had the B0 and B2 inputs to the HAL10H8 been reversed, either on the Spectrum 128 PCB or in the logic of the HAL itself.

Later grey +2s were shipped with an updated HAL chip which corrects there issue whereby reads of port 0x7ffd would crash the machine[1]. It is not known whether this also updated the contention scheme to contend on pages 4–7.

The Spectrum 128 suffers from a "rain" effect when the Z80's I register is set to a memory address within the region of 0x4000–0x7fff. Velesoft's "Umbrella" GAL corrects this rain effect as well as the crash that results when reading from port 0x7ffd, although it does not change the set of pages that are contended. For the rain effect to be corrected, a flying lead must be connected between the Z80's RFSH signal and the GAL.

Keypad

The keypad released for Investrónica's Spanish 128 has been found to be incompatible with at least some UK machines. Issue 6K boards provide the wrong voltage to the keypad. This is fixed in Issue 6U by replacing R137.