Skip to content

AcidBoy documentation

AcidBoy is a Game Boy / Game Boy Color emulator written in C# (.NET 10). AcidBoy Online adds accounts, lobbies, chat and link-cable play over the internet, with an admin dashboard for the people who run the server.

flowchart LR
    subgraph PC1["Player 1's PC"]
        E1["AcidBoy emulator<br/>(AcidBoy.Desktop on<br/>AcidBoy.Client + AcidBoy.Core)"]
    end
    subgraph PC2["Player 2's PC"]
        E2["AcidBoy emulator"]
    end
    subgraph Server["AcidBoy server (ASP.NET Core)"]
        API["REST API<br/>/auth, /me, /leaderboards"]
        Hub["Lobby hub (SignalR)<br/>/hubs/lobby"]
        Relay["Link relay (WebSocket)<br/>/relay/{matchId}"]
        Admin["Admin dashboard (Blazor)<br/>/admin"]
    end
    DB[(PostgreSQL)]
    GH["GitHub / Discord / Google<br/>(OAuth)"]
    Staff["Staff browser"]

    E1 -- HTTPS --> API
    E2 -- HTTPS --> API
    E1 <-- WebSocket --> Hub
    E2 <-- WebSocket --> Hub
    E1 <-- "link cable bytes" --> Relay
    Relay <-- "link cable bytes" --> E2
    Staff -- HTTPS --> Admin
    API --- DB
    Hub --- DB
    Relay --- DB
    Admin --- DB
    API -. sign-in .-> GH
    Admin -. sign-in .-> GH
Page What it covers
Start here Getting started Build, run, test; set up a local server with sign-in and two linked emulators
Emulator Emulator core CPU, bus timing, PPU, APU, hardware models, Super Game Boy, cartridges and saves
Desktop app Window, main loop, menus, settings, controls, controllers, video effects, command line
Mobile app The Android and iOS app: library, touch controls, controllers, saves, how it’s built
Link cable Local and network link, the lockstep and the wire protocol (version 5)
Online client Sign-in, lobby, chat, challenges, friends, match history, records and leaderboards in the emulator
Win detection Result trackers for Tetris, Dr. Mario and Pokémon, and how to add a game
Game server Server overview Components, configuration, deployment
Authentication OAuth for a desktop app (loopback + PKCE), tokens, the dev login, bans
REST API Every HTTP endpoint and its data
Lobby hub The real-time lobby: presence, channels, rooms, chat, challenges
Link relay How two emulators’ link cables are joined through the server
Data model and results Database tables, match outcomes, records, leaderboards
Admin panel Admin dashboard Access, roles, every page, moderation and its effects, security, styling
Contributing Development guide Repository layout, tests, conventions and how to extend each part
Troubleshooting Common problems and how to diagnose them
Project Path Role
AcidBoy.Core src/AcidBoy.Core The emulator itself; no dependencies, platform independent
AcidBoy.Client src/AcidBoy.Client Shared by the desktop and mobile apps: sessions and saves, game library, emulation thread, audio buffer, frame blending, palettes
AcidBoy.Desktop src/AcidBoy.Desktop The acidboy app: window, audio, input, menus, link cable, AcidBoy Online client
AcidBoy.Mobile src/AcidBoy.Mobile The Android and iOS app (.NET MAUI + SkiaSharp)
AcidBoy.Online.Contracts src/server/AcidBoy.Online.Contracts Data types and hub method names shared by the server and the emulator
AcidBoy.Server src/server/AcidBoy.Server The game server: auth, lobby, relay, results, admin dashboard
AcidBoy.Tests tests/AcidBoy.Tests Emulator, desktop and shared client tests
AcidBoy.Server.Tests tests/AcidBoy.Server.Tests Server integration tests (PostgreSQL in Docker)

How the projects depend on each other (arrows point at what a project references):

flowchart TB
    subgraph ui["src/ui"]
        Desktop["AcidBoy.Desktop<br/>Raylib + SDL3"]
        Mobile["AcidBoy.Mobile<br/>.NET MAUI + SkiaSharp"]
    end
    subgraph infra["src/infra"]
        Client["AcidBoy.Client<br/>shared app code, no packages"]
        Core["AcidBoy.Core<br/>the emulator, no dependencies"]
    end
    subgraph server["src/server"]
        Contracts["AcidBoy.Online.Contracts"]
        Server["AcidBoy.Server"]
    end
    Desktop --> Client
    Mobile --> Client
    Client --> Core
    Desktop --> Contracts
    Server --> Contracts

AcidBoy.Client holds everything the two apps share that needs no platform code. The desktop uses its session, audio buffer, frame blending, palettes, filter and model definitions. The mobile app uses all of those plus the emulation thread (EmulatorHost) and the game library with its name and box-art lookup (GameLibrary, GameDatabase).