# ducalex/retro-go architecture

> Architecture diagram of the GitHub repository ducalex/retro-go, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ducalex/retro-go
- Repository: https://github.com/ducalex/retro-go

## Overview

Retro-Go is ESP32 firmware that presents a launcher and a collection of retro-game applications. The principal workflow is browsing ROMs, selecting a game, and handing off to its system-specific emulator; the README documents broad emulator coverage and launcher features. The shared retro-go component supplies device services, including storage and user-interface facilities. Source excerpts are limited, so most subsystem links below rely on explicit README descriptions; they do not assert unobserved internal calls.

Main entry points: [`retro-core/main/main.c`](https://github.com/ducalex/retro-go/blob/master/retro-core/main/main.c) (System dispatcher), [`launcher/main/applications.c`](https://github.com/ducalex/retro-go/blob/master/launcher/main/applications.c) (ROM catalog), [`components/retro-go/rg_system.h`](https://github.com/ducalex/retro-go/blob/master/components/retro-go/rg_system.h) (Device services), [`launcher/main/main.c`](https://github.com/ducalex/retro-go/blob/master/launcher/main/main.c) (Launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher"]
  node_launcher_app["Launcher<br/>[main.c]"]
  node_rom_catalog["ROM catalog<br/>[applications.c]"]
  node_bookmarks["Favorites<br/>[bookmarks.c]"]
  node_file_browser["File browser<br/>[browser.c]"]
  node_launcher_gui["Launcher UI<br/>[gui.c]"]
end

subgraph group_platform["Device platform"]
  node_retro_core["System dispatcher<br/>[main.c]"]
  node_platform_services["Device services<br/>[rg_system.h]"]
  node_storage[("ROM and save storage<br/>[rg_storage.c]")]
  node_display_audio_input["Display, audio, input"]
end

subgraph group_emulation["Emulator applications"]
  node_gb_nes_sms["GB, NES, SMS"]
  node_snes_lynx_pce["SNES, Lynx, PCE"]
  node_game_watch["Game &amp; Watch<br/>[gw_system.c]"]
  node_msx["MSX emulator<br/>[MSX.c]"]
  node_genesis["Genesis emulator"]
  node_doom["DOOM application"]
end

subgraph group_network["Network tools"]
  node_web_file_manager["Wi-Fi file manager<br/>[webui.c]"]
  node_wifi_service["Wi-Fi service<br/>[rg_network.c]"]
end

node_player(("Player"))

node_player -->|"browses"| node_launcher_app
node_launcher_app -->|"lists games"| node_rom_catalog
node_rom_catalog -.->|"scans ROMs"| node_storage
node_rom_catalog -->|"offers favorites"| node_bookmarks
node_rom_catalog -.->|"starts application"| node_retro_core
node_player -->|"configures options"| node_launcher_gui
node_retro_core -->|"dispatches systems"| node_gb_nes_sms
node_retro_core -->|"dispatches systems"| node_snes_lynx_pce
node_retro_core -->|"dispatches system"| node_game_watch
node_retro_core -.->|"starts emulator"| node_msx
node_retro_core -.->|"starts emulator"| node_genesis
node_player -->|"plays DOOM"| node_doom
node_player -->|"manages files"| node_web_file_manager
node_web_file_manager -.->|"uses network"| node_wifi_service
node_platform_services -->|"exposes storage"| node_storage
node_retro_core -->|"initializes"| node_platform_services
node_platform_services -.->|"provides device I/O"| node_display_audio_input

click node_launcher_app "https://github.com/ducalex/retro-go/blob/master/launcher/main/main.c"
click node_rom_catalog "https://github.com/ducalex/retro-go/blob/master/launcher/main/applications.c"
click node_bookmarks "https://github.com/ducalex/retro-go/blob/master/launcher/main/bookmarks.c"
click node_file_browser "https://github.com/ducalex/retro-go/blob/master/launcher/main/browser.c"
click node_launcher_gui "https://github.com/ducalex/retro-go/blob/master/launcher/main/gui.c"
click node_web_file_manager "https://github.com/ducalex/retro-go/blob/master/launcher/main/webui.c"
click node_retro_core "https://github.com/ducalex/retro-go/blob/master/retro-core/main/main.c"
click node_platform_services "https://github.com/ducalex/retro-go/blob/master/components/retro-go/rg_system.h"
click node_storage "https://github.com/ducalex/retro-go/blob/master/components/retro-go/rg_storage.c"
click node_display_audio_input "https://github.com/ducalex/retro-go/tree/master/components/retro-go"
click node_gb_nes_sms "https://github.com/ducalex/retro-go/tree/master/retro-core/components"
click node_snes_lynx_pce "https://github.com/ducalex/retro-go/tree/master/retro-core/components"
click node_game_watch "https://github.com/ducalex/retro-go/blob/master/retro-core/components/gw-emulator/src/gw_sys/gw_system.c"
click node_msx "https://github.com/ducalex/retro-go/blob/master/fmsx/components/fmsx/src/fMSX/MSX.c"
click node_genesis "https://github.com/ducalex/retro-go/tree/master/gwenesis/components/gwenesis/src"
click node_doom "https://github.com/ducalex/retro-go/tree/master/prboom-go/components/prboom"
click node_wifi_service "https://github.com/ducalex/retro-go/blob/master/components/retro-go/rg_network.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher_app,node_rom_catalog,node_bookmarks,node_file_browser,node_launcher_gui toneBlue
class node_retro_core,node_platform_services,node_storage,node_display_audio_input toneAmber
class node_gb_nes_sms,node_snes_lynx_pce,node_game_watch,node_msx,node_genesis,node_doom toneMint
class node_web_file_manager,node_wifi_service toneRose
class node_player toneIndigo
```

## Components

### Launcher

- [Launcher](https://github.com/ducalex/retro-go/blob/master/launcher/main/main.c): `launcher/main/main.c`
- [ROM catalog](https://github.com/ducalex/retro-go/blob/master/launcher/main/applications.c): `launcher/main/applications.c`
- [Favorites](https://github.com/ducalex/retro-go/blob/master/launcher/main/bookmarks.c): `launcher/main/bookmarks.c`
- [File browser](https://github.com/ducalex/retro-go/blob/master/launcher/main/browser.c): `launcher/main/browser.c`
- [Launcher UI](https://github.com/ducalex/retro-go/blob/master/launcher/main/gui.c): `launcher/main/gui.c`

### Device platform

- [System dispatcher](https://github.com/ducalex/retro-go/blob/master/retro-core/main/main.c): `retro-core/main/main.c`
- [Device services](https://github.com/ducalex/retro-go/blob/master/components/retro-go/rg_system.h): `components/retro-go/rg_system.h`
- [ROM and save storage](https://github.com/ducalex/retro-go/blob/master/components/retro-go/rg_storage.c): `components/retro-go/rg_storage.c`
- [Display, audio, input](https://github.com/ducalex/retro-go/tree/master/components/retro-go): `components/retro-go`

### Emulator applications

- [GB, NES, SMS](https://github.com/ducalex/retro-go/tree/master/retro-core/components): `retro-core/components`
- [SNES, Lynx, PCE](https://github.com/ducalex/retro-go/tree/master/retro-core/components): `retro-core/components`
- [Game & Watch](https://github.com/ducalex/retro-go/blob/master/retro-core/components/gw-emulator/src/gw_sys/gw_system.c): `retro-core/components/gw-emulator/src/gw_sys/gw_system.c`
- [MSX emulator](https://github.com/ducalex/retro-go/blob/master/fmsx/components/fmsx/src/fMSX/MSX.c): `fmsx/components/fmsx/src/fMSX/MSX.c`
- [Genesis emulator](https://github.com/ducalex/retro-go/tree/master/gwenesis/components/gwenesis/src): `gwenesis/components/gwenesis/src`
- [DOOM application](https://github.com/ducalex/retro-go/tree/master/prboom-go/components/prboom): `prboom-go/components/prboom`

### Network tools

- [Wi-Fi file manager](https://github.com/ducalex/retro-go/blob/master/launcher/main/webui.c): `launcher/main/webui.c`
- [Wi-Fi service](https://github.com/ducalex/retro-go/blob/master/components/retro-go/rg_network.c): `components/retro-go/rg_network.c`

### Other components

- **Player**

## Connections

- Player → Launcher: browses (evidence: `README.md`)
- Launcher → ROM catalog: lists games (evidence: `launcher/main/main.c`)
- ROM catalog → ROM and save storage: scans ROMs
- ROM catalog → Favorites: offers favorites (evidence: `launcher/main/applications.c`)
- ROM catalog → System dispatcher: starts application
- Player → Launcher UI: configures options
- System dispatcher → GB, NES, SMS: dispatches systems (evidence: `retro-core/main/main.c`)
- System dispatcher → SNES, Lynx, PCE: dispatches systems (evidence: `retro-core/main/main.c`)
- System dispatcher → Game & Watch: dispatches system (evidence: `retro-core/main/main.c`)
- System dispatcher → MSX emulator: starts emulator
- System dispatcher → Genesis emulator: starts emulator
- Player → DOOM application: plays DOOM (evidence: `README.md`)
- Player → Wi-Fi file manager: manages files (evidence: `README.md`)
- Wi-Fi file manager → Wi-Fi service: uses network
- Device services → ROM and save storage: exposes storage (evidence: `components/retro-go/rg_system.h`)
- System dispatcher → Device services: initializes (evidence: `retro-core/main/main.c`)
- Device services → Display, audio, input: provides device I/O (evidence: `components/retro-go/rg_system.h`)
