System overview

PSXRecompStudio architecture

The project separates managed analysis and application logic from native execution components, with explicit validation boundaries between each stage.

Managed application and analysis

C# and .NET contain the domain model, binary-analysis workflows, recompiler IR and lowering logic, validation code, and tests. Avalonia provides the cross-platform desktop shell. The UI is intentionally kept separate from the core analysis model so research and validation can run without depending on a graphical interface.

Native core

The native core is a mixed C++/Rust implementation built with CMake and Cargo. Rust owns several controller, memory/MMIO, and CPU semantic slices, while C++ retains lifecycle/orchestration and selected state operations. Native implementation details remain hidden behind one shared-library boundary.

C ABI and P/Invoke boundary

The managed/native boundary is a stable C ABI. C# reaches that ABI through P/Invoke, while C++ types remain private to the native implementation. This makes the interop contract explicit and independently testable.

C# / .NET / Avalonia
        |
        | P/Invoke
        v
Stable C ABI
        |
        v
C++ / Rust native core

MIPS R3000A analysis

PlayStation 1 code analysis centers on the R3000A and MIPS I execution model. Current work includes instruction decoding, memory behavior, branch and load delay semantics, exception behavior, PS-X EXE analysis, basic-block extraction, and control-flow graph construction.

Recompiler research path

The static recompilation path is validated first on synthetic MIPS fixtures and also on bounded functions derived from legally supplied real PlayStation inputs. MIPS instructions are lowered into a backend-agnostic IR, host C is generated deterministically, execution is bounded, and results are compared against interpreter state. Whole-corpus coverage reporting records what can and cannot currently be lowered without selecting only known-good candidates. The project can also build and launch runnable generated-host artifacts through a headless CLI, but this still does not imply complete-title recompilation.

Validation and architecture enforcement

Golden Trace, differential validation, classified execution outcomes, and deterministic frame/report artifacts are used to detect semantic divergence. Separately, compiler-enforced architecture rules constrain layering, dependency direction, forbidden API use, and the interop boundary. Together, these mechanisms keep execution behavior and repository structure verifiable as the project grows.

Source documentation

The detailed system design remains in the repository documentation, including ARCHITECTURE.md, the architecture matrix, and the project ADRs.