fredericcambon / Nes

Licence: gpl-3.0
A Javascript NES Emulator

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Nes

FCEUX-Lua-Script-Collection
Lua scripts for FCEUX (an NES emulator). Multiple games including River City Ransom, Battle Kid
Stars: ✭ 20 (-88.1%)
Mutual labels:  games, nintendo, emulation, nes
Anese
Another NES Emulator - written for fun & learning - first implementation of wideNES
Stars: ✭ 323 (+92.26%)
Mutual labels:  nes, 6502, emulator, emulation
Provenance
iOS & tvOS multi-emulator frontend, supporting various Atari, Bandai, NEC, Nintendo, Sega, SNK and Sony console systems… Get Started: https://wiki.provenance-emu.com |
Stars: ✭ 4,732 (+2716.67%)
Mutual labels:  nintendo, nes, emulator, emulation
Punes
Nintendo Entertaiment System emulator and NSF/NSFe Music Player (Linux, FreeBSD, OpenBSD and Windows)
Stars: ✭ 217 (+29.17%)
Mutual labels:  nes, 6502, emulator, emulation
Jsnes
A JavaScript NES emulator.
Stars: ✭ 5,354 (+3086.9%)
Mutual labels:  nes, 6502, emulator, emulation
js-nes-emulator
NES emulator in javascript.
Stars: ✭ 12 (-92.86%)
Mutual labels:  emulator, emulation, nes, 6502
NostalgiaLite
Three game emulators: FC(Nes), GG, GBC for Android
Stars: ✭ 85 (-49.4%)
Mutual labels:  emulator, nintendo, nes
retro-computing
🤓🕹💾 This hobby project contains software implementations of old microprocessors and complete computer systems. I'm very interested in retrocomputing and this is how I learn about the inner workings of these old, classic and amazing computers and game consoles.
Stars: ✭ 15 (-91.07%)
Mutual labels:  emulator, emulation, 6502
Nsfplay
Nintendo NES sound file NSF music player
Stars: ✭ 155 (-7.74%)
Mutual labels:  nes, emulator, emulation
Retrograde Android
Play retro video games on your Android TV!
Stars: ✭ 114 (-32.14%)
Mutual labels:  nintendo, nes, emulator
Gearnes
NES / Famicom emulator for iOS, Mac, Raspberry Pi, Windows, Linux and RetroArch.
Stars: ✭ 23 (-86.31%)
Mutual labels:  emulator, nes, 6502
khedgb
Experiments in Game Boy emulation
Stars: ✭ 15 (-91.07%)
Mutual labels:  emulator, nintendo, emulation
Jsnes Web
A browser UI for JSNES, a JavaScript NES emulator
Stars: ✭ 398 (+136.9%)
Mutual labels:  nes, emulator, emulation
Laines
Cycle-accurate NES emulator in ~1000 lines of code
Stars: ✭ 1,365 (+712.5%)
Mutual labels:  nintendo, nes, emulator
first nes
Create your own games for the Nintendo Entertainment System! This "starter" game is easily extensible for your own projects. Includes references.
Stars: ✭ 94 (-44.05%)
Mutual labels:  emulator, nintendo, nes
awesome-emu-resources
A curated list of emulator development resources
Stars: ✭ 26 (-84.52%)
Mutual labels:  emulator, nintendo, nes
Xqemu
Open-source emulator to play original Xbox games on Windows, macOS, and Linux
Stars: ✭ 518 (+208.33%)
Mutual labels:  games, emulator, emulation
Embeddednes
A portable NES simulator for embedded processors
Stars: ✭ 26 (-84.52%)
Mutual labels:  nes, 6502, emulator
Thistle
6502 based architecture for OpenComputers
Stars: ✭ 26 (-84.52%)
Mutual labels:  emulator, emulation, 6502
Eka2l1
An experimental Symbian OS emulator
Stars: ✭ 462 (+175%)
Mutual labels:  games, emulator, emulation

Build

OnaNES (Oh No Another NES Emulator)

In Javascript !

This is my implementation of the NES console, which emulates both the original CPU and PPU.

This git repo comes without a frontend as I wanted it to be as bare as possible. I started implementing a UI using React.js, you can find the source code here.

Getting Started

Installing

Yarn

yarn install nes-emulator

NPM

npm install nes-emulator

Local

Clone the repo and

yarn install
yarn run build

How to Use

The library uses an observer pattern to signal events (frames ready, reset, pause ...).

Here's an example of how to use this library.

import { Console } from "nes-emulator";

class NES {
    constructor() {
        this.console = new Console();

        // Will notify `this.notify` upon events
        this.console.addObserver( this );

        // Here romData is the content of a .nes ROM
        this.console.loadROM( `romData` );
        this.console.start();
    }

    notify(t, e) {
        switch (t) {
            case 'frame-ready': {
                // Draw the frame using `e` (Uint8Array)
            }
        }
    }

}

Examples

Sketchfab Viewer API (http://grun7.com/sketchfab-viewer-api-nes/)

Example1

This was made only for fun, to show it is possible to make this emulator run and displayed on a 3D model. It uses Sketchfab and its viewer API.

Demo with React (https://onanes.herokuapp.com/)

Example 2

UI using ReactJS

Features

Done

  • Fully functional CPU
  • Functional PPU
  • UXROM, NROM, CNROM, MMC1, MMC3 mappers
  • Save/Load

In Progress

  • Additional mappers
  • Tests

TODO

The emulator is missing features such as

  • Sound
  • Make list of playable games

And needs improvement for

  • Cycle accurate CPU
  • Some PPU glitches

API Documentation

TODO WIP

Signals triggered by the Console

frame-ready

Fired at a 60 fps rate when a frame is ready, provides a 256x240x4 byte array containing the RGB colors to display.

nes-reset

Fired when a game is loaded and the console restarts.

Contributing

I'm still actively working on it but would welcome your PRs. Do not hesitate to fork the repository and h4ck around.

Acknowledgments

Special thanks for the amazing http://nesdev.com/ and all their technical resources without which this project would not have been possible.

License

NES Emulator
Copyright (C) 2018 Frédéric Cambon

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].