mist64/perfect6502
关于
perfect6502, a MOS 6502 CPU emulator that performs a simulation of the original NMOS 6502 netlist
游戏与模拟器实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文perfect6502
perfect6502 is a MOS 6502 CPU emulator that performs a simulation of the original NMOS 6502 netlist that was extracted by the visual6502.org project.
Consequently, perfect6502 is
- perfect: It is not a reimplementation of the 6502, but a simulation of the original transistors. Its complete behavior, its internal state and its outputs are half-cycle exact.
- slow: Even though perfect6502 is highly optimized C code, it achieves only 1/30 of the speed of a 1 MHz 6502 on a high-end CPU of 2025.
perfect6502 is useful for
- understanding and reverse engineering the 6502
- debugging 6502 emulators by running them side by side with perfect6502
Usage
As a demonstration and as a performance/regression test, perfect6502 is hooked up to Commodore BASIC (cbmbasic).
You can compile the project with
$ make
and run it with
$ cbmbasic/cbmbasic
You should get the following output:
**** COMMODORE 64 BASIC V2 ****
64K RAM SYSTEM 38911 BASIC BYTES FREE
READY.
Benchmarking
You can measure the performance of the emulator by running make benchmark. It will print the number of half-cycles, the elapsed time, and the speed in half-cycles per second. On a 1 MHz 6502, reaching the READY. prompt takes 33155 half-cycles (0.017 sec).
Credits
perfect6502 is is written by Michael Steil and derived from the JavaScript visual6502 implementation by Greg James, Brian Silverman and Barry Silverman.
Contributing
Further performance optimizations are gladly accepted.
探索相关项目
加载中…