# mamesj/pokemon-fulldex architecture

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

- Interactive diagram: https://gitdiagram.com/mamesj/pokemon-fulldex
- Repository: https://github.com/mamesj/pokemon-fulldex

## Overview

Pokémon Fulldex is a multi-platform Pokémon game player built around an integrated emulator and game-aware widescreen presentation. The main workflow is selecting a user-supplied ROM, running it, and presenting gameplay; the repository also includes GBA and beta 3DS support, game-specific companion features, and optional player services. The README documents the product workflow and capabilities, while the sampled source is partial, so several internal connections are shown as unverified rather than asserted.

Main entry points: [`melonDS/src/NDS.h`](https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/NDS.h) (melonDS core), [`gba/frontend/main.cpp`](https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/main.cpp) (GBA player), [`frontend/pc_launcher.cpp`](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/pc_launcher.cpp) (Game launcher), [`frontend/rom_library.h`](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/rom_library.h) (ROM library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Game playback"]
  node_launcher["Game launcher<br/>[pc_launcher.cpp]"]
  node_rom_library["ROM library<br/>[rom_library.h]"]
  node_nds_core["melonDS core<br/>[NDS.h]"]
  node_nds_cpu["DS CPU<br/>[ARM.h]"]
  node_platform_api["Emulator platform API<br/>[Platform.h]"]
  node_wide_view["Widescreen presentation<br/>[layout.h]"]
end

subgraph group_games["Game adaptations"]
  node_gba_player["GBA player<br/>[main.cpp]"]
  node_gba_wide["GBA widescreen<br/>[pk_wide.c]"]
  node_gba_games["GBA game support<br/>[games.h]"]
  node_gba_coop["Emerald co-op<br/>[pk_coop_emerald.h]"]
  node_field_actions["DS field actions<br/>[pk_nds_field.cpp]"]
  node_three_ds["3DS beta<br/>[n3ds.h]"]
end

subgraph group_player["Player features"]
  node_dex["Pokédex<br/>[gba_dex.h]"]
  node_guides["Game guides<br/>[gba_guides.h]"]
  node_cheats["Cheats<br/>[gba_cheats.h]"]
  node_save_states["Save states<br/>[state_slots.h]"]
  node_game_hub["Pokémon hub<br/>[pokemon_hub.cpp]"]
end

subgraph group_services["Online services"]
  node_achievements["Achievements<br/>[achievements.cpp]"]
  node_ra_client["RetroAchievements client<br/>[rc_client.c]"]
  node_cloud_saves["Cloud saves<br/>[cloud_saves.cpp]"]
end

subgraph group_platform["Platform support"]
  node_android["Android integration<br/>[GameActivity.java]"]
  node_fat_storage["FAT storage<br/>[FATStorage.cpp]"]
end

node_player_actor(("Player"))
node_roms[("User ROMs")]
node_ra_server(("RetroAchievements service"))
node_cloud_service[("Cloud storage")]

node_player_actor -->|"selects game"| node_launcher
node_roms -->|"provides ROMs"| node_rom_library
node_launcher -.->|"lists games"| node_rom_library
node_rom_library -->|"starts game"| node_nds_core
node_nds_core -.->|"runs instructions"| node_nds_cpu
node_nds_core -->|"uses platform"| node_platform_api
node_nds_core -->|"feeds presentation"| node_wide_view
node_player_actor -->|"selects GBA game"| node_gba_player
node_gba_player -->|"runs with patch"| node_gba_wide
node_gba_player -.->|"supports titles"| node_gba_games
node_gba_player -.->|"offers co-op"| node_gba_coop
node_nds_core -.->|"enables field actions"| node_field_actions
node_player_actor -->|"plays beta titles"| node_three_ds
node_player_actor -.->|"opens Pokédex"| node_dex
node_player_actor -.->|"opens guides"| node_guides
node_player_actor -->|"uses cheats"| node_cheats
node_player_actor -->|"saves state"| node_save_states
node_player_actor -.->|"moves Pokémon"| node_game_hub
node_achievements -.->|"uses client"| node_ra_client
node_ra_client -.->|"requests achievements"| node_ra_server
node_cloud_saves -.->|"syncs saves"| node_cloud_service
node_android -->|"provides ROM access"| node_launcher
node_fat_storage -->|"uses file API"| node_platform_api

click node_launcher "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/pc_launcher.cpp"
click node_rom_library "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/rom_library.h"
click node_nds_core "https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/NDS.h"
click node_nds_cpu "https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/ARM.h"
click node_platform_api "https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/Platform.h"
click node_wide_view "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/layout.h"
click node_gba_player "https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/main.cpp"
click node_gba_wide "https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/pokedaisy/pk_wide.c"
click node_gba_games "https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/games.h"
click node_gba_coop "https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/pokedaisy/pk_coop_emerald.h"
click node_field_actions "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/pokedaisy/pk_nds_field.cpp"
click node_three_ds "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/n3ds.h"
click node_dex "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/gba_dex.h"
click node_guides "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/gba_guides.h"
click node_cheats "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/gba_cheats.h"
click node_save_states "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/state_slots.h"
click node_game_hub "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/pokemon_hub.cpp"
click node_achievements "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/achievements.cpp"
click node_ra_client "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/thirdparty/rcheevos/src/rc_client.c"
click node_cloud_saves "https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/cloud_saves.cpp"
click node_android "https://github.com/mamesj/pokemon-fulldex/blob/main/tools/android/allgames/java/io/github/mamesj/pokemonds/GameActivity.java"
click node_fat_storage "https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/FATStorage.cpp"

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,node_rom_library,node_nds_core,node_nds_cpu,node_platform_api,node_wide_view toneBlue
class node_gba_player,node_gba_wide,node_gba_games,node_gba_coop,node_field_actions,node_three_ds,node_roms,node_cloud_service toneAmber
class node_dex,node_guides,node_cheats,node_save_states,node_game_hub toneMint
class node_achievements,node_ra_client,node_cloud_saves toneRose
class node_android,node_fat_storage,node_player_actor,node_ra_server toneIndigo
```

## Components

### Game playback

- [Game launcher](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/pc_launcher.cpp): `frontend/pc_launcher.cpp`
- [ROM library](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/rom_library.h): `frontend/rom_library.h`
- [melonDS core](https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/NDS.h): `melonDS/src/NDS.h`
- [DS CPU](https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/ARM.h): `melonDS/src/ARM.h`
- [Emulator platform API](https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/Platform.h): `melonDS/src/Platform.h`
- [Widescreen presentation](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/layout.h): `frontend/layout.h`

### Game adaptations

- [GBA player](https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/main.cpp): `gba/frontend/main.cpp`
- [GBA widescreen](https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/pokedaisy/pk_wide.c): `gba/frontend/pokedaisy/pk_wide.c`
- [GBA game support](https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/games.h): `gba/frontend/games.h`
- [Emerald co-op](https://github.com/mamesj/pokemon-fulldex/blob/main/gba/frontend/pokedaisy/pk_coop_emerald.h): `gba/frontend/pokedaisy/pk_coop_emerald.h`
- [DS field actions](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/pokedaisy/pk_nds_field.cpp): `frontend/pokedaisy/pk_nds_field.cpp`
- [3DS beta](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/n3ds.h): `frontend/n3ds.h`

### Player features

- [Pokédex](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/gba_dex.h): `frontend/gba_dex.h`
- [Game guides](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/gba_guides.h): `frontend/gba_guides.h`
- [Cheats](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/gba_cheats.h): `frontend/gba_cheats.h`
- [Save states](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/state_slots.h): `frontend/state_slots.h`
- [Pokémon hub](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/pokemon_hub.cpp): `frontend/pokemon_hub.cpp`

### Online services

- [Achievements](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/achievements.cpp): `frontend/achievements.cpp`
- [RetroAchievements client](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/thirdparty/rcheevos/src/rc_client.c): `frontend/thirdparty/rcheevos/src/rc_client.c`
- [Cloud saves](https://github.com/mamesj/pokemon-fulldex/blob/main/frontend/cloud_saves.cpp): `frontend/cloud_saves.cpp`

### Platform support

- [Android integration](https://github.com/mamesj/pokemon-fulldex/blob/main/tools/android/allgames/java/io/github/mamesj/pokemonds/GameActivity.java): `tools/android/allgames/java/io/github/mamesj/pokemonds/GameActivity.java`
- [FAT storage](https://github.com/mamesj/pokemon-fulldex/blob/main/melonDS/src/FATStorage.cpp): `melonDS/src/FATStorage.cpp`

### Other components

- **Player**
- **User ROMs**
- **RetroAchievements service**
- **Cloud storage**

## Connections

- Player → Game launcher: selects game (evidence: `README.md`)
- User ROMs → ROM library: provides ROMs (evidence: `README.md`)
- Game launcher → ROM library: lists games
- ROM library → melonDS core: starts game (evidence: `README.md`)
- melonDS core → DS CPU: runs instructions (evidence: `melonDS/src/NDS.h`)
- melonDS core → Emulator platform API: uses platform (evidence: `melonDS/src/NDS.h`)
- melonDS core → Widescreen presentation: feeds presentation (evidence: `README.md`)
- Player → GBA player: selects GBA game (evidence: `gba/frontend/main.cpp`)
- GBA player → GBA widescreen: runs with patch (evidence: `gba/frontend/main.cpp`)
- GBA player → GBA game support: supports titles (evidence: `gba/frontend/main.cpp`)
- GBA player → Emerald co-op: offers co-op
- melonDS core → DS field actions: enables field actions
- Player → 3DS beta: plays beta titles (evidence: `README.md`)
- Player → Pokédex: opens Pokédex
- Player → Game guides: opens guides
- Player → Cheats: uses cheats (evidence: `README.md`)
- Player → Save states: saves state (evidence: `README.md`)
- Player → Pokémon hub: moves Pokémon
- Achievements → RetroAchievements client: uses client
- RetroAchievements client → RetroAchievements service: requests achievements
- Cloud saves → Cloud storage: syncs saves
- Android integration → Game launcher: provides ROM access (evidence: `tools/android/allgames/java/io/github/mamesj/pokemonds/GameActivity.java`)
- FAT storage → Emulator platform API: uses file API (evidence: `melonDS/src/FATStorage.cpp`)
