Files
Stefan ArentzandClaude Fable 5 55e5511154 Phase 3: headless Apple 1 / Replica 1
Ports the machine layer for the One:

- pia.rs: the 6820 PIA from pia.c. The C output callback becomes a
  return value — Pia::write yields (ddr, byte) when an output register
  is written — and reads keep the IRQA1-clear side effect.
- one.rs: One implements Bus with the C memory map (Apple 1: 8K RAM +
  Woz monitor ROM at $FF00 on a 6502; Replica 1: 32K RAM + Krusader
  ROM at $E000 on a 65C02; PIA at $D010). ROMs are embedded with
  include_bytes! so nothing needs to run from src/. Display bytes are
  collected in a drainable buffer, with the Apple 1's 7-bit masking
  applied exactly where ewm_one_pia_callback did. One::key latches
  key | 0x80 into the PIA and raises IRQA1, per ewm_one_keydown.
- tests/one_boot.rs: both machines boot to the Woz monitor prompt;
  FF00.FF0F (Apple 1) and E000.E00F (Replica 1) dumps are verified
  against the actual ROM bytes; typed characters echo back.

utl.c is not ported: ewm_utl_endswith is str::ends_with, and the
clock_gettime shim is obsolete.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 09:21:05 -04:00
..
2026-07-05 09:21:05 -04:00
2026-07-05 09:21:05 -04:00
2026-07-05 09:21:05 -04:00