Alphanes is a Nintendo Entertainment System (NES) emulator written in Go. It aims to emulate the NES hardware, allowing users to play classic NES games on modern computers.
This project was originally developed by Jonathan da Silva Santos between 2014-2015.
Alphanes includes implementations for several key NES components:
- CPU (Ricoh 2A03): Full 6502-based processor emulation with NTSC timing (1.789773 MHz)
- PPU (Picture Processing Unit): Accurate scanline-based rendering with background and sprite support
- APU (Audio Processing Unit): Implementation of all sound channels (Pulse, Triangle, Noise, DMC)
- Mappers: Support for popular mappers (NROM, MMC1, UNROM, MMC3)
- Input: Keyboard controls for standard NES inputs
- Go Compiler: Ensure you have a recent version of Go installed (https://golang.org/doc/install)
- SDL2 Development Libraries:
- Ubuntu/Debian:
sudo apt-get install libsdl2-dev
- macOS (Homebrew):
brew install sdl2
- Windows (MSYS2/MinGW): Use
pacman
to install themingw-w64-x86_64-SDL2
package
- Ubuntu/Debian:
- PortAudio Development Libraries:
- Ubuntu/Debian:
sudo apt-get install portaudio19-dev
- macOS (Homebrew):
brew install portaudio
- Windows (MSYS2/MinGW): Use
pacman
to install themingw-w64-x86_64-portaudio
package
- Ubuntu/Debian:
-
Clone the repository:
git clone https://github.com/jonathandasilvasantos/2014-alphanes-nintendo-emulator cd ./2014-alphanes-nintendo-emulator
-
Clone dependencies:
sh clone_dependencies.sh
-
Set up the Go environment:
source setup.sh
This disables GO modules and sets the GOPATH to the current directory.
-
Build the emulator:
cd ./src/zerojnt/alphanes/ go build
To play a game, simply run:
./alphanes path/to/your/rom.nes
Optional debugging features:
# For CPU state comparison
./alphanes nestest.nes nestest.log
# For PPU dump analysis
./alphanes your_game.nes your_game_dump.ppu
NES Button | Keyboard |
---|---|
A | Z |
B | X |
Select | Space |
Start | Return (Enter) |
Up | Up Arrow |
Down | Down Arrow |
Left | Left Arrow |
Right | Right Arrow |
Quit | Escape |
- Support for multiple mappers, but some edge cases may not be fully implemented
- Audio emulation includes all channels but may have accuracy limitations
- Controller support limited to keyboard input for Player 1
- Performance optimized for most games but complex titles may run slower
Alphanes is free software, distributed under the GNU General Public License v3.0. See the LICENSE file for more details.
Jonathan da Silva Santos (Original Author, 2014-2015)