Skip to content
Pull requests
Issues
Marketplace
Explore
@dadigang
fogleman /
nes
Public
Code
Issues 6
Pull requests 2
Actions
Projects
Wiki
Security
Insights
2 branches
0 tags
Latest commit
@fogleman
fogleman Merge pull request #51 from TianZerL/master
088b5ce
on Feb 21
Git stats
201 commits
Files
Type
Name
Latest commit message
Commit time
nes
adjust code format
3 months ago
ui
Update glfw to v3.2 to add Linux/ARM64 support
16 months ago
util
adding utilities
7 years ago
.gitignore
updating gitignore
7 years ago
LICENSE.md
adding readme and license
7 years ago
README.md
Update README.md
5 years ago
go.mod
fix: module #43
2 years ago
main.go
log flags
7 years ago
README.md
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]
If no arguments are specified, the program will look for rom files in the current working directory.
If a directory is specified, the program will look for rom files in that directory.
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 Documentation (PDF)
NES Reference Guide (Wiki)
6502 CPU Reference
About
NES emulator written in Go.
Resources
Readme
License
MIT license
Stars
5k stars
Watchers
147 watching
Forks
478 forks
Releases
No releases published
Packages
No packages published
Used by 8
@bhojpur
@Ergative
@iszmxw
@55utah
@kedia-project
@fogleman
@tk1122
@icexin
Contributors 10
@fogleman
@zhaostu
@mattkanwisher
@ncoish
@TianZerL
@kgabis
@caixiangyue
@mtojek
@odidev
@d1y
Languages
Go 100.0%
© 2022 GitHub, Inc.
Terms
Privacy
Security
Status
Docs
Contact GitHub
Pricing
API
Training
Blog
About
Octotree
Login with GitHub
有疑问加站长微信联系(非本文作者))