a proof-of-concept Nintendo Switch 2 emulator.
Find a file
Nikilite a8d644ea23
Some checks failed
Security Audit / security (push) Has been cancelled
[*] add multicore CPU manager and shared memory support
Introduces CpuManager to handle multiple UnicornCPU cores sharing 12GB of memory, enabling multicore emulation. Adds tests for multicore initialization and shared memory access. Updates UnicornCPU to support shared memory mapping and core IDs. Removes unused glint effect code from GUI loading screen.
2025-11-22 00:12:53 +01:00
.github [*] add contribution docs and refactor core modules 2025-11-18 23:52:55 +01:00
assets [cosmetic] Add a splash screen 2025-11-10 23:47:37 +01:00
benchmarks add .gitkeep to root-level folders 2025-06-09 21:42:37 +02:00
core [*] add multicore CPU manager and shared memory support 2025-11-22 00:12:53 +01:00
docs [*] add contribution docs and refactor core modules 2025-11-18 23:52:55 +01:00
examples track project folders with .gitkeep 2025-06-09 21:46:42 +02:00
gui [*] add multicore CPU manager and shared memory support 2025-11-22 00:12:53 +01:00
scripts track project folders with .gitkeep 2025-06-09 21:46:42 +02:00
.gitignore [*] move oboromi-core to core, oboromi-gui to gui, crates names kept as-is 2025-11-17 22:31:15 +01:00
.gitmodules Update .gitmodules 2025-08-02 22:55:50 +02:00
Cargo.lock [*] move oboromi-core to core, oboromi-gui to gui, crates names kept as-is 2025-11-17 22:31:15 +01:00
Cargo.toml [*] move oboromi-core to core, oboromi-gui to gui, crates names kept as-is 2025-11-17 22:31:15 +01:00
CONTRIBUTING.md changed license to GPLv3 2025-11-21 23:42:21 +01:00
license.txt changed license to GPLv3 2025-11-21 23:42:21 +01:00
README.md changed license to GPLv3 2025-11-21 23:42:21 +01:00

oboromi logo

License Discord

(◕‿◕)  Join our Discord here 🢰

oboromi

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

Overview

oboromi is a modular and work-in-progress emulator foundation for the Nintendo Switch 2. It's built in Rust and focuses on correctness, clarity, and traceability rather than performance at this stage.

Important

oboromi is not (yet) a full Switch 2 emulator. It does not run any Nintendo firmware or games.

Current Features

ARM64 CPU Emulation (Unicorn Engine)

oboromi uses Unicorn Engine for ARM64 instruction emulation. The UnicornCPU wrapper provides:

  • Full ARM64 register access (X0-X30, SP, PC)
  • Memory mapping with permission control
  • Breakpoint handling via BRK instructions
  • Safe Rust interface with proper error handling

Comprehensive Instruction Testing

  • Reliable test framework using breakpoints and run() for stable execution
  • 10/10 instruction tests passing covering core ARM64 operations:
    • NOP, ADD (immediate/register), SUB (immediate)
    • MOV (register), RET, B (branch)
    • Multi-instruction sequences and memory access patterns
  • Fast execution

Memory Management

  • 8MB emulated RAM with bounds-checked access
  • 32-bit and 64-bit load/store operations with little-endian byte ordering
  • Direct memory read/write primitives for testing

GUI (via eframe)

  • Built-in GUI based on egui
  • Provides:
    • Real-time test result display with pass/fail indicators
    • Execution timing statistics
    • Clean, responsive interface

Testing & Verification

Starting Unicorn Instruction Tests...
  Base address: 0x0000000000001000
  Breakpoint address: 0x0000000000002000

Warming up Unicorn emulator...
  JIT warmup completed in 199.4µs

  Running test: NOP
  Running test: ADD X1, X1, #2
  Running test: SUB X2, X2, #1
  Running test: ADD X0, X0, X1
  Running test: MOV X3, X4
  Running test: B +8
  Running test: RET
  Running test: Atomic ADD Test
  Running test: Memory Access Pattern (3 instructions)
  Running test: Multiple Arithmetic Ops (3 instructions)

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

How to Run

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

# Build and run (requires CMake and Ninja)
cargo run

The build system will automatically:

  • Compile the Unicorn Engine C++ bindings
  • Link required libraries
  • Launch the GUI with integrated test suite

Prerequisites

  • Rust (latest stable)
  • CMake (3.16+)
  • Ninja build system
  • C++ compiler: MSVC (Windows), Clang (macOS/Linux)

Contributing

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

📜 License

This project is licensed under the GNU General Public License v3.

See LICENSE for details.



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