node-mgba 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,19 +5,17 @@
|
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](#)
|
|
7
7
|
|
|
8
|
-
> **
|
|
8
|
+
> **Scriptable, headless mGBA emulator for Node.js — like PyBoy, but powered by `libmgba` for Game Boy, GBC, and GBA.**
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
`node-mgba` provides native Node.js bindings to the C `libmgba` core. It is built for scripting, agent automation, and machine learning research, giving you direct programmatic control over the emulator:
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
- **Headless & fast:** Runs without a GUI window at 1,000+ to 3,400+ FPS.
|
|
13
|
+
- **Controls & state:** Step frames, inject button inputs, and save/load state in memory or to disk.
|
|
14
|
+
- **Direct memory access:** Read and write directly to memory buses (WRAM, VRAM, HRAM) without socket overhead.
|
|
15
|
+
- **Screen & audio capture:** Grab raw pixel buffers, encode to PNG/WebP, or stream audio/video frames.
|
|
16
|
+
- **Plugin decoders:** Optional high-level memory decoders (includes Pokémon Red/Blue state parsing).
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **Multi-Console Emulation**: Game Boy (GB), Game Boy Color (GBC), Super Game Boy (SGB), and Game Boy Advance (GBA).
|
|
17
|
-
- **Automation & Scripting**: Programmatic frame stepping, button presses, input sequences, and condition-based waiting (`waitFor`).
|
|
18
|
-
- **Memory & Savestates**: Direct memory read/write, multi-address batch reads, and file or in-memory savestates.
|
|
19
|
-
- **Extensible Plugins & Schemas**: Declarative binary schema DSL and high-level game state plugins (including built-in Pokémon Red/Blue state decoders).
|
|
20
|
-
- **Media Capture & Streaming**: Capture frames as PNG/WebP, record video with FFmpeg, or stream audio and video over WebSockets.
|
|
18
|
+
Originally built to power the 24/7 autonomous agent on **[Gemini Plays Pokémon](https://www.twitch.tv/gemini_plays_pokemon/about)** ([web viewer](https://gpp-viewer.arisef.org)).
|
|
21
19
|
|
|
22
20
|
## Installation
|
|
23
21
|
|
|
@@ -193,6 +191,23 @@ export ROM_PATH="/path/to/game.gb"
|
|
|
193
191
|
pnpm test
|
|
194
192
|
```
|
|
195
193
|
|
|
194
|
+
### Interactive Web GUI Studio
|
|
195
|
+
|
|
196
|
+
`node-mgba` includes a built-in Vue 3 web interface for debugging emulation, testing input sequences, and inspecting real-time RAM decoding:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Build the native shim, TypeScript, and GUI bundle
|
|
200
|
+
pnpm run build
|
|
201
|
+
|
|
202
|
+
# Launch the GUI server with a Game Boy ROM (opens at http://localhost:3456)
|
|
203
|
+
ROM_PATH="/path/to/game.gb" pnpm run gui
|
|
204
|
+
|
|
205
|
+
# Or run the GUI frontend in Vite development mode with hot-reloading
|
|
206
|
+
pnpm run gui:dev
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
> **Note**: The GUI's state inspector and telemetry HUD panels are currently tailored specifically for **Pokémon Red & Blue** (displaying real-time party stats, inventory, badges, and map coordinates).
|
|
210
|
+
|
|
196
211
|
---
|
|
197
212
|
|
|
198
213
|
## Subpath Exports
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-mgba",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"packageManager": "pnpm@10.19.0",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Scriptable, headless Game Boy and GBA emulator for Node.js powered by libmgba",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"types": "dist/src/index.d.ts",
|