Wire Chat 1.1: Claude Code sessions on a Game Boy Advance, Game Boy Color, 3DS or PS Vita
=====================================================================================

A personal hobby project, shared as is, with no warranty. Write-up and full setup guide:
https://jamesbrine.com.au/wire-chat-claude-code-game-boy/

Contents
--------
relay/                       The relay: a small Python service on the Linux PC that runs Claude Code.
  gba_claude_relay.py, glwire.py, perm_mcp.py, sessions.py, tools.py, usage.py
  wire-chat-relay.service    systemd user unit (edit --bind to your PC's LAN address first)
bridge-firmware/             ESP32 bridge firmware 1.2 (build 6), for the Game Boy family only
  wire-chat-bridge-esp32c3-full.bin   ESP32-C3 SuperMini (GBA bridge), whole image, write at 0x0
  wire-chat-bridge-esp32c3-app.bin    ESP32-C3 update, app only, write at 0x10000 (keeps Wi-Fi, pairing, settings)
  wire-chat-bridge-esp32s3-full.bin   ESP32-S3 dev board (GBC bridge, GPIO 16/17/19), whole image, write at 0x0
  wire-chat-bridge-esp32s3-app.bin    ESP32-S3 update, app only, write at 0x10000
gba/wire_chat_gba_1.1.gba    Game Boy Advance ROM (Wire Chat 1.1)
gbc/wire_chat_gbc_1.1.gbc    Game Boy Color ROM (Wire Chat GBC 1.1; Color only, not the original Game Boy)
3ds/wire_chat_3ds_1.0.cia    3DS app (use the .cia or the .3dsx, not both)
3ds/wire_chat_3ds_1.0.3dsx
vita/wire_chat_vita_1.0.vpk  PS Vita app
licenses/                    Licences of the fonts, word list and libraries included in the builds
SHA256SUMS.txt               Checksums of every file

The 3DS and the Vita talk to the relay over their own Wi-Fi; they need no bridge. The S3 image starts in
Game Boy link mode; the C3 image is for the GBA. There is no image for the ESP32-WROOM-32 in this release.

Quick start
-----------
1. Relay (Linux, Python 3.8+ with the websockets package 10 to 13, Claude Code installed and logged in):
     mkdir -p ~/.local/share/wire-chat-relay ~/.config/systemd/user
     cp relay/*.py ~/.local/share/wire-chat-relay/
     cp relay/wire-chat-relay.service ~/.config/systemd/user/
     (edit --bind in the .service file to your PC's LAN address)
     systemctl --user daemon-reload && systemctl --user enable --now wire-chat-relay
     loginctl enable-linger "$USER"
   It listens on your LAN only. Do not forward its port on your router. It uses the Claude Code login you
   already have and never needs an API key. The usage page's Today and This week use the PC's time zone;
   set WIRE_CHAT_UTC_OFFSET in the .service file to override it.
2. Bridge (GBA and GBC only): flash the full image at 0x0, for example
     esptool --chip esp32c3 --port /dev/ttyACM0 write-flash 0x0 bridge-firmware/wire-chat-bridge-esp32c3-full.bin
   Join its setup Wi-Fi "ucor-advance" from a phone, pick your home network, then open http://<bridge address>/,
   set "Wire Chat relay" to <your relay address>:8765 and save. For the GBC, check "Link cable" is set to
   Game Boy / Game Boy Color before plugging the console in.
3. Handheld: copy the ROM to the flashcart (a new file name for every build), or install the 3DS or Vita app with
   your homebrew setup, then set the relay address in the app's settings (3DS and Vita).
4. Pair: the handheld shows an 8 character code. Open http://<your relay address>:8765/ on a phone or PC on the
   same Wi-Fi, type the code and press Pair. Nothing runs on your PC without your answer on the handheld.

Wiring, controls, the optional away-from-home tunnel and troubleshooting are in the write-up linked above.

Licences
--------
The bridge firmware is built on Arduino-ESP32 and ESP-IDF and includes the WebSockets library (LGPL 2.1), WiFiManager,
ArduinoJson and qrcodegen (MIT). The handheld apps use the Inter Tight and JetBrains Mono fonts (SIL Open Font
Licence 1.1); the keyboard's word list is derived from WordNet. See licenses/.
