How grarak/dsvita works
DSVita is a Nintendo DS emulator for Vita, Linux, and experimental Android. The principal workflow is selecting an NDS ROM, initializing emulated hardware, executing ARM9/ARM7 instructions while coordinating hardware events, and presenting video, audio, and input. The graph also preserves documented 2D/3D rendering, selectable ARM7 emulation modes, settings, save states, cheats, and RetroAchievements. Source excerpts are partial, so subsystem links are limited to documented behavior and visible orchestration; uncertain internal calls are omitted.
Main entry points: emu.rs DS Hardware · lib.rs Emulator Loop · mod.rs Platform Presenter · DSVitaActivity.kt Android Game UI
Components 18
Frontend
- Platform Presenter
src/presenter/mod.rs - Android Game UI
android/app/src/main/kotlin/com/grarak/dsvita/DSVitaActivity.kt - Settings
src/settings.rs
Emulation Core
- ROM and Metadata
src/cartridge_io.rs - Emulator Loop
src/lib.rs - DS Hardware
src/core/emu.rs - Memory and MMU
src/core/memory/mmu.rs - Cycle Scheduler
src/core/cycle_manager.rs - ARM Execution
src/jit/mod.rs - ARM7 Emulation Modes
src/core/hle/mod.rs
Media and Input
- 2D and 3D GPU
src/core/graphics/mod.rs - Sound Processing
src/core/spu.rs - Input Handling
src/core/input.rs
State and Integrations
- Save States
src/savestate.rs - Cheats
src/cheats.rs - RetroAchievements
src/ra_context.rs
Other components
- Player
- RetroAchievements Service
Connections 21
- Player → Platform Presenter: selects game
- Player → Android Game UI: selects game
- Platform Presenter → Emulator Loop: starts and controls
- Android Game UI → Emulator Loop: starts and controls
- Emulator Loop → ROM and Metadata: loads ROM
- Emulator Loop → DS Hardware: runs emulation
- Settings → Emulator Loop: configures
- DS Hardware → Memory and MMU: accesses
- DS Hardware → Cycle Scheduler: coordinates cycles
- DS Hardware → ARM Execution: executes instructions
- DS Hardware → ARM7 Emulation Modes: uses selected mode
- DS Hardware → 2D and 3D GPU: renders graphics
- DS Hardware → Sound Processing: processes sound
- Platform Presenter → Input Handling: collects controls
- Input Handling → DS Hardware: supplies input
- 2D and 3D GPU → Platform Presenter: presents frames
- Sound Processing → Platform Presenter: outputs audio
- Emulator Loop → Save States: saves and restores
- DS Hardware → Cheats: applies cheats
- Emulator Loop → RetroAchievements: updates
- RetroAchievements → RetroAchievements Service: communicates with