nesfuzz/README.md

51 lines
2.4 KiB
Markdown
Raw Normal View History

2019-11-12 00:04:07 +00:00
# nestur
Nestur is an NES emulator and a work in progress. There are likely still several bugs, and MMC3 support is not great. There are plenty of full-featured emulators out there; this is primarily an educational project but I do want it to run well.
- SDL2 is the only dependency
- no use of `unsafe`
- NTSC timing
- may only implement mappers 0-4 as these cover ~85% of games according to http://tuxnes.sourceforge.net/nesmapper.txt
2019-11-12 00:04:07 +00:00
2020-01-21 00:32:54 +00:00
<img src="pics/smb.png" width=400> <img src="pics/zelda_dungeon.png" width=400>
2020-01-03 00:00:18 +00:00
2019-11-12 00:04:07 +00:00
## Controls:
```
Button | Key
___________________
| A | D |
| B | F |
| Start | Enter |
2019-11-12 00:05:27 +00:00
| Select | R-Shift|
2019-11-12 00:04:07 +00:00
| Up | Up |
| Down | Down |
| Left | Left |
| Right | Right |
-------------------
```
2020-01-07 04:51:53 +00:00
The code aims to follow the explanations from the [NES dev wiki](https://wiki.nesdev.com/w/index.php/NES_reference_guide) where possible, especially in the PPU, and the comments quote from it often. Thanks to everyone who contributes to that wiki/forum, and to Michael Fogleman's [NES](https://github.com/fogleman/nes) and Scott Ferguson's [Fergulator](https://github.com/scottferg/Fergulator) for getting me unstuck at several points.
2019-11-12 00:04:07 +00:00
## Compilation and Use
1. Install Rust: https://www.rust-lang.org/tools/install
2. Configure SDL2 for your platform:
- Windows: `SDL2.dll` is already in the repo so you don't have to do anything.
- macOS: Install [Homebrew](https://brew.sh/) and run `brew install sdl2`
- Linux: `sudo apt-get install libsdl2-dev` (or whatever your package manager is)
2020-01-20 23:41:33 +00:00
3. `cd nestur/ && cargo build --release` (be sure to build/run with the release flag or it will run very slowly)
4. The `nestur` executable or `nestur.exe` will be in `nestur/target/release`.
5. Run with `$ ./nestur path/to/rom_filename.nes` or `> nestur.exe path\to\rom_filename.nes`.
6. If the game uses battery-backed RAM (if it can save data when turned off), a save file like `rom_filename.sav` will be created in the same folder as the ROM when the program is exited. When Nestur is run again, it will look for a file matching the ROM name, with a `.sav` extension instead of `.nes`.
2019-11-12 00:04:07 +00:00
## To do:
2020-01-30 03:22:57 +00:00
- Fix any bugs with mappers 0-3 and improve mapper 4 (MMC3)
2019-11-12 00:04:07 +00:00
- DMC audio channel, high- and low-pass filters
2020-01-02 23:50:46 +00:00
- Save state/load functionality
2019-11-12 00:04:07 +00:00
- Player 2 controller?
2020-01-07 04:45:42 +00:00
Please also check out [Cloaker](https://github.com/spieglt/cloaker) and [Flying Carpet](https://github.com/spieglt/flyingcarpet)!