gboy-ts

A Game Boy emulator written in TypeScript. Runs in the browser, on servers, and in serverless functions. View source on GitHub.

gboy-ts GAME BOY
Loading Pocket...
A
B

Install

npm install gboy-ts
import { Emulator, Button } from "gboy-ts";

const rom = new Uint8Array(await fetch("rom.gb").then(r => r.arrayBuffer()));
const emu = new Emulator(rom);

emu.runFrames(60);
emu.pressButton(Button.A);
emu.runFrames(10);

const framebuffer = emu.getFramebuffer(); // 160x144 RGBA Uint8Array
const saveState  = emu.serialize();       // ~110KB, excludes ROM