a proof-of-concept Nintendo Switch 2 emulator.
Find a file
Nikilite 5765c4b4e7
Some checks are pending
Security Audit / security (push) Waiting to run
Add JIT warmup to test runner and improve GUI feedback
Introduced a warmup_jit function in the test runner to pre-compile basic instructions, reducing timeout issues on slower hardware. Updated the GUI to provide clearer feedback during JIT warmup and test execution, including improved status messages and logs.
2025-10-12 22:47:33 +02:00
.github Refactor macOS build env setup and cleanup ARM64 handling 2025-10-10 16:24:48 +02:00
assets add .gitkeep to root-level folders 2025-06-09 21:42:37 +02:00
benchmarks add .gitkeep to root-level folders 2025-06-09 21:42:37 +02:00
docs add .gitkeep to root-level folders 2025-06-09 21:42:37 +02:00
examples track project folders with .gitkeep 2025-06-09 21:46:42 +02:00
oboromi-core Add JIT warmup to test runner and improve GUI feedback 2025-10-12 22:47:33 +02:00
oboromi-gui Add JIT warmup to test runner and improve GUI feedback 2025-10-12 22:47:33 +02:00
scripts track project folders with .gitkeep 2025-06-09 21:46:42 +02:00
third_party Update dynarmic 2025-09-24 19:28:58 +02:00
.gitignore Improve Boost patching and add Zydis/ZYCore linking 2025-08-22 00:36:15 +02:00
.gitmodules Update .gitmodules 2025-08-02 22:55:50 +02:00
build.rs BIG UPDATE: switched to Dynarmic as ARM64 CPU JIT emulator 2025-08-02 22:27:02 +02:00
build_log.txt add some atomic operations and FFI interface to memory system 2025-08-05 19:05:26 +02:00
Cargo.lock Bump cc from 1.2.39 to 1.2.40 2025-10-06 08:55:50 +00:00
Cargo.toml Update Cargo.toml 2025-08-21 03:31:49 -07:00
LICENSE Initial commit 2025-06-09 20:11:08 +02:00
README.md Update README.md 2025-10-10 02:09:41 +02:00

oboromi logo

License Discord

(◕‿◕)  Join our Discord here 🢰

oboromi

a proof-of-concept Nintendo Switch 2 emulator written in Rust

Overview

oboromi is a modular and work-in-progress emulator for the Nintendo Switch 2. It's built in Rust and focuses on correctness, clarity, and traceability rather than performance at this stage. The current implementation includes a functioning ARM64 CPU core using Dynarmic JIT compilation, comprehensive instruction testing, and cross-platform compatibility.

Important

oboromi is not yet playable and does not emulate any commercial firmware or games.

Features

JIT Backend (Dynarmic)

oboromi uses Dynarmic as a JIT backend for AArch64 instruction translation.
The included version is a fork with custom modifications designed to integrate directly with DynarmicCPU in oboromi.

Comprehensive Instruction Testing

  • Reliable test framework using breakpoints and run() instead of single-stepping
  • 10+ instruction tests covering core ARM64 operations:
    • NOP, ADD, SUB, MOV operations
    • Register and immediate arithmetic
    • Control flow (branches, returns)
    • Multi-instruction sequences

Memory Management

  • 32-bit and 64-bit load/store operations with proper alignment handling
  • Endianness-aware memory access using little-endian byte ordering
  • Virtual address translation support via MMU with 4KB paging and 64-entry TLB

Key Components:

Memory Backend (memory.rs)

  • 8MB RAM allocation with bounds checking on all accesses (dynarmic_interface.rs)
  • Atomic operations support (compare-and-swap, atomic add)
  • Exclusive monitor for ARM load/store exclusive instructions
  • Direct C interface for Dynarmic integration

Memory Management Unit (mmu/)

  • Virtual to physical address translation
  • Sparse page table implementation with permission flags
  • Translation Lookaside Buffer (TLB) with FIFO replacement

Testing & Verification

🧪 Starting Dynarmic JIT Instruction Tests...
  Base address: 0x0000000000001000
  Using run() with breakpoints for reliable execution

  ✅ NOP - PASS (24.3ms)
  ✅ ADD X1, X1, #2 - PASS (22.9ms)
  ✅ SUB X2, X2, #1 - PASS (23.4ms)
  ✅ ADD X0, X0, X1 - PASS (23.2ms)
  ✅ MOV X3, X4 - PASS (23.8ms)
  ✅ B +8 - PASS (24.1ms)
  ✅ RET - PASS (23.0ms)
  ✅ Atomic ADD Test - PASS (23.0ms)
  ✅ Memory Access Pattern - PASS (23.7ms)
  ✅ Multiple Arithmetic Ops - PASS (22.2ms)

📊 Test Summary:
  Total tests: 10
  Passed: 10 ✅
  Failed: 0 ❌
  Total time: 254.8ms

GUI (via eframe)

  • Built-in GUI based on egui
  • Provides:
    • Test result display
    • Real-time execution statistics

How to Run

git clone --recurse-submodules https://github.com/0xNikilite/oboromi
cd oboromi

cargo run

The build system will automatically:

  • Handle architecture-specific linking (Zydis/Zycore on x86_64 only)
  • Compile the C++ interface
  • Run the test suite when clicked on the main button

Platform-Specific Notes

Windows

  • Supports both MSVC and MinGW toolchains
  • Automatic library linking for Windows APIs

macOS

  • First test run may be slower due to JIT compilation
  • Native support for both Intel and Apple Silicon

Linux

  • nothing to note

Contributing

Pull requests are welcome! Feel free to fork the repo, open issues, or suggest improvements.

📜 License

This project is licensed under the Mozilla Public License 2.0.

See LICENSE for details.



[!WARNING] oboromi is not affiliated with Nintendo. This project does not contain any copyrighted firmware or ROMs.