27 Commits
Author SHA1 Message Date
Steven Hugg 4ef5ab5a75 vic20: updated bios, changed quickload to patch IRQ vector and run 2026-10-25 09:58:24 +01:00
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
Steven Hugg 8895c67915 vic20 debug info, first version of new bios 2026-10-23 20:06:37 +02:00
Steven Hugg 709857a18e vic20: added to platforms menu, fix joystick in chips wasm (it's a submodule now) 2026-10-22 22:18:55 +02:00
Steven Hugg 9aa2490dba vic20: fix the text window geometry
The VIC-I draws a fixed 22x23 character window, centered in the picture.
The emulator used the VIC-II's display window registers, so the window was
placed at a garbage offset: the first character column was clipped in half
and the whole picture was shifted 24 pixels to the right to hide it.

- the new emulator core (chips) centers the window and takes its vertical
  position from the ROM, so NTSC and PAL ROMs both work
- the 24 pixel video shift is gone
- the platform loads res/vic20/vic20.bios (a real ROM set) when it is
  available, and falls back to the stub BIOS otherwise
- a regression test checks the geometry of the rendered frame
2026-10-22 11:11:09 +02:00
Steven Hugg 34ccd5d547 npm: tweaks for npm release, github workflow, exclude vic20 2026-10-09 14:00:32 +02:00
Steven Hugg 154644fa70 moved res/* to res/<platform>/*
vscode: omit cpc, vic20 platform
2026-10-04 16:28:37 +02:00
Steven Hugg 58e3f3f9fb atari8: fixed rom .extensions, removed wasm 2022-09-06 14:53:45 -05:00
Steven Hugg 3853f9a86a vic20: added cart support, fixed bugs 2022-09-06 14:43:39 -05:00
Steven Hugg a86e554336 Merge branch 2022-08-30 19:50:37 -05:00
Steven Hugg ed7758d7e0 atari8: started on js platform 2022-08-30 19:37:30 -05:00
Steven Hugg 2555798b11 c64/zx/cpc: .wasm uses clock ticks, not msec 2022-08-20 18:15:36 -05:00
Steven Hugg f33dc817f3 c64: new wasm, show badlines 2022-08-09 09:24:04 -05:00
Steven Hugg 42b2ded666 c64: update wasm, debugging 2022-07-29 11:33:54 -05:00
Steven Hugg 3beef5626c c64: updated openroms 2022-07-19 10:46:04 -05:00
Steven Hugg ec089b2d89 vic20: sort of functional (need res/vic20.bios, basic+chars+kernel) 2022-02-23 15:57:27 -06:00
Steven Hugg c3403a0506 cpc: cpctelera, start @ 0x4000, new vsync 2021-12-02 13:01:02 -06:00
Steven Hugg 8fa0389da1 cpc: started investigation, cpcrslib, aspect 2021-12-01 14:03:26 -06:00
Steven Hugg 55735b4039 starting on WASI emulator support, atari800 2021-07-27 11:13:50 -05:00
Steven Hugg 58b49cb6f6 updated c64/zx .wasm emulators 2021-07-10 18:57:05 -05:00
Steven Hugg add8ce7b8c verilog: change input value by clicking 2021-05-03 16:58:33 -05:00
Steven Hugg e962404c2f basic: testInitialFor, staticArrays, token crunching, bell, more OPTIONs (17, 54, 68) 2020-08-11 20:45:36 -05:00
Steven Hugg 08af6ae3a5 loadBIOS() now on Machine interface, updated c64 BIOS, emulator types SYS command 2020-07-19 16:54:37 -05:00
Steven Hugg 99d32a17aa c64: support call stack view 2020-07-14 07:32:45 -05:00
Steven Hugg 93aff314c8 c64, zx: added probe buffer support, need to log scanlines 2020-07-13 22:14:44 -05:00
Steven Hugg 921d2b2253 added ZX Spectrum 48k 2020-07-02 20:24:52 -05:00
Steven Hugg 0d77912ccc x86: started using v86, freedos, fatfs, yasm, SmallerC 2020-06-15 10:28:02 -05:00