Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
NES emulator, written in Go
Go
tree: f2f90da81e

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test_roms
.gitignore
.travis.yml
6502.go
6502_test.go
README.md
controller.go
disassembler.go
machine.go
memory.go
memory_test.go
mmc1.go
mmc1_test.go
mmc3.go
nametable.go
palette.go
ppu.go
ppu_test.go
rom.go
video.go

README.md

Fergulator

alt text

This is an NES emulator, written in Go. It's fairly new and very much a work in progress, so not all games run yet and not all features are implemented. Details are below.

alt text

To build on Linux

    $ sudo apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libglew1.6-dev libxrandr-dev
    $ go get -u github.com/0xe2-0x9a-0x9b/Go-SDL/sdl
    $ go get -u github.com/0xe2-0x9a-0x9b/Go-SDL/gfx
    $ go get -u github.com/banthar/gl
    $ go test
    $ go build

To build on OSX

    $ brew install sdl sdl_gfx sdl_image glew
    $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig go get -u github.com/0xe2-0x9a-0x9b/Go-SDL/sdl
    $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig go get -u github.com/0xe2-0x9a-0x9b/Go-SDL/gfx
    $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig go get -u github.com/banthar/gl
    $ go test
    $ go build

Run the emulator

    $ ./Fergulator path/to/game.nes

Controls

    A - Z
    B - X
    Start - Enter
    Select - Right Shift
    Up/Down/Left/Right - Arrows

    Save State - S
    Load State - L

    Reset - R

    1:1 aspect ratio - 1
    2:1 aspect ratio - 2
    3:1 aspect ratio - 3
    4:1 aspect ratio - 4

    Emulate overscan - O

Supported Mappers

  • NROM
  • UNROM
  • CNROM
  • MMC1
  • MMC3

Tested games that run well or are playable

List is in the wiki

What isn't working

  • Sound
  • Second controller
  • Scrolling and palettes on a number of MMC1 games
  • Save states for some MMC1 games
  • Some minor graphical glitches on screen boundary

Next planned mappers

  • MMC5
  • MMC2
Something went wrong with that request. Please try again.