How morerokk/mhgurecomp works
MHGU Recomp is a native port that statically recompiles the Switch game’s ARM code to C and runs it with host implementations of Switch services and NVN over Vulkan. The main workflow is to provide the game files, launch the runtime, and play; Android adds an import-and-launch path. Major branches include multiplayer, mods and engine modules, graphics/settings, and the separately runnable lobby server. The graph uses README statements and sampled caller references; unsampled feature links are omitted where their wiring is not shown.
Main entry points: main.c Runtime entry · ImportActivity.java Game import · MHGUActivity.java Android launcher · hle Guest HLE
Components 24
Recompilation and runtime
- ARM lifter
tools/lifter.py - C generator
tools/gen.py - Runtime entry
runtime/main.c - Game loader
runtime/loader.c - Game library
runtime/gamelib.c - Guest HLE
runtime/hle - Guest kernel
runtime/kernel.c - System services
runtime/services - Updater
updater/updater.c
Graphics and controls
- Settings
runtime/config.c - Settings UI
runtime/settings_panel.cpp - Input support
runtime/host_input.c - NVN compatibility
runtime/nvn/objects.c - Vulkan renderer
runtime/nvn/vulkan/exec.c
Multiplayer
- Local wireless
runtime/net/ldn.c - Lobby server
server/server.go - RyuLdn server
runtime/net/ryusrv/server.cpp
Mods and extensions
- Mods
runtime/mods.c - Engine modules
runtime/engine_module.c
Android app
- Game import
android/java/io/github/morerokk/mhgurecomp/ImportActivity.java - Android launcher
android/java/io/github/morerokk/mhgurecomp/MHGUActivity.java - Log viewer
android/java/io/github/morerokk/mhgurecomp/LogActivity.java
Other components
- Player
- Game files
Connections 22
- Player → Game import: imports files
- Game import → Game files: prepares files
- Player → Runtime entry: launches game
- Game files → Runtime entry: provides inputs
- Runtime entry → Game library: loads library
runtime/main.c - Runtime entry → Game loader: loads executable
runtime/main.c - ARM lifter → C generator: feeds generator
tools/lifter.py - Runtime entry → Guest HLE: initializes features
runtime/main.c - Runtime entry → Guest kernel: sets up kernel
runtime/main.c - Guest HLE → System services: implements services
- Player → Settings UI: configures game
- Settings UI → Settings: saves settings
- Player → Input support: controls game
- NVN compatibility → Vulkan renderer: renders through
- Player → Local wireless: joins multiplayer
- Local wireless → Lobby server: uses lobby service
runtime/net/ldn.c - Player → RyuLdn server: hosts lobby
- Runtime entry → Mods: initializes mods
runtime/main.c - Runtime entry → Engine modules: loads modules
runtime/main.c - Android launcher → Game import: supports import
- Android launcher → Log viewer: opens logs
android/java/io/github/morerokk/mhgurecomp/MHGUActivity.java - Player → Updater: updates runtime