You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
T-states, M-cycles, half-clock bus timing (opcode latched at T3 rising vs data at T3 falling), WAIT pin vs clock stretching, per-instruction costs, DRAM refresh
Sinclair BASIC 48K — comprehensive reference: what BASIC is (vs Microsoft BASIC), three ROM versions, memory layout, token system with abbreviations, variable types, 5-byte floating-point format, calculator stack (44 operations), parser pipeline, graphics commands (PLOT, DRAW, CIRCLE, POINT, ATTR), sound (BEEP with frequency formula), machine-code bridge (PEEK, POKE, USR), notable quirks (no ELSE, mandatory LET, single-line editor). Worked examples: Mandelbrot, Ode to Joy
Getting started with Z80 assembly: toolchain setup (SjASMPlus + Fuse + VSCode/DeZog), source file structure, 48K memory map, annotated Hello World walkthrough, building pipeline (.asm to .tap/.sna), output formats (SNA/TAP/TZX/TRD/NEX), first debugging session, when to use asm vs C vs BASIC
Calling the ROM from assembly: entry-point landscape, save/restore state (IY = #5C3A, ERR_SP), cookbook for character output, keyboard, screen, BEEP, math via FP calculator, 128K routines (PLAY), AY-3-8912 direct access, ROM-call wrapper macros, when NOT to use ROM
Unified contention reference: why shared DRAM slows the CPU (clock stretch, WAIT, fixed slots), per-model table for all tracks, Ferranti vs gate array patterns, I/O contention, Scorpion Even M1 with T-counted example
NMI and the Multiface: 74LS74 flip-flop hardware, NMI vs INT comparison, 4 NMI-safe code rules, NMI during common operations table, DivIDE/ESXDOS magic button
Disk load with AY music: WD1793 byte budget, Ivan Roshchin concurrency math (Pentagon 48.83 Hz, 9.77 interrupts/rev, 138-byte drift), 3 workaround patterns (music-after-sector / stop-motor resync / custom WD1793 driver), Western DOS comparison
Scorpion ZS-256 frame: 312 lines matching 48K macro timing, +9 T horizontal shift, no contention but Even M1 (RAM fetches on even T), 7 MHz turbo with paper-dependent slot waits
3D on the Z80: the math problem (no hardware MUL/DIV), table-driven quarter-square multiply, 8.8/1.15 fixed-point, Bresenham line draw, rotation matrices, perspective projection with reciprocal table, near-plane clipping, wireframe case study (Elite), filled-polygon case study (Driller/Freescape, 3D Construction Kit, painter's algorithm), isometric (Filmation engine, Knight Lore/Head Over Heels, projection math (x-y, (x+y)/2-z)), raycasting (pseudo-3D), performance budgets, common pitfalls
Entity subsystem, collision, and AI: object pool pattern (8 bytes per entity via the ENTITY struct, 16–32 fixed slots, type=0 sentinel for empty slots — no malloc/free), update ordering, dual-phase erase/draw rendering (prevents "holes" from overlapping entities), four collision algorithms (AABB ~80 T-states/pair, grid broad-phase, pixel-precise 200–500 T-states, attribute-based ~30 T-states as the cheapest), axis-separated tile collision resolution (X then Y), gravity with floor check, one-way platforms, conveyor belts, five AI patterns (FSM with state byte dispatch, fixed-path waypoints with the Manic Miner 7-byte horizontal guardian format, steering toward player, BFS pathfinding — rare and bounded), sprite integration interface
World model architectures: four canonical world models comparison table (single-screen Manic Miner / multi-room persistent Jet Set Willy / scrolling Green Beret / isometric Knight Lore), full Matthew Smith 1024-byte room format byte-offset table (offsets 0–1023, the screen-layout-as-collision-data trick), persistent state implementation pattern (immutable template + mutable state block with 1 bit per collected item), 1-direction vs bidirectional scrolling with camera update code and world-bound clamping, tile-map render pipeline, compression strategies (RLE, column-major + LZ with RCS preprocessing, tile-attribute separation, per-stage ZX0 packing), room transitions
Input and audio integration layer: input normalization across devices (Kempston active-high at port #1F vs keyboard/Sinclair active-low — polarity must be inverted before the OR-merge), edge detection pattern input_edges = input_state AND NOT input_prev, menu repeat timers (instant first response, 20–30 frame delay, then 4–6 frame repeat), redefine-keys UI pattern with Western (KEMPSTON/SINCLAIR/CURSOR/REDEFINE) vs post-Soviet (KEMPSTON/KEYBOARD/REDEFINE) conventions, four places music can live (foreground / ISR / separate ISR / dedicated hardware), 128K bank-switched music ISR pattern (save/restore #7FFD around the player tick), SFX channel-stealing with priority scheme (Channel C reserved for SFX, music's C ducked), memory budgets
TR-DOS programming: ROM banking via port #FF, 9 standard hook codes dispatched at #3D13, file operations (LOAD/SAVE/ERASE/CAT), direct WD1793 sector I/O, catalog reader, demoscene double-buffered streaming from disk
Western DOS programming: +3 DOS RSX calls, ESXDOS hook codes at #0084, NextZXOS extensions, dot command development (8 KB overlays at #2000), API comparison matrix, portable code strategy, runtime DOS detection
The AY Sound: Perception, Emotion, and the Hardware Soul — ABC vs ACB holy war, AY vs YM differences, why real hardware sounds different, psychoacoustics, nostalgia, recapturing the sound
30-year history of ZX music editors — beeper trackers (1985), Pro Tracker lineage (Golden Disk Corp.), VTII / Arkos split, modern cross-platform tools (AT3, VT3)
Native Spectrum toolchain — assemblers and monitors that ran on the Spectrum itself (1982–2000s). Zeus, HiSoft DevPac / GENS-MONS, ALASM+STS, XAS; pre-assembler era; editor workflow evolution; Soviet vs Western toolchain split
SjASMPlus — the de facto standard Z80 cross-assembler. Three-pass assembly, virtual device mode (14 machines), Lua scripting, ZX Spectrum Next Z80N support, complete output directives (SAVESNA/SAVETAP/SAVETRD/SAVENEX), SLD source-level debugging, comparison matrix against every alternative
z88dk — the complete C development kit for the Z80 family. Two C compilers (sccz80 + patched SDCC), classic + newlib libraries, the +target system, the zcc front-end, full ZX Spectrum library API, appmake output formats, mixing C with assembly, worked example
SDCC — the canonical reference for using the Small Device C Compiler standalone. Z80 port history, complete toolchain, Z80-specific flag reference, the stack-based ABI, custom CRT0, .cdb debug format, integration with SjASMPlus, worked bare-metal 48K example, and a comparison vs z88dk-sdcc
Asset Pipeline — the three-stage model (authoring → conversion → integration). Screen graphics (.scr/.sch/.nic), software sprites and Next hardware sprites, fonts (8×8 and FZX), AY music (VTII, Arkos) and 1-bit beeper engines (Beepola, BeepFX), compression (ZX0/ZX1/ZX2/ZX7/MegaLZ/RCS), tile maps, worked Makefile-driven pipeline
Boriel ZX BASIC — the modern BASIC cross-compiler (zxbc) emitting native Z80 machine code. Three-stage pipeline (zxbpp/zxbc/zxbasm), 8-type static type system, SUB/FUNCTION with ByVal/ByRef/FastCall, structured control flow, first-class inline ASM, ROM-binding standard library, full CLI flag reference, all output formats (.bin/.tap/.tzx/.sna/.z80), worked game-loop example, comparison matrix vs z88dk C and pure assembly, decision tree
VS Code Integration — the canonical reference for VS Code as the ZX Spectrum IDE. Extension ecosystem (DeZog, Z80 Macro-Assembler, Z80 Assembly Meter, Hex Editor, Klive IDE, SpectNetIDE). DeZog deep dive — four backends (ZEsarUX, CSpect, MAME, internal simulator), reverse debugging via ZEsarUX history. Build tasks and problem matchers for SjASMPlus / z88dk / Boriel ZX BASIC. Complete worked .vscode/ project setup. Stack comparison (DeZog+SjASMPlus+ZEsarUX vs Klive IDE vs SpectNetIDE), decision tree, best practices, pitfalls
Multiface (One / 128 / 3) (Romantic Robot, 1986–1988) — hardware overlay peripheral: 8 KB ROM + 8 KB RAM paged in via NMI vector fetch at #0066, three model variants with distinct port maps (#9F/#1F for MF1, #BF/#3F for MF128, #3F/#BF for MF3), +3 paging-port back doors (#7F3F/#1F3F), stealth mode, dump-file format (precursor to .z80), Genie disassembler and Lifeguard poke-finder ecosystem, cultural impact on cheat codes and snapshots
ZX Bus — the 56-pin (28+28) expansion edge connector: full pinout, signal groups (address / data / control / interrupts / power), per-model differences (16K/48K vs 128K/+2 vs +2A/+3 — +9V//ROMCS removal, /ROM1OE+/ROM2OE replacement), /ROMCS overlay trick, no /RAMCS, M1-triggered overlays, DMA via /BUSRQ//BUSACK, peripheral stacking order, 12 pitfalls
Video Output — physical video output stage of every Spectrum model. 48K RF-only path (ULA Y/U/V → LM1889 → RF modulator on UHF ch.35/36) vs 128K/+2 TEA2000-based RGB+composite path vs +2A/+3 Amstrad 40077 gate-array path with RGB only; 8-pin DIN 45326 monitor socket pinouts for all three variants (128K TTL RGB vs +2 configurable via LK1-LK8 jumpers vs +2A/+3 with +12V on pins 1/5 and audio on 3); composite video vs composite sync distinction; SCART cable wiring tables (128K needs diode Bright mixing; +2 internal mixing; +2A/+3 requires 330 Ω series R for proper levels); 48K composite mod (LM1889 tap + 2N3904 buffer); S-Video alternative (Redhawk PCB); VGA/HDMI adapters (GBS-8200 with gbscontrol, OSSC, RGB-to-HDMI, ZX-VGA-JOY); Soviet clone composite outputs; 12 pitfalls
Z-Controller — Russian multi-I/O peripheral designed by Alexey Zhabin (KingOfEvil) in 2007. Combines PS/2 keyboard, PS/2 mouse (Kempston Mouse emulation), Nemo IDE-compatible CompactFlash/hard disk, and SPI-mode SD card on a single ZX Bus board. Two-chip architecture: Altera EPM7128 CPLD (port decode + IDE latch + mouse registers) + KR1878VE1 MCU (PS/2 scan codes). Not bootable from SD; software support is Russian-scene-specific (Wild Disk Copier v1.21+, iS-DOS); functionality carried forward into MB03+ Ultimate FPGA and ZX Spectrum Neo
Magnum Light Phaser — Amstrad's 1987 light gun, last first-party ZX Spectrum peripheral. Photo-diode + lens + trigger microswitch; CRT raster-beam detection. Three interface variants: +2/+2A/+3 AUX port (8-pin), 48K/128K Toastrack ZX Bus edge connector + MIC socket box, C64 user port + control port (uses VIC-II hardware light-pen input $D013/$D014). ZX Spectrum ULA has no light-pen register — detection is entirely software-driven (sensor pulse → ULA /INT → software T-state count → per-model calibration table for 48K/128K/+2/+2A/+3). ~15 known Spectrum titles (6 bundled, 9 separately-sold); rebranded variants: Trojan Phazer (white), Cheetah Defender, MARPES — all interchangeable; Stack Light Rifle is incompatible (emulates Kempston joystick). CRT-only — does not work on LCD/plasma/OLED; Sinden/GUN4IR are modern IR-LED-bar alternatives. 12 pitfalls
Writing code for the compressor, not the assembler: why verbose/repetitive code can compress smaller than hand-squeezed code, plus forward vs. backward depack budgeting
Case study: "Hole 17 enigma" (RMDA, 256 B) — self-built CALL-chain engine, stack-pointer-as-plotter rendering, code-as-AY-data, and why nothing in it has a single fixed role
Narrative synthesis of the ZX Spectrum's 40+ year story: five distinct eras (Pre-Spectrum 1972–1981, Sinclair 1982–1986, Amstrad 1986–1992, Post-Soviet clone 1989–2000s, Modern revival 2010s–present), verified dates from canonical Sinclair Wiki source, embedded Mermaid timeline diagram 1976–2022, cultural/economic context for each transition, 5 pitfalls
Navigational hub for hardware models across three tracks: Original/Soviet Clones/New Gen taxonomy, three per-track model tables (7 Original, 10 Soviet clones, 8 New Gen), three cross-track comparison matrices (frame timing, memory architecture, sound capability), "How to Choose a Model" decision matrix with 8 use cases, every model row links to per-model deep-dive article
Platform-specific terminology reference: 100+ terms organized by category (Hardware, Display, Memory, Storage, Software/System, Cultural/Demoscene, Track-Specific), each entry has 2–4 sentence definition with "See X" cross-reference, abbreviations listed both short form (ULA) and full form (Uncommitted Logic Array), 5 pitfalls
See 00_overview/README.md for the section index. All 3 articles complete (F14 series — 4-article plan consolidated to 3 by merging timeline into history per user approval).
MCU design patterns — bus interfacing (memory-mapped/port/IO/DMA), 74HCT vs 74HC level shifting, RP2040 PIO timing-critical I/O, GPIO drive, ring buffers, lock-free SPSC queues, common pitfalls
Complete English translation of Black_Cat's ZX Ports Full Table (BC Info Guide #4, 2008) — all 32 sections verbatim with the original's model-code and function-code legends
Native Toolchain — assemblers and monitors that ran on the Spectrum (1982–2000s): Zeus, DevPac, ALASM, XAS
Cross-Platform Toolchain — modern development on PC/Mac/Linux: SjASMPlus, z88dk, VS Code, emulators, CI/CD
SjASMPlus — the de facto standard Z80 cross-assembler: three-pass assembly, virtual device mode, Lua scripting, Z80N, SLD debugging, every output format
z88dk — the complete C development kit: two compilers (sccz80 + SDCC), classic + newlib, +target system, full ZX Spectrum library API, mixing C with assembly
SDCC — Small Device C Compiler standalone: stack-based ABI, custom CRT0, .cdb debug format, integration with SjASMPlus, when to choose over z88dk