POM1 Apple-1 Emulator: A cycle-accurate C++ rewrite for the 50th Anniversary and modern development

1 post / 0 new
Offline
Last seen: 6 hours 41 min ago
Joined: Apr 22 2026 - 13:54
Posts: 1
POM1 Apple-1 Emulator: A cycle-accurate C++ rewrite for the 50th Anniversary and modern development
AttachmentSize
Package icon POM1 1.8.6 for Windows5.41 MB

Hello everyone, Arnaud here,

As we hit April 2026 and celebrate the 50th anniversary of the Apple-1, I wanted to share a major architectural update to the POM1 emulator (v1.8.6).

Some of the veterans here might remember the older Java iterations of POM1 from years ago. While it served its purpose, I have closely followed the feedback on this forum before starting to write the new version and realized the old architecture was creating bottlenecks for serious software archaeology and hardware cross-development.

Before diving into the new specs, I want to explicitly thank Uncle Bernie and Jeff Jetton. Uncle Bernie, your work on Codebreaker highlighted a severe limitation in the old POM1's keyboard entry. Pasting large .apl hex dumps was painfully slow and prone to dropping characters because the emulator couldn't properly bypass the PIA polling limits in real-time. Jeff Jetton, your early tests with your 15 Puzzle ASM code exposed execution bugs where the emulator would fail specific branch executions.

These historical failures drove this complete rewrite. The new POM1 is built from scratch in modern C++ with a focus on determinism, low-level accuracy, and large hardware extension support.

1. The Core: Cycle-Accurate 6502 & Clock Math

The engine is no longer a naive state machine. The CPU (M6502.cpp) is now cycle-accurate, executing memory fetches and addressing modes with strict clock cycle penalties.

The system clock is mathematically derived from the NTSC color subcarrier frequency.

              f {CPU} = 14.31818 MHz /14 = 1.022727 MHz

This ensures that tight timing loops in native ASM should run exactly as they would on original silicon.

2. Resolving the Keyboard & ACI Bottlenecks

To fix the pasting issue, the KeyboardController now features a direct-injection clipboard buffer. You can paste modern code from your host OS, and the emulator will feed it to the Wozmon deterministically without overflowing the simulated PIA. You can use "telnet localhost 6502" too with P-LAB Terminal to feed POM1 if you want to have a full history of your interaction.

For the Apple Cassette Interface (ACI), CassetteDevice.cpp now features pulse-mode playback logic. It decodes .wav, .mp3, and .aci audio files asynchronously, feeding the analog wave simulation directly into the ROM reading routine. 

3. Hardware Extensions & Memory Topography

The original 4K/8K memory map is fully supported, but POM1 now acts as a comprehensive Apple-1 development chassis. The PeripheralBus.cpp handles dynamic dispatching for an array of community hardware. You can toggle these via UI presets or CLI flags:

  • Storage: Rich Dreher's CFFA1 and the Parmegiani's P-LAB microSD interface (virtualizing a FAT32 file system directly mapped to a local host directory for easy drag-and-drop compilation).

  • Video: Uncle Bernie's GEN2 Color Graphics Card (simulating NTSC chroma artifacts for color generation) and the TMS9918 VDP.

  • Audio & Comms: P-LAB A1-SID (with libresidfp integration for the 6581/8580) and a 65C51 ACIA-based Wi-Fi Modem bridging to host TCP/Telnet sockets.

The Fantasy Multiplexing Memory Map :

4. Lock-Free UI & Debugging

The UI is built on Dear ImGui. To prevent the GUI from choking the 1 MHz emulation thread, they are decoupled using lock-free atomic variables (SnapshotPublisher.cpp). This allows you to inspect the full 64K memory map, watch the Program Counter (PC) and Stack Pointer (SP), and edit hex dumps in real-time without introducing micro-stutters to the CPU execution.

Access & Call to Action

POM1 is fully open-source (GPLv3). It is true free software, as it was in the beginning.

I invite you to subject this build to your most demanding stress tests. Fork it, adapt it, or use it to bridge your modern dev environment with your physical Apple-1 builds.

Happy 50th, everyone.

— Arnaud.