6502 simulator
Purpose
This project is primarily an exercise to prepare for a more in-depth project. Inspired by modern Apple II expansion cards like the V2 Retro Computing Analog card [1], we wish to design a microcontroller-based card for future experimentation, the eventual goal being an emulated Z80 softcard. We know this is an achievable goal, but it seems prudent to try writing a PC-based CPU simulator first. We have selected the 6502 as our target for its low instruction count, simple architecture, and variety of addressing modes.
Our goals are as follows:
-
a SIMH-like console interface with memory/register editing, breakpoints, disassembler, and single-step execution
-
simulated RAM, ROM, and I/O devices with memory mapping and bank switching
-
realistic timing
-
a portable and general core
-
extensible for future GPIO operation
This is not intended to be able to simulate a full Apple II, NES, or similar 6502-based device.
Design
CPU core
-
registers
-
fetch-decode loop
-
hold states and breakpoints
Simulator console and debugger
-
commands
-
breakpoint management
-
limitations
-
I/O devices