Overview
oboromi currently provides a GUI-based interface for running ARM64 CPU tests. The emulator cannot yet run commercial games or firmware, but provides a foundation for testing CPU emulation accuracy.Running the Emulator
Basic Execution
Run the emulator directly from the source directory:- Builds the project (if needed)
- Initializes the logging system
- Launches the eframe/egui GUI window
- Creates
oboromi.login the current directory
Release Mode
For better performance, use release mode:With Tracing Enabled
Enable detailed execution tracing:The
trace feature is defined in gui/src/main.rs:42-43 and forwards to oboromi-core.GUI Interface
Startup Sequence
When you launch oboromi:Splash Screen
The GUI displays a splash screen for ~1.6 seconds with:
- oboromi logo (fade in/out animation)
- “Experimental” warning
- Information about current limitations:
- “This is an experimental foundation for Switch 2 emulation.”
- “Without a kernel exploit, running retail games is currently impossible.”
- “This release focuses on CPU instruction emulation only.”
gui/src/gui/gui.rs:41-132.Window Configuration
The GUI is configured ingui/src/main.rs:22-28:
Menu Bar
Running CPU Tests
Click 'Run CPU Tests'
The button spawns a background thread that:
- Warms up the JIT compiler
- Executes ARM64 test suite via
oboromi_core::tests::run::run_tests() - Returns results as a vector of strings
gui/src/gui/gui.rs:157-163
Logging System
Log File Location
Logs are written tooboromi.log in the current working directory (where you ran cargo run).
Log Format
Implemented ingui/src/main.rs:5-20:
[LEVEL][module::path] message
Example log entries:
Log Levels
- Debug (Default)
- Trace (Verbose)
Shows INFO, WARN, and ERROR messages.Output includes:
- CPU initialization
- Test execution start/stop
- Major state changes
Command-Line Binary
Direct Execution
After building, run the binary directly:Environment Variables
Runtime Configuration
Emulation State
The emulator initializes the following system (fromcore/src/sys/mod.rs):
CPU
- 8-core ARMv8 CPU
- Unicorn Engine backend
- 12GB shared memory
GPU
- SM86 (NVIDIA Ampere) stub
- Vulkan 1.3 backend via
ash - Stubbed command processing
Filesystem
- VFS implementation
- 32GB UFS/eMMC emulation
- No game loading yet
System Services
- 150+ HLE firmware services
- Stubs for nn::* modules
- Defined in
core/src/sys/mod.rs:4-166
System Services
All services are initialized asOption<nn::<service>::State> and start as None. Example from core/src/sys/mod.rs:
Performance Characteristics
Build Configuration Impact
- Debug Build
- Release Build
- Profile-Guided Optimization
Command:
cargo runPerformance:- ~10-100x slower than release
- Includes debug symbols and assertions
- No optimizations
- Large binary size (~500MB with debug info)
- Development and debugging
- Running in debuggers (gdb/lldb)
- Quick iteration
Troubleshooting Runtime Issues
Window doesn't appear / Black screen
Window doesn't appear / Black screen
Cause: Missing Vulkan drivers or GPU compatibility.Diagnosis:Solutions:
- Linux: Install
vulkan-toolsand your GPU’s Vulkan driver - Windows: Update GPU drivers from manufacturer
- macOS: Ensure MoltenVK is installed (should be automatic)
oboromi.log is not created
oboromi.log is not created
Cause: Permission denied or read-only filesystem.Solution: Run from a writable directory:
CPU tests hang indefinitely
CPU tests hang indefinitely
Cause: Unicorn Engine deadlock or infinite loop in test.Solution:
- Check
oboromi.logfor last instruction executed - File an issue with the test case
- Try release mode:
cargo run --release
Panic: 'Failed to run GUI'
Panic: 'Failed to run GUI'
Cause: eframe initialization failure.Check:Common causes:
- Missing
assets/oboromi_logo.png(embedded in binary) - Graphics driver crash
- Insufficient memory
High CPU usage when idle
High CPU usage when idle
Cause: eframe’s
ctx.request_repaint() is called unconditionally during splash animation.Workaround: Let the splash finish (~1.6 seconds), then CPU usage drops to near-zero when idle.See gui/src/gui/gui.rs:130 where request_repaint() is called.Architecture Components
When oboromi runs, these modules are initialized:Core Modules (core/src/lib.rs)
CPU Manager
Fromcore/src/cpu/mod.rs:
cpu_manager, which coordinates execution across cores using the Unicorn Engine.
GPU State
Fromcore/src/sys/mod.rs:170-178:
What’s Next
Understanding CPU Tests
Learn what the CPU tests validate
Architecture Deep Dive
Explore the emulator’s design
Contributing Tests
Help expand test coverage
GPU Emulation
Understand SM86 GPU emulation
Advanced Usage
Running Specific Test Cases
Currently, all tests run together via the GUI. To run specific tests, you’ll need to modifycore/src/tests/run.rs or invoke test functions directly in your own Rust code:
Integration with Other Tools
The core library can be used as a dependency:your-project/Cargo.toml
Community & Support
- Discord: discord.gg/g9sehj8bPz
- GitHub Issues: github.com/0xNikilite/oboromi/issues
- Main Repository: git.eden-emu.dev/Nikilite/oboromi
