Desktop app (AcidBoy.Desktop)
The acidboy program: window, graphics and audio through Raylib-cs,
gamepads through SDL3, plus the menus, the link cable and the AcidBoy Online client.
Main loop
Section titled “Main loop”DesktopApp is the hub. Each iteration:
- reads input and the menu or chat UI, or the hotkeys;
Emulate(): polls the online client and the network link (even when paused or in a menu), then runs frames untilAudioOutputhas about 50 ms of sound queued. Emulation is therefore paced by audio; without an audio device it falls back to a frame-rate cap;- draws the game, the chat overlay, the menu, notifications and the link indicator.
StepFrame has three paths:
- network link:
NetworkLink.Run; - local link: two consoles interleaved in 8 slices per frame;
- plain:
RunFrame.
EmulatorSession owns one loaded ROM and its save file.
Esc or F1 (gamepad: Guide, or Select+Start together) pauses and opens the menu:
| Item | What it does |
|---|---|
| Resume, Reset game, Quit | (Ctrl+Q quits from anywhere) |
| Open ROM… | Built-in file browser (also Ctrl+O): folders and .gb/.gbc/.sgb, drive list on Windows, Backspace for the parent folder, type a letter to jump |
| Recent ROMs | The last 10 games |
| Link cable… | Two games in one window, or host, find (on the local network) or join a direct network game (Link cable) |
| Online… | AcidBoy Online (Online client) |
| Settings | Below |
![]() Main menu |
![]() Open ROM |
The menu toolkit (Ui/) is immediate-mode:
MenuSystemkeeps a stack ofMenuScreens built fromMenuItems (label, value, hint, enabled, activate, adjust).LiveMenuScreenrebuilds its items when the data they show changes.UiInputmerges keyboard, mouse and every controller.
Text is drawn with a system TrueType font (UiText: Segoe UI, Arial, DejaVu or Noto) so accents
and Greek/Cyrillic letters display. Without one, it falls back to raylib’s ASCII font.
Settings
Section titled “Settings”| Setting | Values |
|---|---|
| Hardware model | Auto, DMG, MGB, CGB, AGB, SGB, SGB2 (applies on load or reset) |
| DMG palette | Green, Gray, Pocket, Light |
| SGB border, window scale, fullscreen, volume, fast-forward speed | |
| Video effects… | Filter (Scanlines, LCD grid, CRT, Smooth), effect strength, frame blending, GBC color correction |
| Controls… | Remap every action for keyboard and gamepad; swap gamepad A/B |
| Controllers… | Players 1-4, stick sensitivity, rumble, setup for unrecognized controllers |
| Restore defaults | Everything except recent ROMs, controller assignments, link addresses and the online sign-in |
![]() Settings |
![]() Video effects |
Filters run in a GLSL 3.30 shader; if a GPU can’t compile it, the picture is drawn unfiltered.
Settings are saved in settings.json:
| System | Folder |
|---|---|
| Windows | %APPDATA%\AcidBoy |
| macOS | ~/Library/Application Support/AcidBoy |
| Linux | ~/.config/AcidBoy |
Command-line options override settings for one run only. New settings fields must also be handled in
Settings.Normalize() and RestoreDefaults().
Controls
Section titled “Controls”| Game Boy | Keyboard | Gamepad |
|---|---|---|
| D-pad | Arrow keys | D-pad / left stick |
| A | X | Right face button (Xbox B, Circle, Switch A) |
| B | Z | Bottom or left face button |
| Start | Enter | Start / Menu / Options / + |
| Select | Backspace or Right Shift | Back / View / Share / - |
| Fast forward (hold) | Tab | Right shoulder or trigger |
Other keys:
| Key | Action |
|---|---|
| P | Pause |
| R | Reset |
| B | Toggle the SGB border |
| F11 | Fullscreen |
| F2 | Switch the game you control in a two-game link |
| T | Online chat |
| Y / N | Answer a challenge or invite pop-up |
| F9 | RAM dump (Debug builds only) |
All game and hotkey actions can be remapped in Settings > Controls…:
Gamepad bindings are by button position, so the defaults mirror the Game Boy’s A-right/B-left layout on every controller. Labels come from the controller type. Menu confirm and cancel swap on Nintendo pads.
Controllers (Input/)
Section titled “Controllers (Input/)”- Backends: SDL3 (
SdlInput) is the main one. It has drivers for Xbox, PlayStation 4/5, the Switch Pro Controller and Joy-Cons, and a database of thousands more. Raylib (RaylibInput) is the fallback if SDL3 can’t load; it has no rumble, no LEDs and no setup screen. - Players:
InputManagermaps bindings to actions per player. The keyboard is always player 1; players 2-4 are used by Super Game Boy multi-player games and by the second game in a local link. - Unrecognized controllers: set them up in Settings → Controllers → set up. The result is written
as an SDL mapping to
gamecontrollerdb.txtnext tosettings.json.
Video (Video/)
Section titled “Video (Video/)”GameView holds a texture and a FrameBlender per displayed console. VideoEffects holds the shader.
Line effects fade out below 3x scale, where they would only cause aliasing.
![]() Filter: None |
![]() Filter: CRT |
Command line
Section titled “Command line”acidboy [rom] [--model dmg|mgb|cgb|agb|sgb|sgb2] [--dmg] [--no-border] [--gray] [--scale n] [--filter none|scanlines|lcd|crt|smooth] [--mute] [--link-local rom2 | --link-host [port] | --link-join host[:port]] [--server url]acidboy rom --headless [--seconds n] [--screenshot out.png]acidboy --ram-diff a.ram b.ram| Option | Meaning |
|---|---|
--model, --dmg |
Console to emulate (default: auto) |
--no-border, --gray, --scale, --filter, --mute |
Display and sound for this run |
--link-local <rom> |
Link a second game side by side in this window |
--link-host [port], --link-join <addr> |
Direct network link (default port 5738) |
--server <url> |
AcidBoy Online server for this run (its sign-in is not saved) |
--headless |
No window; prints serial output, stops early on Blargg Passed/Failed or the Mooneye success signature |
--seconds, --screenshot |
Headless: maximum emulated seconds; save the last frame as an image |
--ram-diff <a> <b> |
Compare two RAM dumps (Win detection) |
Standalone builds
Section titled “Standalone builds”dotnet publish src/AcidBoy.Desktop -c Release -r win-x64 --self-containeddotnet publish src/AcidBoy.Desktop -c Release -r linux-x64 --self-containeddotnet publish src/AcidBoy.Desktop -c Release -r osx-arm64 --self-contained # or osx-x64Both Raylib-cs and SDL3 ship native libraries for every target.






