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

koin-deck-retro-player

v0.1.11

Published

The premium cloud emulation engine for Koin Deck. High-performance, preservation-focused retro gaming in the browser.

Downloads

14

Readme

KOIN DECK RETRO PLAYER

The Premium Cloud Emulator Engine

Your Games. Your Saves. Your Legacy.

Try the Demo NPM Version License

The high-performance, preservation-focused emulation engine powering Koin Deck. Built for those who remember blowing into cartridges, but demand the convenience of the cloud.

Koin Deck Retro Player

Core Philosophy

  • Immortalized Collection: Designed to interface with permanent cloud storage.
  • Enhanced Play: Experience games better than original hardware with rewind, cheats, and achievements.
  • Privacy Focused: Built for zero-knowledge architectures. Your data, your rules.
  • High-Contrast Brutality: A neo-brutalist aesthetic that puts the game first.

Features

  • 🎮 Universal Compatibility: From NES to PlayStation, supporting a vast library of systems.
  • ☁️ Cloud Sync Ready: Hooks for instant save-state uploads and synchronization.
  • Rewind Time: Mistakes happen. Fix them instantly.
  • 🏆 RetroAchievements: Native integration for tracking your legacy.
  • 🔒 Secure Execution: Sandboxed WASM environment via Nostalgist.js.
  • 📱 Adaptive Controls: Touch controls that actually feel good, plus gamepad support.

Supported Systems

| System | Key | Core | |--------|-----|------| | Nintendo | | Nintendo Entertainment System (NES) | NES | fceumm | | Super Nintendo (SNES) | SNES | snes9x | | Nintendo 64 | N64 | mupen64plus_next | | Game Boy / Color / Advance | GB, GBC, GBA | gambatte, mgba | | Virtual Boy | VIRTUAL_BOY | mednafen_vb | | Sega | | Sega Genesis / Mega Drive | GENESIS | genesis_plus_gx | | Sega Master System | MASTER_SYSTEM | gearsystem | | Sega Game Gear | GAME_GEAR | gearsystem | | Sony | | PlayStation | PS1 | pcsx_rearmed | | Other | | PC Engine / TurboGrafx-16 | PC_ENGINE | mednafen_pce_fast | | Neo Geo / Pocket / Color | NEOGEO, NEOGEO_POCKET | fbalpha, mednafen_ngp | | WonderSwan / Color | WONDERSWAN | mednafen_wswan | | Atari 2600 / 7800 / Lynx | ATARI_2600, LYNX | stella, handy | | Arcade (MAME) | ARCADE | mame2003_plus |

Installation

npm install koin-deck-retro-player
# or
yarn add koin-deck-retro-player
# or
pnpm add koin-deck-retro-player

Usage

React (Recommended)

import { GamePlayer } from 'koin-deck-retro-player';
// ...

Vanilla HTML / Web Component

You can use the player in any HTML page using the bundled Web Component.

  1. Include the script:

    <script src="https://unpkg.com/koin-deck-retro-player/dist/web-component.global.js"></script>
  2. Use the tag:

    <retro-game-player 
        rom-url="path/to/game.nes" 
        system="nes" 
        title="My Game"
    ></retro-game-player>
  3. Advanced properties (via JS):

    const player = document.querySelector('retro-game-player');
    player.onSaveState = async (slot, blob) => {
        console.log('Saved!', blob);
    };

Basic Example (React)

import { GamePlayer } from 'koin-deck-retro-player';

function App() {
  return (
    <div style={{ width: '100vw', height: '100vh' }}>
      <GamePlayer
        romUrl="https://example.com/roms/mario.nes"
        system="NES"
        title="Super Mario Bros."
      />
    </div>
  );
}

Advanced Usage

import { GamePlayer } from 'koin-deck-retro-player';

function App() {
  return (
    <GamePlayer
      romUrl="https://example.com/roms/sonic.md"
      system="GENESIS"
      title="Sonic the Hedgehog"
      // Optional: Custom core
      core="genesis_plus_gx"
      // Optional: BIOS URL (needed for some systems like GBA, PS1)
      biosUrl="https://example.com/bios/bios.bin"
      // Optional: Start with a specific save state
      initialSaveState={myBlob}
      // Optional: Auto-save interval (defaults to 60s)
      autoSaveInterval={30000}
      // Optional: RetroAchievements
      retroAchievementsConfig={{
        username: 'myuser',
        token: 'mytoken', // Use token, NOT password
        hardcore: false,
      }}
      // Optional: Handle save states externally
      onSaveState={async (blob) => {
        await uploadSave(blob);
      }}
    />
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | romUrl | string | Required | URL to the ROM file. | | system | string | Required | System key (e.g., 'NES', 'GBA'). | | title | string | Required | Game title for display. | | core | string | (Auto) | Specific Libretro core to use. | | biosUrl | string | undefined | URL to BIOS file (required for some systems). | | systemColor | string | (Auto) | Theme color for UI accents. | | onExit | () => void | undefined | Callback when exit button is clicked. | | onSaveState | (slot, blob) => Promise | undefined | Handler for saving state. | | onLoadState | (slot) => Promise<Blob> | undefined | Handler for loading state. | | onAutoSave | (blob) => Promise | undefined | Handler for auto-save (every 60s default). | | autoSaveInterval | number | 60000 | Interval for auto-save in ms. | | onToggleCheat | (id, active) => void | undefined | Handler for cheat toggle. | | onSessionStart | () => void | undefined | Callback when emulator starts. | | onSessionEnd | () => void | undefined | Callback when session ends. | | onGetSaveSlots | () => Promise<SaveSlot[]> | undefined | Handler for listing save slots. | | onDeleteSaveState | (slot) => Promise | undefined | Handler for deleting a save slot. | | maxSlots | number | undefined | Maximum number of save slots allowed (for tier limits). | | currentTier | string | undefined | Current user tier (for UI display). | | retroAchievementsConfig | object | undefined | Configuration for RetroAchievements (hardcore mode, etc.). | | raUser | object | undefined | RetroAchievements user object (username, token, etc.). | | raGame | object | undefined | RetroAchievements game object. | | raAchievements | object | undefined | List of achievements. | | onRALogin | (user) => void | undefined | Callback for RA login. | | onRALogout | () => void | undefined | Callback for RA logout. | | onEmergencySave | (blob) => Promise | undefined | Handler for emergency saves (tab close/hide). |

Reliability Features

  • Save Queue: Built-in queue system prevents save corruption by serializing all save/load operations.
  • Optimized File System: Includes a patched version of Nostalgist.js to eliminate file system timeouts during heavy load (e.g., rewind buffering).
  • Emergency Saves: Automatically attempts to save progress when the tab is closed or hidden.

License

MIT © Mudit Juneja

Acknowledgements

This project wouldn't be possible without the incredible work of the open source preservation community: