How weihuoya/citra works
Citra is a Nintendo 3DS emulator and debugger, with desktop Qt and Android frontends. The principal workflow is selecting a game, starting emulation, and presenting rendered output; users can also configure input and settings, debug, and use multiplayer features. The graph preserves these major product areas, plus core emulation layers. Source excerpts support a few internal calls; other frontend-to-core and subsystem links are shown as dashed, unverified relationships rather than inferred pipelines.
Main entry points: core.h Emulation system · citra_qt/main.cpp Desktop UI · bootmanager.cpp Emulation window · input_common/main.cpp Input backends
Components 19
User frontends
- Desktop UI
src/citra_qt/main.cpp - Emulation window
src/citra_qt/bootmanager.cpp - Android app
src/android/app/src/main/java/org/citra/emu/ui/EmulationActivity.java - Settings
src/core/settings.h - Input backends
src/input_common/main.cpp
Emulation core
- Emulation system
src/core/core.h - ARM CPU
src/core/arm/arm_interface.h - Virtual memory
src/core/hle/kernel/vm_manager.cpp - Kernel and services
src/core/hle/service/service.cpp - Game and files
src/core/file_sys
Hardware services
- Graphics pipeline
src/video_core/geometry_pipeline.cpp - Audio
src/audio_core - System applets
src/core/hle/service/apt/applet_manager.cpp - Shared utilities
src/common
Product features
- Debugger
src/citra_qt/debugger - Multiplayer
src/citra_qt/multiplayer/state.h - Cheats
src/core/cheats - Capture and dumping
src/core/dumping
Other components
- User
Connections 22
- User → Desktop UI: uses
- User → Android app: uses
- Desktop UI → Emulation window: starts emulation
- Android app → Emulation system: controls emulation
- Emulation window → Emulation system: runs loop
src/citra_qt/bootmanager.cpp - Emulation window → Input backends: initializes input
src/citra_qt/bootmanager.cpp - Emulation window → Graphics pipeline: presents frames
src/citra_qt/bootmanager.cpp - Emulation system → ARM CPU: executes instructions
- Emulation system → Virtual memory: manages address space
- Virtual memory → Shared utilities: maps regions
src/core/hle/kernel/vm_manager.cpp - Emulation system → Kernel and services: runs services
- Emulation system → Game and files: loads game data
- Emulation system → Graphics pipeline: renders graphics
- Emulation system → Audio: produces audio
- Kernel and services → System applets: dispatches applets
- System applets → Kernel and services: creates events
src/core/hle/service/apt/applet_manager.cpp - Input backends → Shared utilities: uses packages
src/input_common/main.cpp - Settings → Input backends: configures bindings
- Desktop UI → Debugger: offers tools
src/citra_qt/main.cpp - Desktop UI → Multiplayer: offers netplay
src/citra_qt/main.cpp - Emulation system → Cheats: applies cheats
- Desktop UI → Capture and dumping: configures capture