Skip to content

NES emulator written in typescript

Notifications You must be signed in to change notification settings

gsy7141111/tsnes

 
 

Repository files navigation

TsNES

NES emulator written in typescript, Online demo

Usage

const emulator = new Emulator(Uint8ArrayNESData, {
  onFrame: frame => {
    ... // output image
  },
  onSample: volume => {
    ... // output audio
  }
});

document.addEventListener('keydown', e => {
  ... // analyse key board code 
  emulator.standardController1.updateButton(StandardControllerButton.A, true);
});

setInterval(() => {
  emulator.frame();
}, 16);

Demo

Here is an demo running in browser

yarn build

Open dist/index.html in your browser, then you can choose any nes file

About

NES emulator written in typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.5%
  • JavaScript 0.5%