velxio/test/test_intel
David Montero 479b52634e test_intel: phase C extension — 8259 PIC and 8253 PIT
Two long-deferred Phase C chips, both clean-room from public Intel
datasheets. These complete the support-chip ecosystem needed for
real interrupt-driven 8080/Z80/8086 software on the canvas.

8259 PIC (~280 LOC, single-master subset):
- Full ICW1..ICW4 init sequence with branching on single/cascade
  and ICW4-needed flags.
- IRR/ISR/IMR registers; OCW3 read-back; OCW1 mask write.
- Priority-based INT (lower IRQ# = higher priority, fully-nested);
  pre-emption when a higher-priority IRQ arrives during a lower-
  priority ISR.
- INTA falling-edge → drives vector_base + IRQ# on D bus.
- Non-specific (0x20) and specific (0x60..67) EOI.
- Cascade-master/slave routing NOT implemented (single master is
  sufficient for 95% of demos).
- 7/7 tests passing.

8253 PIT (~210 LOC, Modes 0/2/3 subset):
- Three independent 16-bit counters with own CLK/GATE/OUT pins.
- Mode 0 (interrupt on terminal count) for one-shot timers.
- Mode 2 (rate generator) for system tick.
- Mode 3 (square wave, decrements by 2) for PC-speaker tone.
- Modes 1/4/5 coerced to Mode 0 (rare in practice).
- Full RW mode set: LSB-only / MSB-only / LSB-then-MSB / latch.
- GATE-low pauses the countdown.
- 4/4 tests passing.

Tests: total test_intel 99→110 passing (+11). 0 failed. 11 todo.
Master plan doc updated: Phase C extension done; Phase G still
deferred.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 20:44:17 +02:00
..
autosearch test_intel: phase C extension — 8259 PIC and 8253 PIT 2026-04-30 20:44:17 +02:00
roms test_intel: phase F — software validation (CPUDIAG + ZEXDOC pass) 2026-04-30 20:44:17 +02:00
scripts autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00
src test_intel: phase E — 8086 ISA expansion 2026-04-30 20:44:17 +02:00
test_4004 test_intel: complete Intel 4004 ISA 2026-04-30 03:38:11 +02:00
test_4040 test_intel: complete Intel 4040 new instructions 2026-04-30 03:44:01 +02:00
test_8080 test_intel: phase F — software validation (CPUDIAG + ZEXDOC pass) 2026-04-30 20:44:17 +02:00
test_8086 test_intel: fix 8086 MOV r/m,imm encoding (0xC6/0xC7) 2026-04-30 20:44:17 +02:00
test_buses test_intel: phase C extension — 8259 PIC and 8253 PIT 2026-04-30 20:44:17 +02:00
test_z80 test_intel: phase F — software validation (CPUDIAG + ZEXDOC pass) 2026-04-30 20:44:17 +02:00
.gitignore autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00
00_README.md test_intel: final status — 98/109 passing including CPUDIAG and ZEXDOC 2026-04-30 20:44:17 +02:00
package-lock.json autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00
package.json autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00
vitest.config.js autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00