# rpcs3/rpcs3 architecture

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

- Interactive diagram: https://gitdiagram.com/rpcs3/rpcs3
- Repository: https://github.com/rpcs3/rpcs3

## Overview

RPCS3 is a PlayStation 3 emulator and debugger. Its principal runtime workflow is to execute guest PPU/SPU code, provide PS3 system and library behavior, and translate guest graphics and device activity to host services. The tree identifies these major subsystems, including audio, input, networking, and trophy management. The sampled excerpts do not show the application’s launch orchestration or most cross-subsystem calls, so the graph emphasizes documented domain boundaries and omits uncertain wiring; several capabilities are represented by their exact enclosing source directories.

Main entry points: [`rpcs3/Emu/Cell/PPUThread.cpp`](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/PPUThread.cpp) (PPU execution), [`rpcs3/Emu/Cell/lv2/lv2.cpp`](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/lv2.cpp) (LV2 services), [`rpcs3/Emu/Cell/SPUThread.cpp`](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/SPUThread.cpp) (SPU execution), [`rpcs3/Emu/Cell/Modules`](https://github.com/rpcs3/rpcs3/tree/master/rpcs3/Emu/Cell/Modules) (Cell modules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Guest execution"]
  node_cpu_threads["CPU threads<br/>[CPUThread.cpp]"]
  node_ppu["PPU execution<br/>[PPUThread.cpp]"]
  node_spu["SPU execution<br/>[SPUThread.cpp]"]
  node_translators["JIT translators<br/>[PPUTranslator.cpp]"]
end

subgraph group_system["PS3 system"]
  node_syscalls["LV2 services<br/>[lv2.cpp]"]
  node_hle_modules["Cell modules"]
  node_memory["Guest memory<br/>[vm.cpp]"]
  node_filesystem["Filesystem services<br/>[sys_fs.cpp]"]
  node_storage["Storage services<br/>[sys_storage.cpp]"]
end

subgraph group_devices["Host devices"]
  node_input["Input handlers<br/>[PadHandler.cpp]"]
  node_audio["Audio backends<br/>[AudioBackend.cpp]"]
  node_network["Network services<br/>[sys_net.cpp]"]
end

subgraph group_graphics["Graphics and tools"]
  node_graphics["RSX rendering<br/>[RSXContext.cpp]"]
  node_gl_compiler["OpenGL pipelines"]
  node_vk_compiler["Vulkan pipelines"]
  node_debugger["GDB debugger<br/>[GDB.cpp]"]
  node_trophy_manager["Trophy manager"]
end

node_user(("RPCS3 user"))
node_game["PS3 title"]

node_user -->|"selects"| node_game
node_game -->|"guest code"| node_ppu
node_game -->|"guest code"| node_spu
node_ppu -->|"translated by"| node_translators
node_cpu_threads -->|"runs"| node_ppu
node_cpu_threads -->|"runs"| node_spu
node_ppu -->|"accesses"| node_memory
node_spu -->|"accesses"| node_memory
node_ppu -->|"requests services"| node_syscalls
node_ppu -->|"calls emulated APIs"| node_hle_modules
node_syscalls -->|"provides filesystem"| node_filesystem
node_syscalls -->|"provides storage"| node_storage
node_syscalls -->|"provides networking"| node_network
node_input -->|"emulated input"| node_hle_modules
node_hle_modules -->|"emulated audio"| node_audio
node_graphics -.->|"compiles OpenGL"| node_gl_compiler
node_graphics -.->|"compiles Vulkan"| node_vk_compiler
node_user -->|"debugs emulation"| node_debugger
node_user -->|"manages trophies"| node_trophy_manager

click node_cpu_threads "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/CPU/CPUThread.cpp"
click node_ppu "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/PPUThread.cpp"
click node_spu "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/SPUThread.cpp"
click node_translators "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/PPUTranslator.cpp"
click node_syscalls "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/lv2.cpp"
click node_hle_modules "https://github.com/rpcs3/rpcs3/tree/master/rpcs3/Emu/Cell/Modules"
click node_memory "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Memory/vm.cpp"
click node_filesystem "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/sys_fs.cpp"
click node_storage "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/sys_storage.cpp"
click node_input "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Io/PadHandler.cpp"
click node_audio "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Audio/AudioBackend.cpp"
click node_network "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/sys_net.cpp"
click node_graphics "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/RSX/Core/RSXContext.cpp"
click node_gl_compiler "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/RSX/GL/GLPipelineCompiler.cpp"
click node_vk_compiler "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/RSX/VK/VKPipelineCompiler.cpp"
click node_debugger "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/GDB.cpp"
click node_trophy_manager "https://github.com/rpcs3/rpcs3/blob/master/rpcs3/rpcs3qt/trophy_manager_dialog.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_cpu_threads,node_ppu,node_spu,node_translators,node_user toneBlue
class node_syscalls,node_hle_modules,node_memory,node_filesystem,node_storage toneAmber
class node_input,node_audio,node_network toneMint
class node_graphics,node_gl_compiler,node_vk_compiler,node_debugger,node_trophy_manager toneRose
class node_game toneIndigo
```

## Components

### Guest execution

- [CPU threads](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/CPU/CPUThread.cpp): `rpcs3/Emu/CPU/CPUThread.cpp`
- [PPU execution](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/PPUThread.cpp): `rpcs3/Emu/Cell/PPUThread.cpp`
- [SPU execution](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/SPUThread.cpp): `rpcs3/Emu/Cell/SPUThread.cpp`
- [JIT translators](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/PPUTranslator.cpp): `rpcs3/Emu/Cell/PPUTranslator.cpp`

### PS3 system

- [LV2 services](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/lv2.cpp): `rpcs3/Emu/Cell/lv2/lv2.cpp`
- [Cell modules](https://github.com/rpcs3/rpcs3/tree/master/rpcs3/Emu/Cell/Modules): `rpcs3/Emu/Cell/Modules`
- [Guest memory](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Memory/vm.cpp): `rpcs3/Emu/Memory/vm.cpp`
- [Filesystem services](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/sys_fs.cpp): `rpcs3/Emu/Cell/lv2/sys_fs.cpp`
- [Storage services](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/sys_storage.cpp): `rpcs3/Emu/Cell/lv2/sys_storage.cpp`

### Host devices

- [Input handlers](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Io/PadHandler.cpp): `rpcs3/Emu/Io/PadHandler.cpp`
- [Audio backends](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Audio/AudioBackend.cpp): `rpcs3/Emu/Audio/AudioBackend.cpp`
- [Network services](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/Cell/lv2/sys_net.cpp): `rpcs3/Emu/Cell/lv2/sys_net.cpp`

### Graphics and tools

- [RSX rendering](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/RSX/Core/RSXContext.cpp): `rpcs3/Emu/RSX/Core/RSXContext.cpp`
- [OpenGL pipelines](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/RSX/GL/GLPipelineCompiler.cpp): `rpcs3/Emu/RSX/GL/GLPipelineCompiler.cpp`
- [Vulkan pipelines](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/RSX/VK/VKPipelineCompiler.cpp): `rpcs3/Emu/RSX/VK/VKPipelineCompiler.cpp`
- [GDB debugger](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/Emu/GDB.cpp): `rpcs3/Emu/GDB.cpp`
- [Trophy manager](https://github.com/rpcs3/rpcs3/blob/master/rpcs3/rpcs3qt/trophy_manager_dialog.cpp): `rpcs3/rpcs3qt/trophy_manager_dialog.cpp`

### Other components

- **RPCS3 user**
- **PS3 title**

## Connections

- RPCS3 user → PS3 title: selects
- PS3 title → PPU execution: guest code
- PS3 title → SPU execution: guest code
- PPU execution → JIT translators: translated by
- CPU threads → PPU execution: runs
- CPU threads → SPU execution: runs
- PPU execution → Guest memory: accesses
- SPU execution → Guest memory: accesses
- PPU execution → LV2 services: requests services
- PPU execution → Cell modules: calls emulated APIs
- LV2 services → Filesystem services: provides filesystem
- LV2 services → Storage services: provides storage
- LV2 services → Network services: provides networking
- Input handlers → Cell modules: emulated input
- Cell modules → Audio backends: emulated audio
- RSX rendering → OpenGL pipelines: compiles OpenGL
- RSX rendering → Vulkan pipelines: compiles Vulkan
- RPCS3 user → GDB debugger: debugs emulation
- RPCS3 user → Trophy manager: manages trophies
