Files
8bitworkshop/test
Steven Hugg 6811cd92ce chips: pull upstream CIA/NMI and controller fixes
Cherry-pick the upstream bug fixes that apply to the old-generation chip
headers this fork still carries (13 commits, one per fix, each with a
"(cherry picked from commit ...)" trailer):

  m6502:  wrong irq/nmi pipeline bit positions (NMI timing), the NMI
          instruction hijacking fix (nmi_pip widened to 32 bits), and the
          matching codegen template/gen.py changes
  m6526:  PA/PB input latch, port B reads, latch writes in the reload
          cycle, timer B interrupt flags, ICR mask write in the underflow
          cycle, and ICR bit 7 vs. the /IRQ output line
  zx:     Sinclair joystick fire button (was wired to "right")
  cpc:    z80_reset() when loading a .sna, upd765 assert that fired in
          the CRTC demo
  ay38910: envelope shape 15
  i8255:  port output pin mask (used by the CPC)

Left alone (needs a real port, not a cherry-pick): the am40010 CCLK/READY
phase fixes and mode 3, because this fork's am40010_tick() was restructured
to take a tick count for the instruction-stepped Z80 with WAIT accounting.

The fork's probe hooks (logStackPush/Pop, logExec) and the SID register
read-back stay intact.

Also fixed c64 stuck joystick problem:
The keyboard matrix lines are driven by the CIA output latch, not
by the external pin level: since the port read model lets a
grounded joystick line pull an output pin low, using the raw pins
here makes joystick 2 hold a keyboard scan line active (and the
IDE feeds arrow keys to both the joystick and the cursor keys).
Use the latch for output bits, the pin only for input bits.

res/<platform>/*.wasm are rebuilt from chips/wasm/*.c. Note the c64/cpc/zx
blobs also move to a newer clang than the ones previously committed
(109771/93695/84361 bytes), so part of their size change is toolchain, not
this patch.

Verified: base-vs-new screenshots are byte-identical for c64 (hello,
scroll1, test_setirq, musicplayer, allow joymove+key), vic20 (siegegame),
zx (hello, cosmic) and cpc.464 (easy_mode_strings); test-platforms,
test-cli and test-node pass (the one test-node failure, urust
include_bytes!, reproduces with the old wasm).
2026-10-24 13:22:33 +02:00
..
2026-03-05 10:17:05 +01:00
2024-01-04 22:30:53 -05:00
2026-03-05 22:27:03 +01:00