Zx Spectrum Vga -
void vga_output() while(1) if (frame_ready) // Generate VGA frame using line doubling for (int y=0; y<480; y++) src_y >= 192) output_black_line(); else output_line_doubled(framebuffer[src_y]);
Abstract The ZX Spectrum (1982) produces a composite video signal (PAL or NTSC) with non-standard timing. Direct connection to modern VGA monitors fails due to different sync polarities, scan rates, and voltage levels. This paper presents a practical, low-cost VGA interface using discrete logic and an inexpensive microcontroller. The design converts the Spectrum’s TTL-level video output to VGA-compatible RGBHV, handles the necessary scan rate conversion (50.0 Hz to 60 Hz vertical), and doubles the horizontal line count to meet VGA’s minimum 31.5 kHz horizontal scan rate. A complete circuit diagram, timing analysis, and construction notes are provided. 1. Introduction The ZX Spectrum outputs a 15.625 kHz horizontal scan (for 50 Hz PAL) or 15.75 kHz (60 Hz NTSC). VGA requires at least 31.5 kHz H-sync and 60 Hz V-sync. Direct connection damages monitors and produces no image. Therefore, a line-doubler and frame-rate converter is required. This design uses a fast SRAM frame buffer, a pixel clock generator, and a microcontroller (e.g., RP2040 or ATMega328) to read the Spectrum’s video memory and generate proper VGA timings. 2. ZX Spectrum Video Characteristics (48K / 128K model) | Parameter | PAL Spectrum | NTSC Spectrum | |------------------------|---------------------------|--------------------------| | Horizontal frequency | 15.625 kHz | 15.75 kHz | | Vertical frequency | 50.125 Hz | 60 Hz | | Active pixels (H) | 256 | 256 | | Active lines (V) | 192 | 192 | | Border area | 48 lines top/bottom, 48 pixels left/right (approx) | similarly | | Pixel clock | ~7.0 MHz (derived from CPU 3.5 MHz x2) | ~7.16 MHz | | Video output | Composite (UHF/modulated) + TTL RGB via edge connector (128K models) | same | | Sync | Negative-going, embedded in composite | same | zx spectrum vga
Example for red channel: