Please, check our SMD/THT services - smd.lotharek.pl; from idea to ready devices
Please, check our SMD/THT services - smd.lotharek.pl; from idea to ready devices
Technical data:
DISCLAIMER !!
Since firmware 1.20 configuration is done via OSD
Before firmware 1.20
| MODE | Beeps | CPU / Turbo | ULA PLUS | RAM | beeper | AY | ROM | |
| 1 | 48 orginal | 1 short | Z80 3,5 | 0, S | 48 | 1 | 0 | 48 |
| 2 | 48_TURBO | 2 short | Z80S 3,5 / 14 | 1 | 48 | 1 | 1 | GOSH |
| 3 | PENT_BASE | 3 short | Z80 3,5 / 7 | 0 | 512 | 1 | 2 | PENT |
| 4 | PENT_TURBO | 4 short | Z80S 3,5 / 14 | 0 | 512 | 1 | 2 | PENT |
| 5 | 128 | 1 long, 1 short | Z80 3,5xx | 0, S | 128C | 0 | 1 | ORG |
| 6 | 128_MAX | 1 long, 2 short | Z80 3,5xx | 1 | 128C | 0 | 2 | BUG FIX |
| 7 | AMSTRAD +3 | 1 long, 3 short | Z80 3,5xx | 1 | 128C | 0 | 1 | +3 |
| 8 | TIMEX 2048 (since 1.12 firmware) | 1 long, 4 short | Z80 3,5 | 1 | 48 | 1 | 1 | 2048 |
Hardware layout: (1.5B) - version offered is 1.5C - few minor changes related to fpga pin mapping thus layout may differ a little bit.
Kraken has built in dedicated keyboard controller, that co-oexists with zx spectrum keyboard scanning / reading routine. Please, read about extra features and keyboard usage :
Q: How can i upgrade Kraken`s firmware ?
A: Simple. All You need is regular USB-C cable (good quality please!). Kraken has built in JTAG USB bridge programmer. Do not buy any external programmer! NOT NEEDED !
WARNINGS: ( Thanks to Rene Egmond !)
Just follow this manual: https://lotharek.pl/files/Kraken/FPGA_FLASH.pdf
Q: Where can I download KRAKEN firmware ?
A: FILES tab above :-)
A: Phone/pc/mac with TAP/TZX player
Q: What are diffrence between SIZIF and Kraken ?
A: Very good question...Unfortunatelly, I do not have Sizif to compare directly, but along with KARABAS, ZX UNO and Mist Core, SIZIF was my big inspiration. I really do admire creators of above devices, but I wanted to have sth in between all of them. So, please find below my observations (judging from the schematic and pictures)
Q: I WANT TO MAKE MY OWN VIDEO CABLE/WHAT IS PINOUT OF DIN9 ?
A: Sure. Please find it below:
The connector used by KRAKEN is very similar to Sega Genesis (or Mega Drive) Model 2. Both sync/composite pins (4,5) ae COMPOSISTE_SYNC connected as different cables and adapters are known to use one or the other pin. Please, use only one of them. Make sure other stayes unconnected.
And..one more:
No extra elements needed inside cable
NO CAPS, NO RESISTORS
All elements needed are at KRAKENS PCB already
Best effects one can obtain following direct scart connections :
| SIGNAL | MICRO_DIN_9 | SCART |
| RED | 7 | 15 |
| GREEN | 3 | 11 |
| BLUE | 1 | 7 |
| AUDIO_LEFT | 9 | 2 |
| AUDIO_RIGHT | 8 | 6 |
| SYNC | 4 or 5 ( ONE PIN ONLY) | 20 |
| BLANK (RGB SWITCH) | 2 | 16 |
| GROUND | shield | 4,18 (at least two wires) |
HISTORY: (3 years at few pictures)
rev 1.0
rev 1.1A
rev 1.2 (2025-05-10) - CODENAME "KRAKEN"
rev 1.3
rev 1.4 - added AVR
rev 1.5 (a,b)

rev 1.5 c: - present version
Q. Tell me more about KRAKEN ?
This is a SystemVerilog/Verilog FPGA implementation of a ZX Spectrum computer, supporting multiple machine variants and a rich set of peripherals. The design targets an FPGA board (Rev B/C variants) with two clock inputs (28 MHz and 28.37516 MHz), external SRAM, a Z80 CPU socket, and analog video/audio outputs. The architecture is centered around a ULA (Uncommitted Logic Array) replacement that handles video generation, memory management, CPU clocking, I/O ports, and sound mixing — essentially everything the original Sinclair ULA did, plus significant enhancements.
The 3-bit MODE input selects one of 8 configurations:
| MODE | Machine | Turbo | Extras |
|---|---|---|---|
| 000 | ZX Spectrum 48K | None | AY, snow emulation |
| 001 | ZX Spectrum 48K | 7 MHz (switchable) | ULAplus, TurboSound, softcore Z80 |
| 010 | Pentagon 128 | 7 MHz (switchable) | FM synth, SAA1099, Covox, SounDrive, TurboSound |
| 011 | Pentagon 128 | 14 MHz (switchable) | FM synth, SAA1099, Covox, SounDrive, TurboSound |
| 100 | ZX Spectrum 128K | None | AY, snow emulation |
| 101 | ZX Spectrum 128K | None | ULAplus, Covox, SounDrive, TurboSound |
| 110 | ZX Spectrum +3 | None | AY, TurboSound |
| 111 | TIMEX2048 | 7 MHz (switchable) | ULAplus, softcore Z80 |
Additionally, there is a Game Mode (activated by Symbol Shift + G) which forces a barebones 48K configuration with only beeper sound, intended for maximum compatibility with original software.
main (MAIN.sv)The central integration module. It instantiates all subsystems, handles clock selection, configuration management, keyboard shortcut processing, reset logic, and the hardware/softcore Z80 bus multiplexing.
Key architectural decisions:
A, D, IORQ_N, MREQ_N, etc.) are bidirectional — they can be driven by either an external Z80 chip or the internal T80 softcore, selected by Z80_FPGA_ENABLE.cpu_bus SystemVerilog interface carries active-high registered versions of all CPU signals, sampled on negedge ZEGAR for consistent timing.video The video module is the master timing generator. From the 28,XX MHz master clock, it produces the entire clock hierarchy:
clk14 (14 MHz), clk7 (7 MHz), clk35 (3.5 MHz) — derived from the horizontal counter hc0[0..2]ck14, ck7, ck35, ck175 — single-cycle clock enables for synchronous designclk12_5hz and lower — derived from a blink counter for cursor/flash timingTiming parameters differ per machine (48K: 448 total H pixels, 312 lines; 128K: 456×311; Pentagon: 448×320), matching the original ULA timings.
Handles CPU clock generation with contention emulation, turbo mode support, interrupt generation, and reset sequencing.
Contention model: Faithfully implements the original Spectrum memory contention — the CPU is stalled when accessing contended memory pages during specific horizontal counter phases. This is critical for software that relies on exact cycle timing (many games and demos do). Contention is disabled in turbo modes and on Pentagon.
Turbo modes: TURBO_7 runs the CPU at 7 MHz, TURBO_14 at 14 MHz. The turbo_wait mechanism ensures that memory and I/O accesses still take the correct number of cycles by inserting wait states.
INT generation: Machine-specific interrupt timing (48K: line 248 col 0; 128K: line 248 col 4; Pentagon: line 239 col 322). Interrupt length also varies.
The memory subsystem manages a shared external SRAM with prioriterized access between CPU, video, and ULAplus palette reads/writes.
Address mapping supports:
port_7ffd: 8 pages × 16KB in top 16KB)port_dffd)port_1ffd: all-RAM configurations)
RAM ACCES priority:
Generates standard ZX Spectrum video output (256×192 active area with borders). Supports:
port_ff_data) — returns the currently-being-read attribute or bitmap byte, as the original ULA didThe screen controller uses a 4-step read pipeline per character cell: attribute → bitmap → (ULAplus ink) → (ULAplus paper).
ports Implements the classic Spectrum port decoding:
Implements the ULAplus extended color mode via ports #BF3B (address register) and #FF3B (data). The palette is stored in external SRAM at a dedicated address range ({2'b00, 3'b111, 8'b11111111, 6-bit addr}), giving 64 palette entries with GRB332 color encoding.
TurboSound: Dual AY-3-8912 PSG chips with registered address decoding and chip select via register #FF bit 0. All control signals are registered to improve timing. Generates 6 audio channels (A/B/C × 2 chips).
AY-3-8912: Full PSG implementation with envelope generator, noise generator, and I/O ports.
SAA1099 : Philips SAA1099 sound chip emulation (6 channels, stereo). Active on port #FF writes when enabled.
TwinFM / TSFM: Dual Yamaha YM2203 (OPN) FM synthesis chips using the jt03 core. Provides FM sound on left and right channels. Accessible via standard TurboSound-FM port addresses (#BFFD/#FFFD) with chip selection.
Covox & SounDrive: Simple 8-bit DAC interfaces. Covox on port #FB (mono, written to all 4 channels). SounDrive 1.05 on ports #0F, #1F, #4F, #5F (4-channel stereo).
Mixer : All audio sources are summed using 17-bit sigma-delta (1-bit) DACs:
Implements an active keyboard matrix scanner that cycles through all 8 half-rows at a derived clock rate. The scanned state is stored in registers and combined based on the CPU's address lines (mimicking the original ULA's keyboard multiplexing). Special key combinations (Symbol Shift + letter) are detected for system functions.
A 3-state FSM (BUS_OWNED → REQUESTING → BUS_FREE) that manages the transition between the external Z80 chip and the internal T80 softcore. When softcore mode is enabled, it asserts BUSRQ to the external Z80, waits for BUSAK, then takes over the bus.
rom_control (ROM_controller.v)Maps the ROM address lines based on machine type, Game Mode slot selection, and DiagnoROM mode. Supports up to 16 Game Mode ROM slots.
On-Screen Display overlay showing current mode/turbo status. Active briefly after reset and during key presses.
A small tune player (square wave sequencer) that plays a short jingle when turbo mode is activated. Plays a sequence of F4, F#4 notes with specific timing.