# oatmealdome/dolphin-ios architecture

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

- Interactive diagram: https://gitdiagram.com/oatmealdome/dolphin-ios
- Repository: https://github.com/oatmealdome/dolphin-ios

## Overview

DolphiniOS is an iOS/iPadOS port of Dolphin, the GameCube and Wii emulator. The principal workflow is selecting a game in the app, starting emulation, and producing graphics and audio; Android TV also synchronizes game channels and programs. The graph preserves major runtime stages and sampled internal layers, including patch handling, pixel-engine hardware behavior, graphics pipelines, and Android input bridging. Source excerpts are selective, so links between unsampled runtime subsystems are omitted rather than inferred.

Main entry points: [`Source/Core/Core/System.h`](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/System.h) (Emulation system), [`Source/iOS/App/Common/Services/ServiceManager.swift`](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Services/ServiceManager.swift) (App services), [`Source/iOS/App/Common/UI/Emulation/EmulationViewController.h`](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/UI/Emulation/EmulationViewController.h) (Emulation UI), [`Source/Core/Core/Core.h`](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/Core.h) (Core runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ios["iOS App"]
  node_ios_ui["Emulation UI"]
  node_ios_services["App services"]
  node_audio_session["Audio session"]
  node_fastmem["Fast memory<br/>[FastmemManager.h]"]
  node_jit["JIT manager<br/>[JitManager.h]"]
end

subgraph group_android["Android App"]
  node_android_ui["Android input UI"]
  node_android_bridge["JNI input bridge"]
  node_channel_sync["TV channel sync"]
  node_program_sync["TV program sync"]
end

subgraph group_core["Emulation Core"]
  node_emulation_system["Emulation system<br/>[System.h]"]
  node_core_runtime["Core runtime<br/>[Core.h]"]
  node_patch_engine["Patch engine<br/>[PatchEngine.cpp]"]
  node_pixel_engine["Pixel engine<br/>[PixelEngine.cpp]"]
end

subgraph group_video["Graphics"]
  node_video_config["Video configuration<br/>[VideoConfig.h]"]
  node_d3d11_pipeline["D3D pipeline<br/>[DXPipeline.cpp]"]
  node_d3d12_pipeline["D3D12 pipeline<br/>[DX12Pipeline.cpp]"]
  node_metal_pipeline["Metal pipeline<br/>[MTLPipeline.h]"]
  node_opengl_pipeline["OpenGL pipeline<br/>[OGLPipeline.cpp]"]
  node_vulkan_pipeline["Vulkan pipeline<br/>[VKPipeline.cpp]"]
end

node_player(("Player"))
node_game["Game file"]

node_player -->|"selects game"| node_ios_ui
node_game -->|"launches"| node_ios_ui
node_ios_ui -.->|"starts emulation"| node_emulation_system
node_emulation_system -.->|"runs core"| node_core_runtime
node_core_runtime -->|"loads patches"| node_patch_engine
node_emulation_system -->|"owns engine"| node_pixel_engine
node_pixel_engine -->|"registers timing"| node_emulation_system
node_video_config -->|"configures"| node_d3d11_pipeline
node_vulkan_pipeline -->|"reads config"| node_video_config
node_android_ui -->|"calls JNI"| node_android_bridge
node_channel_sync -.->|"schedules programs"| node_program_sync
node_ios_services -.->|"configures audio"| node_audio_session
node_ios_services -.->|"starts JIT service"| node_jit
node_ios_services -.->|"starts memory service"| node_fastmem

click node_ios_ui "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/UI/Emulation/EmulationViewController.h"
click node_ios_services "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Services/ServiceManager.swift"
click node_audio_session "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Audio/AudioSessionManager.h"
click node_fastmem "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Fastmem/FastmemManager.h"
click node_jit "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Jit/JitManager.h"
click node_android_ui "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/controlleremu/EmulatedController.kt"
click node_android_bridge "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/jni/Input/EmulatedController.cpp"
click node_channel_sync "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncChannelJobService.java"
click node_program_sync "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncProgramsJobService.java"
click node_emulation_system "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/System.h"
click node_core_runtime "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/Core.h"
click node_patch_engine "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/PatchEngine.cpp"
click node_pixel_engine "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoCommon/PixelEngine.cpp"
click node_video_config "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoCommon/VideoConfig.h"
click node_d3d11_pipeline "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/D3D/DXPipeline.cpp"
click node_d3d12_pipeline "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp"
click node_metal_pipeline "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/Metal/MTLPipeline.h"
click node_opengl_pipeline "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/OGL/OGLPipeline.cpp"
click node_vulkan_pipeline "https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/Vulkan/VKPipeline.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_ios_ui,node_ios_services,node_audio_session,node_fastmem,node_jit toneBlue
class node_android_ui,node_android_bridge,node_channel_sync,node_program_sync toneAmber
class node_emulation_system,node_core_runtime,node_patch_engine,node_pixel_engine toneMint
class node_video_config,node_d3d11_pipeline,node_d3d12_pipeline,node_metal_pipeline,node_opengl_pipeline,node_vulkan_pipeline toneRose
class node_player,node_game toneIndigo
```

## Components

### iOS App

- [Emulation UI](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/UI/Emulation/EmulationViewController.h): `Source/iOS/App/Common/UI/Emulation/EmulationViewController.h`
- [App services](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Services/ServiceManager.swift): `Source/iOS/App/Common/Services/ServiceManager.swift`
- [Audio session](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Audio/AudioSessionManager.h): `Source/iOS/App/Common/Audio/AudioSessionManager.h`
- [Fast memory](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Fastmem/FastmemManager.h): `Source/iOS/App/Common/Fastmem/FastmemManager.h`
- [JIT manager](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/iOS/App/Common/Jit/JitManager.h): `Source/iOS/App/Common/Jit/JitManager.h`

### Android App

- [Android input UI](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/controlleremu/EmulatedController.kt): `Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/model/controlleremu/EmulatedController.kt`
- [JNI input bridge](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/jni/Input/EmulatedController.cpp): `Source/Android/jni/Input/EmulatedController.cpp`
- [TV channel sync](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncChannelJobService.java): `Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncChannelJobService.java`
- [TV program sync](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncProgramsJobService.java): `Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncProgramsJobService.java`

### Emulation Core

- [Emulation system](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/System.h): `Source/Core/Core/System.h`
- [Core runtime](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/Core.h): `Source/Core/Core/Core.h`
- [Patch engine](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/Core/PatchEngine.cpp): `Source/Core/Core/PatchEngine.cpp`
- [Pixel engine](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoCommon/PixelEngine.cpp): `Source/Core/VideoCommon/PixelEngine.cpp`

### Graphics

- [Video configuration](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoCommon/VideoConfig.h): `Source/Core/VideoCommon/VideoConfig.h`
- [D3D pipeline](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/D3D/DXPipeline.cpp): `Source/Core/VideoBackends/D3D/DXPipeline.cpp`
- [D3D12 pipeline](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp): `Source/Core/VideoBackends/D3D12/DX12Pipeline.cpp`
- [Metal pipeline](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/Metal/MTLPipeline.h): `Source/Core/VideoBackends/Metal/MTLPipeline.h`
- [OpenGL pipeline](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/OGL/OGLPipeline.cpp): `Source/Core/VideoBackends/OGL/OGLPipeline.cpp`
- [Vulkan pipeline](https://github.com/oatmealdome/dolphin-ios/blob/master/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp): `Source/Core/VideoBackends/Vulkan/VKPipeline.cpp`

### Other components

- **Player**
- **Game file**

## Connections

- Player → Emulation UI: selects game
- Game file → Emulation UI: launches
- Emulation UI → Emulation system: starts emulation
- Emulation system → Core runtime: runs core
- Core runtime → Patch engine: loads patches (evidence: `Source/Core/Core/PatchEngine.cpp`)
- Emulation system → Pixel engine: owns engine (evidence: `Source/Core/VideoCommon/PixelEngine.cpp`)
- Pixel engine → Emulation system: registers timing (evidence: `Source/Core/VideoCommon/PixelEngine.cpp`)
- Video configuration → D3D pipeline: configures (evidence: `Source/Core/VideoBackends/D3D/DXPipeline.cpp`)
- Vulkan pipeline → Video configuration: reads config (evidence: `Source/Core/VideoBackends/Vulkan/VKPipeline.cpp`)
- Android input UI → JNI input bridge: calls JNI (evidence: `Source/Android/jni/Input/EmulatedController.cpp`)
- TV channel sync → TV program sync: schedules programs
- App services → Audio session: configures audio
- App services → JIT manager: starts JIT service
- App services → Fast memory: starts memory service
