Another NES Emulator - written for fun & learning - first implementation of wideNES
ANESE (Another NES Emulator) is a Nintendo Entertainment System Emulator written for fun and learning.
Accuracy and performance are long-term goals, but the primary focus is getting popular titles up and running. There are still a lot of bugs, but many games are working quite well already.
ANESE is cross-platform, and is regularly tested on macOS, Windows, and Linux.
ANESE core uses clean and interesting C++11, emphasizing readability, maintainability, and approachability. It is well commented, providing in-line sources and insights for much of the implementation. It is also dependency free (aside from stdlib), making it easy to embed in other projects.
wideNES is a novel technique that can automatically “map-out” levels and worlds in NES games. Check out the wideNES Readme for details.
A GIF is worth a 1000 words:
Pretty cool huh? Here’s another one:
Official releases of ANESE can be found on the Releases tab on GitHub.
Alternatively, for the most up-to-date version of ANESE, nightly builds are available. These are compiled directly from the latest ANESE commit, so there may/will be bugs.
Windows: You can download builds of ANESE from AppVeyor’s build artifacts page.
macOS: Travis uploads ANESE.app bundles to this GDrive folder.
ANESE’s emulation core (src/nes) doesn’t have any major dependencies, but the UI does use a couple. Most of these dependencies are bundled with ANESE (see: /thirdparty), although some require additional installation:
apt-get install libsdl2-dev (on Ubuntu)brew install SDL2SDL environment variable to point to the dev libsC:\sdl2\ (Where I put them)SDL2_MORE_INCLUDE_DIR variable in CMakeLists.txt to
point to the SDL2 dev libsANESE builds with CMake
On macOS / Linux
# in ANESE root
mkdir build
cd build
cmake ..
make
make install # on macOS: creates ANESE.app in ANESE/bin/
On Windows:
mkdir build
cd build
cmake ..
msbuild anese.sln /p:Configuration=Release
ANESE opens to a directory-browser, from which ROMs can be launched.
ANESE can run from the shell using anese [rom.nes] syntax. Certain features
are only accessible from the command-line at the moment (e.g: movie recording
/ playback, PPU timing hacks). For a full list of switches, run anese -h
Windows Users: make sure the executable can find SDL2.dll! Download the
runtime DLLs from the SDL website, and plop them in the same directory as
anese.exe
Most popular Mappers are implemented:
| # | Name | Some Games |
|---|---|---|
| 000 | NROM | Super Mario Bros. 1, Donkey Kong, Duck Hunt |
| 001 | MMC1 | Legend of Zelda, Dr. Mario, Metroid |
| 002 | UxROM | Megaman, Contra, Castlevania |
| 003 | CNROM | Arkanoid, Cybernoid, Solomon’s Key |
| 004 | MMC3 | Super Mario Bros 2 & 3, Kirby’s Adventure |
| 007 | AxROM | Marble Madness, Battletoads |
| 009 | MMC2 | Punch Out!! |
Feel free to open a PR for any mappers you implement :)
Currently hard-coded to the following:
| Button | Key | Controller |
|---|---|---|
| A | Z | X |
| B | X | A |
| Start | Enter | Start |
| Select | Right Shift | Select |
| Up | Up arrow | D-Pad |
| Down | Down arrow | D-Pad |
| Left | Left arrow | D-Pad |
| Right | Right arrow | D-Pad |
Any xbox-compatible controller should work.
There are also a couple of emulator actions:
| Action | Key | Controller |
|---|---|---|
| Pause / Open Menu | Esc | Left Thumbstick Button |
| Reset | Ctrl - R | |
| Power Cycle | Ctrl - P | |
| Toggle CPU logging | Ctrl - C | |
| Speed +25% | Ctrl - = | |
| Speed -25% | Ctrl - - | |
| Fast-Forward | Space | Right Thumbstick Button |
| Make Save-State | Ctrl - (1-4) | |
| Load Save-State | Ctrl - Shift - (1-4) |
(there are 4 save-state slots)
blargg-apu branch has an older version of ANESE that uses
Blargg’s awesome nes_snd_emu library for the APU, and while my integration was
a bit unstable at times, it did sound a lot better when it did work.--alt-nmi-timing flag might fix some of these games.These are features that will add major value to ANESE:
peek,
i.e: a const read. As such, a debugger could easily inspect any/all memory
locations with no side effects!Here’s a couple that have been crossed off already:
main.cc - push everything into src/ui/
gui.cc into more files!And here are some ongoing low-priority goals:
.fm2 movie format better.sav