npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nesjs/core

v2.2.11

Published

[![npm version](https://badge.fury.io/js/%40nesjs%2Fcore.svg)](https://badge.fury.io/js/%40nesjs%2Fcore)

Downloads

596

Readme

@nesjs/core - NES Emulator Core Library

npm version

License: MIT

A complete NES (Nintendo Entertainment System) emulator core library that provides full NES hardware emulation functionality, UI framework agnostic.

Features

  • 🎮 Complete NES hardware emulation (CPU, PPU, APU)
  • 🎯 Support for multiple Mappers
  • 🎵 Audio output support
  • 🕹️ Dual controller support
  • 💾 Save/Load state functionality
  • 🔧 Cheat code support
  • 🎨 Customizable renderer and audio interfaces
  • 📝 TypeScript support

ROM Compatibility

Supported Mappers: 0, 1, 2, 3, 4, 5, 7, 9, 10, 11, 15, 16, 18, 19, 21, 22, 23, 24, 25, 26, 30, 31, 33, 34, 36, 38, 39, 41, 47, 48, 58, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 85, 86, 88, 87, 89, 92, 93, 94, 97, 107, 112, 113, 115, 118, 119, 129, 140, 152, 154, 169, 180, 182, 184, 185, 195, 200, 201, 203, 206, 212, 213, 214, 225, 226, 228, 229, 231, 240, 241, 242, 244, 245, 246, 248, 249, 255.

Installation

npm install @nesjs/core

Quick Start

Basic Usage

import { NES } from '@nesjs/core'

// Create NES instance
const nes = new NES({
    audioSampleRate: 44100,
    audioBufferSize: 1024,
    enableCheat: true
})

// Implement renderer interface
class MyRenderer {
    renderFrame(imageData: Uint8Array) {
        // Handle 256x240 RGBA image data
        console.log('Frame data:', imageData.length) // 245760 bytes
    }
}

// Implement audio interface
class MyAudioOutput {
    outputSample(sample: number) {
        // Handle audio sample data
    }
    
    flushFrame() {
        // Flush audio frame
    }
}

// Set interfaces
nes.setRenderer(new MyRenderer())
nes.setAudioInterface(new MyAudioOutput())

// Load ROM
const romData = new Uint8Array(/* ROM file data */)
await nes.loadROM(romData)

// Run emulator
function gameLoop() {
    nes.runFrame()
    requestAnimationFrame(gameLoop)
}
gameLoop()

Refer to document for more details.