Majistic Recomp
Majistic Recomp is a native PC port and recompilation of Majin and the Forsaken Kingdom for Windows x64 with Vulkan rendering and configurable frame rates.
- Type: PC port
- Game: Majin and the Forsaken Kingdom
- Runs on Windows
- By kelvynzucco
- Latest release v0.1.5, 2026-11-24
- Source: https://github.com/kelvynzucco/majistic-recomp
- Website: https://github.com/kelvynzucco/majistic-recomp/releases
README
Majistic Recomp
Native PC port and static recompilation of Majin and the Forsaken Kingdom (Xbox 360) for modern Windows x64 PC.
Early Prototype (WIP) · Native C++23 · Vulkan Renderer · 30 / 60 / Uncapped FPS · Custom Launcher & In-Game Overlay
Warning
EARLY DEVELOPMENT & EXPERIMENTAL PROTOTYPE: This project is currently in an early stage of development (work-in-progress). While foundational game systems, rendering, and gameplay sequences are functional, expect bugs, edge-case graphical artifacts, audio glitches, and potential crashes. It is actively being researched and improved, and is not yet a polished or final release.
Legal, Copyright & Fair Use Notice
Important
STRICT ZERO-ASSET DISTRIBUTION POLICY:
This repository distributes NO game assets, ISO disk images, executables, proprietary shader microcode, textures, audio, dialogue, video, or copyrighted game binaries.
Users and testers MUST provide their own legally acquired physical disc copy of the original Xbox 360 game (Majin and the Forsaken Kingdom). All executable unpacking, symbol mapping, local shader reconstruction, code generation, and static recompilation steps are executed strictly locally on the user's computer using the automated scripts and launcher tools provided in this repository.
Note
NO AFFILIATION DISCLAIMER: Majistic Recomp is an independent, non-commercial, experimental open-source preservation and static recompilation project. The authors and contributors have ABSOLUTELY NO affiliation, relationship, association, sponsorship, or endorsement with Bandai Namco Entertainment Inc., Game Republic, Microsoft Corporation, or any of their parent companies, subsidiaries, or affiliates. All trademarks, service marks, trade names, product names, logos, and registered trademarks appearing in this repository are the property of their respective owners.
Overview
Majistic Recomp is an open-source static recompilation of the classic 2010 action-adventure game Majin and the Forsaken Kingdom (originally developed by Game Republic and published by Bandai Namco for the Xbox 360). It translates original PowerPC machine code into native, optimized C++23, running on modern Windows x64 hardware via the ReIGlue / ReXGlue SDK with a dedicated Vulkan graphics runtime derived from Xenia and Forza Horizon 1: ReImagined.
Note
GRAPHICS BACKEND SUPPORT (VULKAN ONLY FOR NOW): Vulkan is the active, supported, and recommended graphics backend. Direct3D 12 (D3D12) support has been discontinued for the time being (marked as deprecated and hidden behind Developer Mode) while development focuses exclusively on Vulkan rendering accuracy, shadow fidelity, post-processing parity, and shader pipeline caching.
By translating game logic into native CPU instructions and mapping Xbox 360 Xenos GPU calls through the Vulkan runtime, the project currently implements:
- Configurable frame rate targets (
30/60/UncappedFPS) with live hot-reload switching and experimental physics/animation normalization hooks. - Clean-room local shader reconstruction & monolithic Vulkan pipeline cache (
.monolithic.vkpc), significantly reducing runtime shader stuttering. - Reverse-engineered graphics subsystem, featuring custom hooks for post-processing effects (
SysKemumaki), bokeh/native depth of field, bloom, fog, Tepeu ambient VFX, Tyndall360 sun god-rays, dynamic camera FOV scaling, and waitable-timer presentation pacing (analyzed with REA). - Advanced Vulkan shadow & foliage rendering (PAL & USA): Eliminates the character silhouette light halo (
SSSM) while preserving Pre-Z depth, adds configurable shadow map scaling (1x/2x/4x), sub-texel PCF filtering, receiver plane bias, two-sided casters, world-space cascade snapping, and 4-mode foliage alpha cutout. - In-Game ImGui Settings Overlay (
F1/Esc): Fullscreen or draggable windowed overlay with live hot-reload controls, input blocking while open, live Gamepad ↔ Keyboard & Mouse switching, visual Xbox / Keyboard & Mouse control diagrams (Kenney.nl Input Prompts), and one-click saving back to the launcher config. - Synchronized fast-forward & instant boot: Clean fast-forward for in-game dialogues and cutscenes with dynamic audio frequency scaling, plus instant intro logo bypass straight to the title screen.
- Multi-language & independent audio support: Selectable Text/UI and Voiceover Audio languages independently, with automatic PAL/USA edition and disc asset language detection.
- Save Profiles Manager &
.savisticpackages: Create, switch, duplicate, rename, import, and export isolated save profiles (with achievements and optional launcher settings) undergame-data/runtime/saves/. - Configurable resolutions & render scaling (
720p/1080p/1440p/4Koutput,1x/2x/3xnative draw scale) paired with AMD FidelityFX FSR 1.0, CAS, De-Dither, and FXAA post-processing. - Desktop Launcher powered by Tauri v2 and Tailwind CSS, featuring live configuration controls, interactive Xbox & Keyboard/Mouse button layouts, automatic clean-reinstall updates with save migration, integrated Developer Mode toggle, and portable game-data management.
Supported Game Editions
| Region / Edition | Executable Version | Title ID | Media ID | Support Status |
|---|---|---|---|---|
| American / NTSC-U | 0.0.0.2 | 4E4D0816 | 76FDB642 | Playable Prototype (WIP) (prototype-usa/) |
| European / PAL | 0.0.0.3 | 4E4D0816 | 67BD87EF | Playable Prototype (WIP) (prototype/) |
Deterministic Shift Law (USA 0.0.0.2)
Analysis of the executable revealed that between the .text entry (0x82150000) and 0x821C0000, 100% of function addresses match 1:1 between European and American releases. Above 0x821C0000, every function is shifted by exactly -0x70 bytes (-112 bytes / 28 PowerPC instructions) due to an alignment padding variation in the PAL compiler toolchain.
All 34,247 PowerPC functions have been mapped and recompiled with zero unresolved branch targets.
Key Technical Highlights
1. Vulkan Renderer & Presentation Pacing (Primary Backend)
- Active Supported Backend: All ongoing graphics engineering targets Vulkan via ReIGlue Xenos GPU emulation (FBO render target path, SPIR-V constant-only texture fetch translation, texture cache barriers, and null-descriptor handling for accurate 2D UI and 3D geometry).
- Direct3D 12 Status: D3D12 is no longer actively supported or maintained for now (deprecated in the launcher and bypassed by Vulkan-only features such as shadow depth bias tuning, bokeh DoF, and live render scaling).
- Frametime Pacing & UI Loop Stability: Waitable-timer frame presentation pacing (
vulkan_hooks.cpp), live hot-reload frame rate limiting (30/60/Uncapped), and continuous vs. guest-driven UI repaint separation (PaintMode::kGuestOutputThreadImmediately). - GPU Bandwidth & Shadow Tuning: 32bpp gamma render targets (
R8G8B8A8_UNORM), native anisotropic filtering, disabled synchronous memexport readbacks, Vulkan PCF shadow filtering, receiver plane bias, two-sided shadow casters, and world-space cascade snapping.
2. Clean-Room Shader Pre-Compilation & Multi-Threaded Pipeline Warm-Up
- 100% Clean-Room Shader Distribution: No original shader microcode (
.xsh) or proprietary game assets are distributed in the repository or release packages. Instead, the release includes only a portable pipeline state description list (4E4D0816.fbo.vk.xpl, currently cataloging 381 Vulkan pipelines, containing 64-bitXXH3hashes and render state bitfields) and a reconstruction recipe map (shader_recipes.jsonwith 257 core shader recipes). - Local Reconstruction & GPU Warm-Up: During ISO Setup (or when clicking Precompile Shaders in the launcher), the launcher reconstructs the Xenos shader cache locally on the user's machine directly from the files extracted from their own game disc (
static.pak,eff.pak,HexaEngineXbox.knl), verifies every shader viaXXH3_64bits, and pre-compiles a monolithic Vulkan driver pipeline cache (.monolithic.vkpc) tailored to the user's specific GPU. - Asynchronous Fallback: Any remaining uncataloged pipelines (such as 2D UI blits or rare effect permutations) are compiled asynchronously on background worker threads to prevent main-thread traversal stuttering.
- Audio Stability (XMA2 Multi-Stream Fix): Fixes XMA2 packet-skip navigation across multi-stream audio banks so looping background music (such as title screen BGM) plays continuously without cutting out.
3. Synchronized Cutscene & Dialogue Fast-Forward
- Holding
Select/Back(controller) orTab(keyboard) during in-game cutscenes and dialogues triggers clean fast-forward (2x,4x,6x,8x). - Integrated dynamic audio stream frequency scaling via SDL3 (
SDL_SetAudioStreamFrequencyRatio), preserving voice clarity and releasing audio channels naturally without muting or corruption.
4. Scalable Display, In-Game Overlay & Modern Controls
- Display Output & Scaling: Selectable output between 720p, 1080p, 1440p, and 4K UHD, with live hot-reload internal draw scaling (
1x/2x/3x) in Vulkan. - Upscaling & Post-Processing: Integrated AMD FSR 1.0 (EASU + RCAS), CAS, Bilinear scaling, De-Dither, FXAA, 4-mode foliage alpha cutout, bokeh/native Depth of Field, Bloom, Fog, Tepeu Ambient VFX, and Tyndall360 sun god-rays.
- Input & Overlay Isolation: Supports Gamepad (SDL3 / XInput) and Keyboard + Mouse with configurable mouse look sensitivity, live switching between devices inside the In-Game Overlay (
F1/Esc), full game input suppression while the overlay is open, and visual Xbox / Keyboard & Mouse control guides powered by Kenney.nl Input Prompts.
5. High Frame Rate Physics & Animation Fixes
- Collision Edge Step Scaling (
step_fix): At high frame rates (60+ FPS), character movement steps into small lips, ledges, or stair edges could resolve backwards rather than upwards, creating invisible walls. Incorporates root-motion scaling hooks (researched by ArthurMS15) to smoothly scale step distance when blocked, allowing characters to climb edges naturally just like on console. - Sub-Motion & Object Animation Speed Normalization (
anim_speed): Fixes partial animations (Majin's facial expressions, Tepeu's gesture commands, healing animations) and certain world objects running 2x to 4x too fast above 30 FPS by dynamically scaling them by frame delta-time. - Frame-Time Smoothing (
frame_timer): Evens out frame time steps to keep game delta-time in lockstep with real time, avoiding collision jitter. - Camera FOV & Draw Distance: Configurable field-of-view multiplier (
--majin_fov_scale) and draw distance scaling (--majin_draw_distance_scale). The underlying graphics routines, post-processing pipeline (SysKemumaki), and camera projection matrices were analyzed and mapped with the assistance of REA.
6. CPU Codegen & Compiler Optimizations (Issues #17 & #19)
- Non-Volatile Guest Memory Accessors: Modified the ReXGlue codegen template (
resources/templates/codegen/pch_h.injaviapatches/rexglue-0.10.0/codegen-nonvolatile-memory-accessors.patch) to remove restrictivevolatilequalifiers from standard guest memory macros (REX_LOAD_*andREX_STORE_*). This enables Clang/LLVM to perform register promotion, SSA value caching, Common Subexpression Elimination (CSE), and Dead Store Elimination (DSE) without constant redundant roundtrips to host RAM/cache. Multi-thread memory ordering remains strictly protected viastd::atomic_thread_fenceandstd::atomiccompare-exchange operations. x86-64-v3Target Architecture (AVX2/FMA/BMI2): Translation units compile with modern ISA extensions (-march=x86-64-v3 -mavx2 -mfma -mbmi -mbmi2 -ffp-contract=fast), enabling hardwaremovbe(big-endian moves folded directly into load/store instructions), single-cycle fused multiply-add for transform matrices, and native 256-bit SIMDe AltiVec (VMX128) skeletal animation lowering.- Link-Time Optimization (ThinLTO): Release builds enable ThinLTO (
CMAKE_INTERPROCEDURAL_OPTIMIZATION/-flto=thin), allowing aggressive function inlining and constant folding across all 180+ recompiled translation units without prohibitive link times. -
Important
CPU Hardware Requirement: Building and running Majistic Recomp now requires a modern 64-bit x86 processor with AVX2 support (
x86-64-v3microarchitecture baseline: Intel Haswell 4th Gen / AMD Excavator/Zen or newer). Older CPUs lacking AVX2, FMA, or BMI2 instructions are unsupported and will crash with an illegal instruction exception (SIGILL).
Directory Architecture: Self-Contained game-data/
All decompiled game files, extracted assets, binaries, and runtime caches are cleanly isolated inside a single self-contained directory:
Majin Recomp/
├── Majistic Launcher.exe # Unified portable desktop launcher (with in-app Developer Mode toggle)
├── branding/ # Official logo & high-resolution icons
├── launcher/ # Launcher source code (Tauri v2 + Tailwind CSS) & prebuild manifests
├── prototype/ # PAL (0.0.0.3) codegen manifests & translation units
├── prototype-usa/ # USA (0.0.0.2) codegen manifests & translation units
├── src/ # Unified C++ source code & QoL hooks (shared)
├── scripts/ # Automation scripts (extraction, build, run)
└── game-data/ # Self-contained game directory
├── bin/ # Compiled native game binaries (majin.exe, majin-pal.exe, majin-usa.exe) & DLLs
├── unpacked/ # Unpacked executable image (loaded-image.bin)
├── runtime/ # Save profiles (saves/), shader cache, and logs
└── [Game Assets] # Audio, video, textures, level packages from disc
Tip
If you ever want to recompile, clean cache, or switch game versions, simply delete or replace the game-data/ directory. The root launcher and project files remain completely untouched and clean.
Controls Reference
| Action | Xbox Gamepad | PlayStation Reference | Keyboard & Mouse |
|---|---|---|---|
| Move | Left Stick | Left Stick (L3) | W / A / S / D |
| Camera | Right Stick | Right Stick (R3) | Mouse / I / J / K / L |
| Jump / Confirm | A | Cross | Space |
| Run / Dash | Hold B + Move | Hold Circle + Move | Hold Shift + WASD |
| Interact / Back | B | Circle | E |
| Attack | X | Square | Left Mouse Button |
| Roll / Evade | Y | Triangle | R |
| Crouch | LT | L2 | Hold Q |
| Command Partner | RT | R2 | Right Mouse Button |
| Throw Mode | LB | L1 | F |
| Special Ability | RB | R1 | C |
| D-Pad Navigation | D-Pad | D-Pad | Arrow Keys |
| In-Game Settings (Overlay) | F1 / Esc | F1 / Esc | F1 / Esc |
| In-Game Status / Pause | Start / Menu | Options | Enter |
| Map / Fast-Forward | Back / View | Share / Touchpad | Tab |
| Quit Game | F1 / Esc (via In-Game Overlay) | F1 / Esc (via In-Game Overlay) | F1 / Esc (via In-Game Overlay) |
Building from Source
Prerequisites
- Windows 10 or 11 (x64) on a CPU supporting AVX2 /
x86-64-v3(Intel Haswell 2013+ / AMD Zen 2017+ or newer). Pre-AVX2 CPUs are not supported. - Visual Studio 2022 (Community, Professional, or Build Tools) with:
- Desktop Development with C++ (
MSVC v143 x64,Windows 10/11 SDK) - Clang: Visual Studio component C++ Clang Compiler for Windows, or standalone LLVM 20.1.8+
- Desktop Development with C++ (
- CMake 3.25+ and Ninja
- Python 3.10+, Git, and PowerShell 7+ (or Windows PowerShell 5.1)
- Node.js 18+ and Rust (optional, only required to build or modify the desktop launcher from source)
You can install the required toolchain quickly via winget:
winget install Microsoft.VisualStudio.2022.BuildTools --override "--quiet --wait --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.26100 --add Microsoft.VisualStudio.Component.VC.CMake.Project --includeRecommended"
winget install LLVM.LLVM --version 20.1.8
winget install Kitware.CMake Ninja-build.Ninja Python.Python.3.12 Git.Git
Step-by-Step Compilation
1. Clone this repository
git clone https://github.com/kelvynzucco/majistic-recomp.git
cd majistic-recomp
2. Prepare and build the local ReXGlue SDK (v0.10.0 + patches)
.\scripts\prepare-sdk-source.ps1
.\scripts\build-sdk-local.ps1
3. Extract your legally owned game data
Extract your Xbox 360 disc dump directly into game-data/:
.\scripts\extract-iso.ps1 -IsoPath "path\to\your_dump.iso" -OutputDir "game-data"
Unpack the encrypted executable:
.\scripts\unpack-xex-usa.ps1
4. Recompile and build the native executable
Generates the C++23 source translation via rexglue codegen and compiles game-data/bin/majin.exe:
.\scripts\build-usa.ps1 -Configuration Release
5. Build and Launch via the Desktop Launcher
The project builds a single unified desktop launcher (Majistic Launcher.exe) with an in-app Developer Mode toggle (in Setup Game) that unlocks advanced rendering paths, diagnostic logging, shader cache monitoring, and C++ recompilation options when needed.
To compile the launcher:
.\scripts\build-launcher-usa.ps1
You can then run Majistic Launcher.exe, or develop live with:
cd launcher
npm run tauri dev
Alternatively, you can launch directly via the CLI runner (using the supported Vulkan backend):
.\scripts\run-usa.ps1 -RenderingPath Vulkan -WindowSize 1920x1080 -FrameRateMode 60
Known Issues
Launcher window closes or goes blank with MSI Afterburner / RTSS running (issue #6) The RivaTuner Statistics Server (RTSS) overlay hook crashes the launcher's WebView2 browser process a few seconds after startup. The launcher detects this and shows a message with the fix:
- Open RTSS and click Add to add
Majistic Launcher.exeandmsedgewebview2.exe(usually inC:\Program Files (x86)\Microsoft\EdgeWebView\Application\<version>\). - Set Application detection level to None for both.
- Open the launcher again.
RTSS keeps working normally inside the game; the exclusions only affect the launcher window. Alternatively, close MSI Afterburner / RTSS before opening the launcher.
Credits & Acknowledgments
- GM-0856 / majin-recompile: Original recompilation research and PAL proof-of-concept that served as the initial kickoff inspiration for this project.
- ArthurMS15 / MajinRecomp: Research and implementation of physics collision step scaling (
step_fix), sub-motion animation speed correction (anim_speed), frame time smoothing (frame_timer),