Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dsi-operator

GB Operator-style cart dumper/player for a homebrewed DSi. the DSi is the dock: agent homebrew reads the cart directly over wifi, desktop cli drives it.

layout

  • agent/ — NDS homebrew (C, libnds 2.x/calico/dswifi 2.x). streams cart rom+save over TCP :5000
  • cli/ — bun + TypeScript terminal app. identifies cart, streams to local cache, launches emulator

hardware setup

  1. build agent: cd agent && make (needs devkitPro nds-dev)
  2. copy agent/dsi-operator.nds to DSi SD card
  3. launch it via Unlaunch or TWiLight Menu++ (DSi mode)
  4. it connects to your saved wifi (WPA2 via advanced slots 4-6 works) and shows its IP
  5. insert a DS cart

cli

cd cli && bun install
bun run src/index.ts config set host <dsi-ip>
bun run src/index.ts scan     # what's in the slot?
bun run src/index.ts dump     # stream rom+save to ~/.dsi-operator/games/<GAMECODE>/
bun run src/index.ts list
bun run src/index.ts play     # GB Operator flow

play with a cart inserted: dumps if not cached, seeds desmume's battery save from the cart save, launches, and writes the save back to the cart + verifies when you quit the emulator with Cmd+Q. closing its window does not quit DeSmuME on macOS. as if you played on the console.

first dump of a cart streams the whole rom (~30-60s for 32MB). after that it's cached — scan shows cache: hit and play skips the transfer.

protocol (v1)

TCP :5000, little-endian. request: u8[4] cmd | u32le arg0 | u32le arg1. response: u8[4] "OK "/"ERR " | u32le len | payload.

  • PING — liveness
  • INFO — 512-byte nds header + rom/save sizes + cart-present flag
  • RROM off len — raw rom bytes, len <= 0x8000
  • RSAV off len — raw save bytes, len <= 0x8000
  • WSAV off len + payload — write save bytes (offset 0 erases flash chips first)

desmume integration: saves are seeded/read as .dsv (raw + 122-byte footer) in the newest ~/Library/Application Support/DeSmuME/*/Battery dir, named <GAMECODE>.dsv to match the cached rom filename.

dev

  • cd cli && bun test — protocol codec + mock-agent roundtrip tests
  • bun run src/index.ts mock — local mock agent, no hardware needed

credits / licenses

  • cart read code vendored from GodMode9i (GPL-3.0)
  • wifi setup adapted from ftpd-dsi (Unlicense)

roadmap

  • auxspi saves (pokemon hg/ss infrared carts)
  • nand-save carts (warioware diy etc.)
  • udp discovery, compression
  • gui

About

DSi cart dumper and emulator save sync tool

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages