HFO4 / gameboy.live
🕹️ A basic gameboy emulator with terminal "Cloud Gaming" support
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing HFO4/gameboy.live in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewGameboy.Live 🕹️ is a Gameboy emulator written in go for learning purposes. You can simply play Gameboy games on your desktop: Or, "Cloud Game" in your terminal with a single command (The demo server is down now, you have to deploy on you own server): Even play with other visitors together on someone's GitHub profile: Installation You can directly download the executable file from the Release page, or build it from the source. Go Version 1.11 or higher is required. Run to check what the version currently installed is. On Debian based systems, the packages and must be installed. Usage GUI mode Play a specified ROM file in GUI mode: Set up a telnet Cloud Gaming server You can use as a "Cloud Gaming" server, where players use telnet to play Gameboy games in terminal without additional software installation required. (Except telnet itself xD) A config file is required to specify game options. This is a typical example: It is recommended to test every ROM before putting them in the config file. Next, start a server with the config file from the previous step: You will see an output like this, which means your server has started successfully: Now, you can play games anywhere you want! The simulation and rendering process is done entirely on the server. "Cloud Gaming" is only supported in terminals which support standard ANSI and the UTF-8 charset. You can use instead of on Windows. Set up a static Cloud Gaming server You can also set up a static cloud gaming server, where one specific game is emulated, everone can play it cooperatively by clicking hyperlinks. Start such a server with folowing command: A HTTP server will start up on default port , these HTTP routes is avaliable to use: | Routes | Method | Description | | ----------------------------------------------------- | ------ | ------------------------------------------------------------ | | | GET | Show the latest game screenshot. | | | GET | Show the latest game screenshot with Gameboy style border and clickable gamepad. An SVG template is required. | | | GET | Send new gamepad input. | WebSockets streaming Thanks to szymonWojdat, you can use websockets interface for sending static images so that you don't need to reload the website after each button press. Make sure the static server above is already started up on default port . • Use route in order to start a websocket communication channel. • Images will be streamed to the client in PNG encoding. • The client can send their input commands in text format using one of these codes: • Right Arrow: • Left Arrow: • Up Arrow: • Down Arrow: • A: • B: • Select: • Start: • check out for a simple demo and don't forget to run the server before by using the command above 🌝 Debug has a simple built-in debugger. To turn on debug mode, set the flag to : The emulator will firstly break at the ROM entry point in debug mode, which is the entry point of the game program. You can type the address of next breakpoint. The emulator will continue to run until the next breakpoint is reached. At each breakpoint, the emulator will print the register's contents like above and dump the main memory into (ROM and RAM bank not included) Keyboard instruction | Keyboard | Gameboy | | -------- | ------- | | Enter | Start | | Backspace | Select | | ↑ | Up | | ↓ | Down | | ← | Left | | → | Right | | X | A | | Z | B | Features & TODOs • [x] CPU instruction emulation • [x] Timer and interrupt • [x] Support for ROM-only, MBC1, MBC2, MBC3 cartridge • [x] Sound emulation • [x] Graphics emulation • [x] Cloud gaming • [x] ROM debugger • [x] Game saving & restore in cartridge level There are still many TODOs: • [ ] Support Gameboy Color emulation • [ ] Support for MBC4, MBC5, HuC1 cartridge • [ ] Sound simulation is incomplete, still got differences compared to the Gameboy real machine • [ ] Sprite priority issue (see and ) • [ ] Failed to pass Blargg's instruction timing test • [ ] Game saving & restore in emulator level • [ ] Multiplayer support in cloud gaming mode Testing Contribution This emulator is just for learning and entertainment purposes. There are still many places to be perfected. Any suggestions or contributions is welcomed! Credits Thanks: • szymonWojdat Adding a WebSockets implementation. • andydotxyz Adding Fyne GUI driver and saving support for cartridges, also fixing some bugs. • maxolasersquad and tilkinsc Polishing README and documents. Reference • Pan Docs • http://www.codeslinger.co.uk/pages/projects/gameboy/beginning.html • http://www.devrs.com/gb/files/GBCPU_Instr.html • https://github.com/Humpheh/goboy • The Ultimate Game Boy Talk (33c3) • http://gameboy.mongenel.com/dmg/asmmemmap.html • ......