Code Monkey home page Code Monkey logo

nestur's Introduction

nestur

Nestur is an NES emulator. There are plenty of full-featured emulators out there; this is primarily an educational project but it is usable. There may still be many bugs, but I'm probably not aware of them so please submit issues.

  • SDL2 is the only dependency
  • no use of unsafe
  • NTSC timing
  • supports mappers 0-4 which cover ~85% of games

Controls

 Button  |   Key
___________________
|   A    |    D   |
|   B    |    F   |
| Start  |  Enter |
| Select | R-Shift|
|   Up   |   Up   |
|  Down  |  Down  |
|  Left  |  Left  |
|  Right |  Right |
-------------------

The code aims to follow the explanations from the NES dev wiki where possible, especially in the PPU, and the comments quote from it often. Thanks to everyone who contributes to that wiki/forum, and to Michael Fogleman's NES and Scott Ferguson's Fergulator for getting me unstuck at several points.

Compilation and use

  1. Install Rust
  2. Configure SDL2 for your platform:
    • Windows: SDL2.dll is already in the repo so you don't have to do anything
    • macOS: Install Homebrew and run brew install sdl2
    • Linux: sudo apt-get install libsdl2-dev (or whatever your package manager is)
  3. cd nestur/ && cargo build --release (be sure to build/run with the release flag or it will run very slowly)
  4. The nestur executable or nestur.exe will be in nestur/target/release.
  5. Run with $ ./nestur path/to/rom_filename.nes or > nestur.exe path\to\rom_filename.nes.
  6. If the game uses battery-backed RAM (if it can save data when turned off), a save file like rom_filename.sav will be created in the same folder as the ROM when the program is exited. When Nestur is run again, it will look for a file matching the ROM name, with a .sav extension instead of .nes.

To do

  • DMC audio channel, high- and low-pass filters

  • Better GUI and distributable solution

  • Save states

  • Player 2 controller?

Known problem games

  • Paperboy: input doesn't work

Please also check out Cloaker and Flying Carpet!

nestur's People

Contributors

spieglt 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.