# shauninman/minui-legacy-rg35xx architecture

> Architecture diagram of the GitHub repository shauninman/minui-legacy-rg35xx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shauninman/minui-legacy-rg35xx
- Repository: https://github.com/shauninman/minui-legacy-rg35xx

## Overview

MinUI is a focused handheld-console launcher. A player browses the SD-card library, selects a game, and runs it through MinArch and a libretro core; the README also describes save-state resume, disc switching, emulator options, sleep, and automatic power-off. The graph preserves those capabilities and the shared platform layer. Some launch and sleep implementation details are unsampled, so their connections are shown only where documented; paths for unsampled subsystems use existing directories.

Main entry points: [`src/minarch/minarch.c`](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minarch/minarch.c) (MinArch Frontend), [`src/minui/minui.c`](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minui/minui.c) (Game Launcher), [`src/common/api.c`](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/common/api.c) (Graphics and Input), [`src/libmsettings/msettings.c`](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/libmsettings/msettings.c) (Shared Settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher"]
  node_minui["Game Launcher<br/>[minui.c]"]
  node_library["Game Library<br/>[minui.c]"]
  node_resume["Resume Handling<br/>[minui.c]"]
  node_roms["ROM Folders"]
  node_user_data[("Save Data")]
end

subgraph group_emulation["Emulation"]
  node_minarch["MinArch Frontend<br/>[minarch.c]"]
  node_cores["Libretro Cores"]
  node_emu_paks["Emulator Packages"]
end

subgraph group_platform["Platform Services"]
  node_gfx["Graphics and Input<br/>[api.c]"]
  node_scaling["Frame Scaling<br/>[scaler_neon.c]"]
  node_settings[("Shared Settings<br/>[msettings.c]")]
  node_keymon["Key Monitor<br/>[keymon.c]"]
  node_power["Sleep and Power<br/>[api.c]"]
end

subgraph group_system["System Tools"]
  node_clock["Clock Tool<br/>[clock.c]"]
  node_overclock["Overclock Tool<br/>[overclock.c]"]
  node_boot["Boot and Update<br/>[boot.sh]"]
end

node_player(("Player"))
node_device["Handheld Device"]

node_player -->|"browses and selects"| node_minui
node_minui -->|"shows games"| node_library
node_library -->|"scans folders"| node_roms
node_minui -->|"checks auto-resume"| node_resume
node_resume -.->|"launches game"| node_minarch
node_minui -->|"finds emulator packages"| node_emu_paks
node_emu_paks -.->|"starts frontend"| node_minarch
node_minarch -->|"runs core"| node_cores
node_minarch -->|"supports save-state resume"| node_user_data
node_minarch -->|"uses platform API"| node_gfx
node_minarch -->|"initializes settings"| node_settings
node_minarch -->|"uses scaler"| node_scaling
node_minui -->|"uses platform API"| node_gfx
node_minui -->|"updates sleep state"| node_power
node_power -->|"sleeps and powers off"| node_device
node_keymon -->|"shares settings"| node_settings
node_clock -->|"uses platform API"| node_gfx
node_clock -->|"initializes settings"| node_settings
node_boot -.->|"boots system"| node_device

click node_minui "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minui/minui.c"
click node_library "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minui/minui.c"
click node_resume "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minui/minui.c"
click node_roms "https://github.com/shauninman/minui-legacy-rg35xx/tree/main/skeleton/BASE/Roms"
click node_user_data "https://github.com/shauninman/minui-legacy-rg35xx/tree/main/skeleton/BASE/Saves"
click node_minarch "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minarch/minarch.c"
click node_cores "https://github.com/shauninman/minui-legacy-rg35xx/tree/main/cores"
click node_emu_paks "https://github.com/shauninman/minui-legacy-rg35xx/tree/main/skeleton/SYSTEM/rg35xx/paks/Emus"
click node_gfx "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/common/api.c"
click node_scaling "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/common/scaler_neon.c"
click node_settings "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/libmsettings/msettings.c"
click node_keymon "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/keymon/keymon.c"
click node_power "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/common/api.c"
click node_clock "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/clock/clock.c"
click node_overclock "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/overclock/overclock.c"
click node_boot "https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/boot/boot.sh"

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_minui,node_library,node_resume,node_roms,node_user_data toneBlue
class node_minarch,node_cores,node_emu_paks toneAmber
class node_gfx,node_scaling,node_settings,node_keymon,node_power toneMint
class node_clock,node_overclock,node_boot toneRose
class node_player,node_device toneIndigo
```

## Components

### Launcher

- [Game Launcher](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minui/minui.c): `src/minui/minui.c`
- [Game Library](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minui/minui.c): `src/minui/minui.c`
- [Resume Handling](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minui/minui.c): `src/minui/minui.c`
- [ROM Folders](https://github.com/shauninman/minui-legacy-rg35xx/tree/main/skeleton/BASE/Roms): `skeleton/BASE/Roms`
- [Save Data](https://github.com/shauninman/minui-legacy-rg35xx/tree/main/skeleton/BASE/Saves): `skeleton/BASE/Saves`

### Emulation

- [MinArch Frontend](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/minarch/minarch.c): `src/minarch/minarch.c`
- [Libretro Cores](https://github.com/shauninman/minui-legacy-rg35xx/tree/main/cores): `cores`
- [Emulator Packages](https://github.com/shauninman/minui-legacy-rg35xx/tree/main/skeleton/SYSTEM/rg35xx/paks/Emus): `skeleton/SYSTEM/rg35xx/paks/Emus`

### Platform Services

- [Graphics and Input](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/common/api.c): `src/common/api.c`
- [Frame Scaling](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/common/scaler_neon.c): `src/common/scaler_neon.c`
- [Shared Settings](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/libmsettings/msettings.c): `src/libmsettings/msettings.c`
- [Key Monitor](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/keymon/keymon.c): `src/keymon/keymon.c`
- [Sleep and Power](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/common/api.c): `src/common/api.c`

### System Tools

- [Clock Tool](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/clock/clock.c): `src/clock/clock.c`
- [Overclock Tool](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/overclock/overclock.c): `src/overclock/overclock.c`
- [Boot and Update](https://github.com/shauninman/minui-legacy-rg35xx/blob/main/src/boot/boot.sh): `src/boot/boot.sh`

### Other components

- **Player**
- **Handheld Device**

## Connections

- Player → Game Launcher: browses and selects (evidence: `README.md`)
- Game Launcher → Game Library: shows games (evidence: `src/minui/minui.c`)
- Game Library → ROM Folders: scans folders (evidence: `src/minui/minui.c`)
- Game Launcher → Resume Handling: checks auto-resume (evidence: `src/minui/minui.c`)
- Resume Handling → MinArch Frontend: launches game
- Game Launcher → Emulator Packages: finds emulator packages (evidence: `src/minui/minui.c`)
- Emulator Packages → MinArch Frontend: starts frontend
- MinArch Frontend → Libretro Cores: runs core (evidence: `README.md`)
- MinArch Frontend → Save Data: supports save-state resume (evidence: `README.md`)
- MinArch Frontend → Graphics and Input: uses platform API (evidence: `src/minarch/minarch.c`)
- MinArch Frontend → Shared Settings: initializes settings (evidence: `src/minarch/minarch.c`)
- MinArch Frontend → Frame Scaling: uses scaler (evidence: `src/minarch/minarch.c`)
- Game Launcher → Graphics and Input: uses platform API (evidence: `src/minui/minui.c`)
- Game Launcher → Sleep and Power: updates sleep state (evidence: `src/minui/minui.c`)
- Sleep and Power → Handheld Device: sleeps and powers off (evidence: `README.md`)
- Key Monitor → Shared Settings: shares settings (evidence: `src/libmsettings/msettings.c`)
- Clock Tool → Graphics and Input: uses platform API (evidence: `src/clock/clock.c`)
- Clock Tool → Shared Settings: initializes settings (evidence: `src/clock/clock.c`)
- Boot and Update → Handheld Device: boots system
