PAL-2 and KIM-1 Project Log

From a cycle-aware KIM-1 simulator to a physical PAL-2 running CP/M-65 from an SD card.

PAL-2 computer connected to an oscilloscope during SD card debugging

This page collects my experiments with the MOS 6502, the KIM-1 architecture, the PAL-2 kit, and CP/M-65. The work moved from simulation to a physical computer, then to an SD-card boot process debugged at signal level.

The project in order

  1. Learning the 6502 by Building a KIM-1 Simulator
    I started with a hardware-faithful KIM-1 simulator in Go while waiting for the PAL-2 kit.
  2. CP/M-65 Comes to My KIM-1 Simulator
    The simulator gained an SD card model and booted CP/M-65 before the physical board was ready.
  3. Building the PAL-2: A KIM-1-Compatible Computer That Actually Worked
    The kit went from a pile of components to a working KIM-1-compatible computer.
  4. Getting CP/M-65 to Boot on My PAL-2
    A RIOT fault, the wrong Port A, and an unusually strict SD card led to a patched loader and a successful boot.
  5. Tantal: Designing a 6502-Native Language with Claude Code
    I designed a compact language for the MOS 6502, tested its display code in the simulator, and then ran the same program on the physical PAL-2.

Code and technical resources

Current result

CP/M-65 now runs on the physical PAL-2 with an SD card module wired directly to the user RIOT Port A. The connection uses PA4 for CS, PA3 for SCK, PA2 for MOSI, and PA1 for MISO. Tantal now also compiles and runs its six-digit display example on the real PAL-2, confirming direct control of the system RIOT from code produced by the new compiler.