A library providing an emulator of the incredible MOS 6502 processor in Rust.
Coming from previous interpreter projects, such as the CHIP-8, I wanted to dive deeper into emulating processors. The MOS 6502 seemed like a perfect project as it is a widely used processor (used in e.g. Commodore 64, Apple II or NES), and as such is also well documented.
Building the library should be as simple as running cargo build --release
. You can then use the library in your own
Rust projects. The tests will run with cargo test
. Some example usage of reading in files and running them is shown
in the tests at the bottom of the cpu.rs
file.
The current state of the project provides the functionality needed to pass the 6502 functional test (without decimal mode) and AllSuiteA tests, so it should provide the needed functionality for mosts mos 6502 usages.
Or as a short list:
- "Legal" Instructions
- Running loaded files
- passing 6502 functional and AllSuiteA tests
- Decimal mode
- Cycle accuracy
- "Illegal" Instructions
If you encounter any problem(s) using this project or have any feedback to give on the projects code, feel free to leave an issue or open a pull request. Make sure that any (proposed) changes pass the CI tests!
These are some of the sources used for this project: