Giter VIP home page Giter VIP logo

nes's Introduction

Summary

This is an NES emulator written in Go.

Screenshots

Screenshots

Title Screens

http://www.michaelfogleman.com/static/nes/

Dependencies

github.com/go-gl/gl/v2.1/gl
github.com/go-gl/glfw/v3.1/glfw
github.com/gordonklaus/portaudio

The portaudio-go dependency requires PortAudio on your system:

To build portaudio-go, you must first have the PortAudio development headers and libraries installed. Some systems provide a package for this; e.g., on Ubuntu you would want to run apt-get install portaudio19-dev. On other systems you might have to install from source.

On Mac, you can use homebrew:

brew install portaudio

Installation

The go get command will automatically fetch the dependencies listed above, compile the binary and place it in your $GOPATH/bin directory.

go get github.com/fogleman/nes

Usage

nes [rom_file|rom_directory]
  1. If no arguments are specified, the program will look for rom files in the current working directory.

  2. If a directory is specified, the program will look for rom files in that directory.

  3. If a file is specified, the program will run that rom.

For 1 & 2, the program will display a menu screen to select which rom to play. The thumbnails are downloaded from an online database keyed by the md5 sum of the rom file.

Menu Screenshot

Controls

Joysticks are supported, although the button mapping is currently hard-coded. Keyboard controls are indicated below.

Nintendo Emulator
Up, Down, Left, Right Arrow Keys
Start Enter
Select Right Shift
A Z
B X
A (Turbo) A
B (Turbo) S
Reset R

Mappers

The following mappers have been implemented:

  • NROM (0)
  • MMC1 (1)
  • UNROM (2)
  • CNROM (3)
  • MMC3 (4)
  • AOROM (7)

These mappers cover about 85% of all NES games. I hope to implement more mappers soon. To see what games should work, consult this list:

NES Mapper List

Known Issues

  • there are some minor issues with PPU timing, but most games work OK anyway
  • the APU emulation isn't quite perfect, but not far off

Documentation

Interested in writing your own emulator? Curious about the NES internals? Here are some good resources:

nes's People

Contributors

fogleman avatar kgabis avatar mattkanwisher avatar ncoish avatar zhaostu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.