# azahar-emu/azahar architecture

> Architecture diagram of the GitHub repository azahar-emu/azahar, 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/azahar-emu/azahar
- Repository: https://github.com/azahar-emu/azahar

## Overview

Azahar is a multi-platform Nintendo 3DS emulator. A user selects a game in a desktop, Android, command-line, or libretro frontend; the emulator runs it and presents graphics and audio. The product also includes configuration, networking, cheats, applets, custom textures, and developer debugging tools. The tree and README support these major capabilities, but the sampled excerpts do not show most cross-module calls, so the graph keeps those connections conservative.

Main entry points: [`src/core`](https://github.com/azahar-emu/azahar/tree/master/src/core) (Emulation core), [`src/video_core`](https://github.com/azahar-emu/azahar/tree/master/src/video_core) (Video rendering), [`src/citra_qt`](https://github.com/azahar-emu/azahar/tree/master/src/citra_qt) (Desktop UI), [`src/android/app/src/main/java/org/citra/citra_emu`](https://github.com/azahar-emu/azahar/tree/master/src/android/app/src/main/java/org/citra/citra_emu) (Android app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontends["User frontends"]
  node_qt["Desktop UI"]
  node_android["Android app"]
  node_cli["CLI frontend"]
  node_libretro["Libretro frontend"]
end

subgraph group_emulation["Emulation"]
  node_core["Emulation core"]
  node_apt["Applet services<br/>[applet_manager.cpp]"]
end

subgraph group_media["Graphics and audio"]
  node_video["Video rendering"]
  node_gl["OpenGL renderer"]
  node_vk["Vulkan renderer"]
  node_audio["Audio processing"]
end

subgraph group_features["Emulator features"]
  node_settings["Settings"]
  node_multiplayer["Multiplayer<br/>[NetPlayManager.kt]"]
  node_cheats["Cheat engine<br/>[cheat_engine.cpp]"]
  node_textures["Custom textures"]
end

subgraph group_developer["Developer tools"]
  node_debug["Debug tools"]
end

node_user(("Player or developer"))
node_game["3DS game"]
node_filesystem[("Game and user files")]
node_display(("Graphics display"))
node_speakers(("Audio output"))

node_user -->|"selects and configures"| node_qt
node_user -->|"selects and configures"| node_android
node_user -->|"starts"| node_cli
node_user -->|"starts"| node_libretro
node_qt -->|"runs emulation"| node_core
node_android -->|"runs emulation"| node_core
node_cli -->|"runs emulation"| node_core
node_libretro -->|"runs emulation"| node_core
node_user -->|"chooses"| node_game
node_game -->|"game data"| node_core
node_core -->|"reads and writes"| node_filesystem
node_core -->|"renders graphics"| node_video
node_video -->|"uses renderer"| node_gl
node_video -->|"uses renderer"| node_vk
node_gl -->|"presents frames"| node_display
node_vk -->|"presents frames"| node_display
node_core -->|"produces audio"| node_audio
node_audio -->|"sends audio"| node_speakers
node_core -->|"manages applets"| node_apt
node_user -->|"changes options"| node_settings
node_settings -->|"configures"| node_core
node_user -->|"joins sessions"| node_multiplayer
node_user -->|"edits cheats"| node_cheats
node_cheats -->|"updates cheats"| node_core
node_core -->|"loads texture replacements"| node_textures
node_user -->|"inspects emulation"| node_debug
node_debug -->|"debugs"| node_core

click node_qt "https://github.com/azahar-emu/azahar/tree/master/src/citra_qt"
click node_android "https://github.com/azahar-emu/azahar/tree/master/src/android/app/src/main/java/org/citra/citra_emu"
click node_cli "https://github.com/azahar-emu/azahar/tree/master/src/citra_cli"
click node_libretro "https://github.com/azahar-emu/azahar/tree/master/src/citra_libretro"
click node_core "https://github.com/azahar-emu/azahar/tree/master/src/core"
click node_apt "https://github.com/azahar-emu/azahar/blob/master/src/core/hle/service/apt/applet_manager.cpp"
click node_video "https://github.com/azahar-emu/azahar/tree/master/src/video_core"
click node_gl "https://github.com/azahar-emu/azahar/blob/master/src/video_core/renderer_opengl/gl_shader_manager.cpp"
click node_vk "https://github.com/azahar-emu/azahar/blob/master/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp"
click node_audio "https://github.com/azahar-emu/azahar/tree/master/src/audio_core"
click node_settings "https://github.com/azahar-emu/azahar/tree/master/src/android/app/src/main/java/org/citra/citra_emu/features/settings"
click node_multiplayer "https://github.com/azahar-emu/azahar/blob/master/src/android/app/src/main/java/org/citra/citra_emu/utils/NetPlayManager.kt"
click node_cheats "https://github.com/azahar-emu/azahar/blob/master/src/android/app/src/main/jni/cheats/cheat_engine.cpp"
click node_textures "https://github.com/azahar-emu/azahar/blob/master/src/video_core/custom_textures/custom_tex_manager.cpp"
click node_debug "https://github.com/azahar-emu/azahar/tree/master/src/citra_qt/debugger"

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_android,node_cli,node_libretro toneBlue
class node_core,node_apt,node_filesystem toneAmber
class node_video,node_gl,node_vk,node_audio toneMint
class node_settings,node_multiplayer,node_cheats,node_textures toneRose
class node_debug,node_user,node_game,node_display,node_speakers toneIndigo
```

## Components

### User frontends

- [Desktop UI](https://github.com/azahar-emu/azahar/tree/master/src/citra_qt): `src/citra_qt`
- [Android app](https://github.com/azahar-emu/azahar/tree/master/src/android/app/src/main/java/org/citra/citra_emu): `src/android/app/src/main/java/org/citra/citra_emu`
- [CLI frontend](https://github.com/azahar-emu/azahar/tree/master/src/citra_cli): `src/citra_cli`
- [Libretro frontend](https://github.com/azahar-emu/azahar/tree/master/src/citra_libretro): `src/citra_libretro`

### Emulation

- [Emulation core](https://github.com/azahar-emu/azahar/tree/master/src/core): `src/core`
- [Applet services](https://github.com/azahar-emu/azahar/blob/master/src/core/hle/service/apt/applet_manager.cpp): `src/core/hle/service/apt/applet_manager.cpp`

### Graphics and audio

- [Video rendering](https://github.com/azahar-emu/azahar/tree/master/src/video_core): `src/video_core`
- [OpenGL renderer](https://github.com/azahar-emu/azahar/blob/master/src/video_core/renderer_opengl/gl_shader_manager.cpp): `src/video_core/renderer_opengl/gl_shader_manager.cpp`
- [Vulkan renderer](https://github.com/azahar-emu/azahar/blob/master/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp): `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp`
- [Audio processing](https://github.com/azahar-emu/azahar/tree/master/src/audio_core): `src/audio_core`

### Emulator features

- [Settings](https://github.com/azahar-emu/azahar/tree/master/src/android/app/src/main/java/org/citra/citra_emu/features/settings): `src/android/app/src/main/java/org/citra/citra_emu/features/settings`
- [Multiplayer](https://github.com/azahar-emu/azahar/blob/master/src/android/app/src/main/java/org/citra/citra_emu/utils/NetPlayManager.kt): `src/android/app/src/main/java/org/citra/citra_emu/utils/NetPlayManager.kt`
- [Cheat engine](https://github.com/azahar-emu/azahar/blob/master/src/android/app/src/main/jni/cheats/cheat_engine.cpp): `src/android/app/src/main/jni/cheats/cheat_engine.cpp`
- [Custom textures](https://github.com/azahar-emu/azahar/blob/master/src/video_core/custom_textures/custom_tex_manager.cpp): `src/video_core/custom_textures/custom_tex_manager.cpp`

### Developer tools

- [Debug tools](https://github.com/azahar-emu/azahar/tree/master/src/citra_qt/debugger): `src/citra_qt/debugger`

### Other components

- **Player or developer**
- **3DS game**
- **Game and user files**
- **Graphics display**
- **Audio output**

## Connections

- Player or developer → Desktop UI: selects and configures
- Player or developer → Android app: selects and configures
- Player or developer → CLI frontend: starts
- Player or developer → Libretro frontend: starts
- Desktop UI → Emulation core: runs emulation
- Android app → Emulation core: runs emulation
- CLI frontend → Emulation core: runs emulation
- Libretro frontend → Emulation core: runs emulation
- Player or developer → 3DS game: chooses
- 3DS game → Emulation core: game data
- Emulation core → Game and user files: reads and writes
- Emulation core → Video rendering: renders graphics
- Video rendering → OpenGL renderer: uses renderer
- Video rendering → Vulkan renderer: uses renderer
- OpenGL renderer → Graphics display: presents frames
- Vulkan renderer → Graphics display: presents frames
- Emulation core → Audio processing: produces audio
- Audio processing → Audio output: sends audio
- Emulation core → Applet services: manages applets
- Player or developer → Settings: changes options
- Settings → Emulation core: configures
- Player or developer → Multiplayer: joins sessions
- Player or developer → Cheat engine: edits cheats
- Cheat engine → Emulation core: updates cheats
- Emulation core → Custom textures: loads texture replacements
- Player or developer → Debug tools: inspects emulation
- Debug tools → Emulation core: debugs
