https://github.com/hoffi/crystal_nes
A NES Emulator written in Crystal
https://github.com/hoffi/crystal_nes
Last synced: about 1 year ago
JSON representation
A NES Emulator written in Crystal
- Host: GitHub
- URL: https://github.com/hoffi/crystal_nes
- Owner: hoffi
- License: bsd-3-clause
- Created: 2019-10-24T17:14:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T15:14:35.000Z (almost 6 years ago)
- Last Synced: 2025-01-28T12:16:00.386Z (over 1 year ago)
- Language: Crystal
- Size: 1.04 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CrystalNES
A NES Emulator written in [Crystal](https://crystal-lang.org)
## Current status

- [x] Complete CPU
- [x] Controller
- [ ] PPU
- [x] Basic background rendering
- [x] Sprite rendering
- [ ] Correct timings
- [ ] APU
- [ ] Mappers
- [x] [Mapper 0 / NROM](http://wiki.nesdev.com/w/index.php/NROM)
- [ ] [Mapper 1 / SxROM](http://wiki.nesdev.com/w/index.php/MMC1)
- [ ] [Mapper 2 / UxROM](http://wiki.nesdev.com/w/index.php/UxROM)
- [ ] [Mapper 3 / CNROM](http://wiki.nesdev.com/w/index.php/INES_Mapper_003)
- [ ] GUI
- [x] PPU output
- [x] CPU Flags and Register values
- [ ] Disassembler
- [ ] Debugger
## Usage
[raylib](https://www.raylib.com) needs to be installed on the system.
```sh
crystal run main.cr -- path/to/rom.nes
```
### Key mappings
| Key | NES Function |
| ----- |:--------------:|
| A | Select |
| S | Start |
| Y/Z | A |
| X | B |
| Up | Up |
| Right | Right |
| Left | Left |
| Down | Down |
| R | Reset |
| Space | Play/Pause |
## References
[Nesdev Wiki](http://wiki.nesdev.com/w/index.php/NES_reference_guide)
[6502 Reference](http://obelisk.me.uk/6502/reference.html)