# sgtbilko76/armsx2-3d architecture

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

- Interactive diagram: https://gitdiagram.com/sgtbilko76/armsx2-3d
- Repository: https://github.com/sgtbilko76/armsx2-3d

## Overview

ARMSX2 is a cross-platform PlayStation 2 emulator fork built on PCSX2. A user launches a platform frontend, which enters the shared virtual-machine lifecycle; emulation then relies on CPU interpreters and native ARM64 recompilers, with graphics and input managed as major runtime concerns. The README documents the emulator’s broader capabilities, but the supplied excerpts chiefly establish VM, input, and UI interfaces. Some domain-stage links are therefore shown as unverified rather than asserted as source-level calls.

Main entry points: [`pcsx2/VMManager.cpp`](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/VMManager.cpp) (Virtual machine), [`pcsx2/ImGui/ImGuiManager.cpp`](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/ImGui/ImGuiManager.cpp) (ImGui manager), [`pcsx2-qt/MainWindow.cpp`](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-qt/MainWindow.cpp) (Qt frontend), [`pcsx2-sdl/Main.cpp`](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-sdl/Main.cpp) (SDL frontend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontends["Platform frontends"]
  node_qt["Qt frontend<br/>[MainWindow.cpp]"]
  node_sdl["SDL frontend<br/>[Main.cpp]"]
  node_libretro["Libretro frontend<br/>[Main.cpp]"]
end

subgraph group_runtime["Emulation runtime"]
  node_ee["EE recompiler"]
  node_iop["IOP recompiler"]
  node_vu["VU recompiler"]
  node_vtlb["Fast memory"]
  node_vm["Virtual machine<br/>[VMManager.cpp]"]
end

subgraph group_interaction["Input and UI"]
  node_input["Input manager<br/>[InputManager.cpp]"]
  node_pad["Pad subsystem<br/>[Pad.h]"]
  node_imgui["ImGui manager<br/>[ImGuiManager.cpp]"]
  node_fullscreen["Fullscreen UI<br/>[FullscreenUI.h]"]
end

subgraph group_graphics["Graphics"]
  node_gs["Graphics system"]
end

node_player(("Player"))

node_player -.->|"launches"| node_qt
node_player -.->|"launches"| node_sdl
node_player -.->|"launches"| node_libretro
node_qt -.->|"starts VM"| node_vm
node_sdl -->|"starts VM"| node_vm
node_libretro -->|"starts VM"| node_vm
node_vm -.->|"runs code"| node_ee
node_vm -.->|"runs code"| node_iop
node_vm -.->|"runs code"| node_vu
node_vm -.->|"uses fast memory"| node_vtlb
node_vm -.->|"coordinates emulation"| node_gs
node_input -.->|"feeds controls"| node_pad
node_imgui -->|"intercepts input"| node_input
node_imgui -->|"renders UI"| node_fullscreen
node_imgui -->|"observes lifecycle"| node_vm

click node_qt "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-qt/MainWindow.cpp"
click node_sdl "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-sdl/Main.cpp"
click node_libretro "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-libretro/Main.cpp"
click node_ee "https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2"
click node_iop "https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2"
click node_vu "https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2"
click node_vtlb "https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2"
click node_vm "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/VMManager.cpp"
click node_input "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/Input/InputManager.cpp"
click node_pad "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/SIO/Pad/Pad.h"
click node_imgui "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/ImGui/ImGuiManager.cpp"
click node_fullscreen "https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/ImGui/FullscreenUI.h"
click node_gs "https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2/GS"

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_qt,node_sdl,node_libretro toneBlue
class node_ee,node_iop,node_vu,node_vtlb,node_vm toneAmber
class node_input,node_pad,node_imgui,node_fullscreen toneMint
class node_gs toneRose
class node_player toneIndigo
```

## Components

### Platform frontends

- [Qt frontend](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-qt/MainWindow.cpp): `pcsx2-qt/MainWindow.cpp`
- [SDL frontend](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-sdl/Main.cpp): `pcsx2-sdl/Main.cpp`
- [Libretro frontend](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2-libretro/Main.cpp): `pcsx2-libretro/Main.cpp`

### Emulation runtime

- [EE recompiler](https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2): `pcsx2`
- [IOP recompiler](https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2): `pcsx2`
- [VU recompiler](https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2): `pcsx2`
- [Fast memory](https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2): `pcsx2`
- [Virtual machine](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/VMManager.cpp): `pcsx2/VMManager.cpp`

### Input and UI

- [Input manager](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/Input/InputManager.cpp): `pcsx2/Input/InputManager.cpp`
- [Pad subsystem](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/SIO/Pad/Pad.h): `pcsx2/SIO/Pad/Pad.h`
- [ImGui manager](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/ImGui/ImGuiManager.cpp): `pcsx2/ImGui/ImGuiManager.cpp`
- [Fullscreen UI](https://github.com/sgtbilko76/armsx2-3d/blob/quest-vr-stereo/pcsx2/ImGui/FullscreenUI.h): `pcsx2/ImGui/FullscreenUI.h`

### Graphics

- [Graphics system](https://github.com/sgtbilko76/armsx2-3d/tree/quest-vr-stereo/pcsx2/GS): `pcsx2/GS`

### Other components

- **Player**

## Connections

- Player → Qt frontend: launches
- Player → SDL frontend: launches
- Player → Libretro frontend: launches
- Qt frontend → Virtual machine: starts VM
- SDL frontend → Virtual machine: starts VM (evidence: `pcsx2-sdl/Main.cpp`)
- Libretro frontend → Virtual machine: starts VM (evidence: `pcsx2-libretro/Main.cpp`)
- Virtual machine → EE recompiler: runs code (evidence: `pcsx2/VMManager.cpp`)
- Virtual machine → IOP recompiler: runs code (evidence: `pcsx2/VMManager.cpp`)
- Virtual machine → VU recompiler: runs code (evidence: `pcsx2/VMManager.cpp`)
- Virtual machine → Fast memory: uses fast memory (evidence: `pcsx2/VMManager.cpp`)
- Virtual machine → Graphics system: coordinates emulation (evidence: `pcsx2/VMManager.cpp`)
- Input manager → Pad subsystem: feeds controls (evidence: `pcsx2/Input/InputManager.cpp`)
- ImGui manager → Input manager: intercepts input (evidence: `pcsx2/ImGui/ImGuiManager.cpp`)
- ImGui manager → Fullscreen UI: renders UI (evidence: `pcsx2/ImGui/ImGuiManager.cpp`)
- ImGui manager → Virtual machine: observes lifecycle (evidence: `pcsx2/ImGui/ImGuiManager.cpp`)
