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 🙏

© 2026 – Pkg Stats / Ryan Hefner

roomie

v1.1.3

Published

ROM metadata helper

Downloads

396

Readme

roomie

GitHub Sponsors NPM Version


Introduction

roomie is a powerful and lightweight library for extracting metadata from ROM files of classic gaming consoles. It supports multiple systems, handles NES 2.0 headers, calculates CRC32 and SHA1 hashes, and can even read ROMs directly from ZIP archives.

Designed for simplicity and accuracy, roomie identifies systems via header magic words or file extensions and provides detailed information about mappers, co-processors, regions, and save types.


Features

  • ZIP Support: Load ROMs directly from .zip files.
  • Hardware Detection: Identifies NES Mappers, GB MBCs, SNES Co-processors, and GBA Save types.
  • NES 2.0: Full support for modern NES header specifications.
  • Hashing: Built-in SHA1 and CRC32 calculation.
  • Exports: Generate JSON or Gamelist XML (EmulationStation compatible) strings.

Installation

Install via npm:

npm install roomie

Usage

roomie supports both CommonJS (CJS) and ES Modules (ESM).

Basic Example (Async/Await)

import Roomie from "roomie";

const roomie = new Roomie();

// Load from a file path (supports .zip)
await roomie.load("./Super Mario World.zip");

console.log(roomie.info);
/*
{
  system: 'sfc',
  hash: { sha1: '...', crc32: 'b19ed489' },
  sfc: { rom: { type: 'LoROM', size: 2048000 }, ram: 8000 },
  ...
}
*/

// Export to EmulationStation gamelist format
console.log(roomie.toGamelistXML());

Supported Consoles

| Console | System Key | Description | |---------|------------|-------------| | NES / Famicom | nes | iNES & NES 2.0 support. Detects Mappers (MMC1, MMC3, etc). | | Super Nintendo | sfc | Detects LoROM/HiROM, Co-processors (SuperFX, SA-1, DSP). | | Nintendo 64 | n64 | Header parsing, region detection, and byte-swapping support. | | Game Boy / Color | gb | Detects MBC types, RAM size, and GBC/SGB features. | | Game Boy Advance | gba | Extract Game ID and identifies Save Type (SRAM/Flash/EEPROM). | | Nintendo DS | nds | Game code, region, unit code (DSi), and device capacity. | | Sega Genesis | genesis | Reads Domestic/Overseas names, serials, and regions. | | Master System / GG | sms / gg | Header detection (TMR SEGA), product code, and region. | | WonderSwan / Color | ws / wsc | End-of-ROM header parsing for game ID and model. | | PC Engine | pce | Basic identification for TurboGrafx-16 systems. |


API Reference

Methods

  • await load(pathOrBuffer: string | Buffer): Loads a ROM. If it's a ZIP, it extracts the first ROM entry.
  • toJSON(): string: Returns the RomInfo object as a formatted JSON string.
  • toGamelistXML(): string: Returns an XML string compatible with EmulationStation's gamelist.xml.

Properties

  • info: RomInfo: Comprehensive metadata object.
  • system: string: The detected system key (e.g., "sfc", "nes").
  • hash: { sha1, crc32 }: Calculated hashes of the ROM (excluding ZIP overhead).
  • cartridge: System-specific details (Mappers, MBC, Save Types).

Error Handling

  • unknown_file: System extension not supported.
  • unknown_bytes: Bytes don't match any known system header.
  • no_rom_in_zip: ZIP file loaded but no valid ROM found inside.

License

MIT