velxio/test/test_intel
David Montero 4aa13897c6 test_intel: Z80 INT handling + promoted todo tests
Z80 chip enhancements:
- Add maskable INT̅ handling. Pin is level-triggered, active-low. The
  on_int watcher tracks line state; step() services at instruction
  boundaries when IFF1=1.
- IM 0/1 vector to 0x0038; IM 2 vectors via I:00 indirection (no
  interrupt-controller hardware on the bus, so we approximate the
  data byte as 0x00 — user code must pre-load the vector table).
- INTA cycle clears IFF1 and IFF2 per Zilog UM008003 p. 24.
- Power-on reset state: chip starts with reset_active=true so the
  RESET̅ rising edge releases the chip (the watcher only fires on
  edges; without an initial-true assumption, setting RESET=false
  was a no-op and the chip executed instructions during the
  test's pre-reset cycles).

Test infrastructure:
- bootZ80 no longer advances time after RESET deassert. Same lesson
  as bootCpu in the 8080 tests — caller may need to poke RAM
  contents BEFORE the chip executes.

5 it.todo tests promoted to passing:
- LDIR copies a memory block from HL to DE
- LD A, (IX+d) reads via IX with signed displacement
- EXX swaps the main register set with the shadow set
- NMI̅ falling edge pushes PC and vectors to 0x0066
- IM 1 + INT̅ vectors to 0x0038

Total test_intel: 60 passing (was 55), 0 failed, 17 todo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 03:53:06 +02:00
..
autosearch autosearch: Intel 4004/4040 spec + reference impls 2026-04-29 22:37:16 +02:00
scripts autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00
src autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +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 autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00
test_8086 autosearch — Research notes for Intel + Z80 custom-chip emulation 2026-04-29 22:24:02 +02:00
test_buses test_intel: Intel 8282 octal latch 2026-04-29 22:51:19 +02:00
test_z80 test_intel: Z80 INT handling + promoted todo tests 2026-04-30 03:53:06 +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: Intel 4004 + 4040 chip implementations 2026-04-29 22:45:34 +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