Skip to content

daniel-pedersen/nest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEST

A cycle-accurate NES emulator written from scratch in TypeScript. This project implements the Ricoh 2A03 CPU (MOS 6502 variant) with dynamic instruction emission for JIT optimization, achieving high performance in a browser environment.

Technical Details

  • Cycle-accurate CPU emulation (Ricoh 2A03)
  • Dynamic instruction emission for V8/JavaScript JIT optimization
  • 2C02 PPU (Picture Processing Unit) implementation with sprite rendering and background handling
  • APU (Audio Processing Unit) with 2A03's 5 sound channels
  • Mapper support (currently NROM, MMC1, limited MMC3)

Features

  • Cycle-accurate timing of CPU and PPU
  • Hardware register emulation
  • Memory mapper implementation
  • Simulates raw PPU NTSC output
  • Buffered audio generated by changing emulation speed to get smooth audio output
  • Controller input handling
  • Dual controller support

Usage

cd app
deno run dev

Project Status

This is an educational project under active development. While aiming for cycle accuracy, some timing edge cases and mapper implementations are still being refined.

Why TypeScript?

It's fun! But mainly:

  • We can run it anywhere in a browser
  • The dynamic nature of JS allows us to do crazy things like change the emulation at run-time (instructions, timings, etc)

License

MIT License - See LICENSE for details

Author

Daniel Pedersen

About

Cycle-accurate NES emulator in TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages