# cybervisi0n/pokeplatinum architecture

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

- Interactive diagram: https://gitdiagram.com/cybervisi0n/pokeplatinum
- Repository: https://github.com/cybervisi0n/pokeplatinum

## Overview

Pokémon Platinum PC Port adapts the game to native PC platforms while retaining the original game’s broad runtime and multiplayer features. The principal user workflow is to provide a compatible ROM on first launch, then launch and play the game; save data remains compatible with DS hardware and emulators. The graph includes documented port setup and sampled gameplay, communication, and graphics modules. Source-index references support some dependency edges, but most gameplay internals were not sampled, so their connections are intentionally limited.

Main entry points: [`src/nintendo_wfc/main.c`](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/nintendo_wfc/main.c) (Wi-Fi Services), [`README.md`](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/README.md) (ROM Selection), [`src/comm_manager.c`](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/comm_manager.c) (Communication), [`include/system.h`](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/system.h) (System Input)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_port["PC Port Runtime"]
  node_rom["ROM Selection<br/>[README.md]"]
  node_game["Game Launch<br/>[README.md]"]
end

subgraph group_core["Game Runtime"]
  node_system["System Input<br/>[system.h]"]
  node_tasks["Task Scheduler<br/>[sys_task_manager.h]"]
  node_heap["Heap Manager<br/>[heap.h]"]
  node_archive["NARC Archives<br/>[narc.h]"]
  node_messages["Message Loading<br/>[message.h]"]
  node_graphics["3D Pipeline<br/>[g3d_pipeline.c]"]
  node_save[("Save Data<br/>[savedata.h]")]
end

subgraph group_play["Gameplay Systems"]
  node_pokemon["Pokémon Data<br/>[pokemon.h]"]
  node_battle["Battle Control"]
  node_battle_api["Battle I/O"]
  node_storage["PC Boxes<br/>[box_app_manager.c]"]
  node_storage_session["Storage Session"]
  node_underground["Underground<br/>[manager.c]"]
end

subgraph group_online["Online Play"]
  node_comm["Communication<br/>[comm_manager.c]"]
  node_wfc["Wi-Fi Services<br/>[main.c]"]
  node_gts["Global Trade<br/>[application.c]"]
  node_gts_network["GTS Networking<br/>[network_handler.c]"]
  node_trade_tower["Wi-Fi Tower<br/>[application.c]"]
end

node_player(("Player"))

node_player -->|"provides ROM"| node_rom
node_rom -->|"enables launch"| node_game
node_player -->|"launches game"| node_game
node_system -->|"owns task managers"| node_tasks
node_messages -->|"loads from"| node_archive
node_graphics -->|"allocates from"| node_heap
node_battle -->|"uses battle I/O"| node_battle_api
node_storage -->|"uses session"| node_storage_session
node_comm -->|"uses Wi-Fi"| node_wfc
node_wfc -->|"uses communication"| node_comm
node_gts -->|"uses network handler"| node_gts_network
node_trade_tower -.->|"uses Wi-Fi services"| node_wfc
node_underground -->|"uses savedata"| node_save

click node_rom "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/README.md"
click node_game "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/README.md"
click node_system "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/system.h"
click node_tasks "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/sys_task_manager.h"
click node_heap "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/heap.h"
click node_archive "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/narc.h"
click node_messages "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/message.h"
click node_graphics "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/g3d_pipeline.c"
click node_save "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/savedata.h"
click node_pokemon "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/pokemon.h"
click node_battle "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/battle/battle_controller_player.c"
click node_battle_api "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/battle/battle_controller.h"
click node_storage "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/applications/pc_boxes/box_app_manager.c"
click node_storage_session "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/applications/pc_boxes/pokemon_storage_session.h"
click node_underground "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/underground/manager.c"
click node_comm "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/comm_manager.c"
click node_wfc "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/nintendo_wfc/main.c"
click node_gts "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/gts_application/application.c"
click node_gts_network "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/gts_application/screens/network_handler.c"
click node_trade_tower "https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/wifi_battle_tower/application.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_rom,node_game toneBlue
class node_system,node_tasks,node_heap,node_archive,node_messages,node_graphics,node_save toneAmber
class node_pokemon,node_battle,node_battle_api,node_storage,node_storage_session,node_underground toneMint
class node_comm,node_wfc,node_gts,node_gts_network,node_trade_tower toneRose
class node_player toneIndigo
```

## Components

### PC Port Runtime

- [ROM Selection](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/README.md): `README.md`
- [Game Launch](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/README.md): `README.md`

### Game Runtime

- [System Input](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/system.h): `include/system.h`
- [Task Scheduler](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/sys_task_manager.h): `include/sys_task_manager.h`
- [Heap Manager](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/heap.h): `include/heap.h`
- [NARC Archives](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/narc.h): `include/narc.h`
- [Message Loading](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/message.h): `include/message.h`
- [3D Pipeline](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/g3d_pipeline.c): `src/g3d_pipeline.c`
- [Save Data](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/savedata.h): `include/savedata.h`

### Gameplay Systems

- [Pokémon Data](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/pokemon.h): `include/pokemon.h`
- [Battle Control](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/battle/battle_controller_player.c): `src/battle/battle_controller_player.c`
- [Battle I/O](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/battle/battle_controller.h): `include/battle/battle_controller.h`
- [PC Boxes](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/applications/pc_boxes/box_app_manager.c): `src/applications/pc_boxes/box_app_manager.c`
- [Storage Session](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/include/applications/pc_boxes/pokemon_storage_session.h): `include/applications/pc_boxes/pokemon_storage_session.h`
- [Underground](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/underground/manager.c): `src/underground/manager.c`

### Online Play

- [Communication](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/comm_manager.c): `src/comm_manager.c`
- [Wi-Fi Services](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/nintendo_wfc/main.c): `src/nintendo_wfc/main.c`
- [Global Trade](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/gts_application/application.c): `src/gts_application/application.c`
- [GTS Networking](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/gts_application/screens/network_handler.c): `src/gts_application/screens/network_handler.c`
- [Wi-Fi Tower](https://github.com/cybervisi0n/pokeplatinum/blob/pc_port/src/wifi_battle_tower/application.c): `src/wifi_battle_tower/application.c`

### Other components

- **Player**

## Connections

- Player → ROM Selection: provides ROM (evidence: `README.md`)
- ROM Selection → Game Launch: enables launch (evidence: `README.md`)
- Player → Game Launch: launches game (evidence: `README.md`)
- System Input → Task Scheduler: owns task managers (evidence: `include/system.h`)
- Message Loading → NARC Archives: loads from (evidence: `include/message.h`)
- 3D Pipeline → Heap Manager: allocates from (evidence: `src/g3d_pipeline.c`)
- Battle Control → Battle I/O: uses battle I/O (evidence: `src/battle/battle_controller_player.c`)
- PC Boxes → Storage Session: uses session (evidence: `src/applications/pc_boxes/box_app_manager.c`)
- Communication → Wi-Fi Services: uses Wi-Fi (evidence: `src/comm_manager.c`)
- Wi-Fi Services → Communication: uses communication (evidence: `src/nintendo_wfc/main.c`)
- Global Trade → GTS Networking: uses network handler (evidence: `src/gts_application/application.c`)
- Wi-Fi Tower → Wi-Fi Services: uses Wi-Fi services
- Underground → Save Data: uses savedata (evidence: `src/underground/manager.c`)
