Skip to content

joelBIT/nes-emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Nintendo Entertainment System (NES) emulator implemented in JavaScript.


One way to play on this emulator is to start a local http-server using the script server.js that I have included in the root folder. Install http-server and run

foo@bar:~$ node server.js

from the root folder of the project. Then go to localhost:8080 in a browser and load a game.



💻 CPU

  • All official instructions are implemented
  • nestest passes ✔️
  • NEStress CPU tests passes ✔️
  • NES 6502 Timing test passes ✔️
  • NES 6502 Branch Timing test passes ✔️
    • 1.Branch_Basics.nes ✔️
    • 2.Backward_Branch.nes ✔️
    • 3.Forward_Branch.nes ✔️



🖥️ PPU

  • Implemented as NTSC
  • NTSC NES PPU tests passes ✔️
    • palette_ram.nes ✔️
    • sprite_ram.nes ✔️
    • vbl_clear_time.nes ✔️
    • vram_access.nes ✔️
  • NES OAM Read test passes ✔️
  • NTSC NES PPU Sprite 0 test passes ✔️
    • 01.basics.nes ✔️
    • 02.alignment.nes ✔️
    • 03.corners.nes ✔️
    • 04.flip.nes ✔️
    • 05.left_clip.nes ✔️
    • 06.right_edge.nes ✔️
    • 07.screen_bottom.nes ✔️
    • 08.double_height.nes ✔️
    • 09.timing_basics.nes ✔️
    • 10.timing_order.nes ✔️
    • 11.edge_timing.nes ✔️



🎵 APU

  • All five channels (Square1, Square2, Triangle, Noise, DMC) are implemented
  • The APU needs some polishing but sounds decent most of the time



🔌 Cartridge

  • Most of the available NES games can be played on this emulator
  • Implemented mappers are:
    • Mapper 0: NROM
    • Mapper 1: MMC1
    • Mapper 2: UxROM
    • Mapper 3: CNROM
    • Mapper 4: MMC3
    • Mapper 7: AxROM
    • Mapper 9: MMC2
    • Mapper 66: GxROM
    • Mapper 69: JxROM





🎮 Controls

  • Support for controller 1 and 2
  • It is possible to configure controller 1 and 2 (configuration is stored in local storage)
  • read_joy3 tests passes ✔️
    • count_errors.nes ✔️
    • count_errors_fast.nes ✔️
    • test_buttons.nes ✔️
    • thorough_test.nes ✔️
Controller 1 Controller 2
Input Keyboard Key(s)
Up Arrow Up
Down Arrow Down
Left Arrow Left
Right Arrow Right
A Z
B X
Select A
Start S
Input Keyboard Key(s)
Up U
Down J
Left H
Right K
A G
B F
Select R
Start T

About

Nintendo Entertainment System emulator implemented in JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published