Skip to content
 
 

Latest commit

 

History

2,502 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yu-Gi-Oh! Forbidden Memories Decompilation

Matching build

This repository is a byte-matching decompilation of the North American PlayStation release of Yu-Gi-Oh! Forbidden Memories (SLUS-01411). Accepted changes must continue to rebuild the complete PS-X executable exactly.

Important

The repository does not contain game data or proprietary Psy-Q tools. Supply legally obtained copies of the required files beneath game/; they remain ignored by Git.

Project status

The current mixed C/assembly build reproduces game/SLUS_014.11 with SHA-256:

84a54ed74f3d0edd6d81380839f7e4ef5bfb21ecea18be9a062bd6bfa5a45c88
Metric Current
Matching C functions 845 / 1,196 (70.65%)
Matching C bytes 107,072 (0x1A240) / 396,212 (0x60BB4) (27.02%)
Remaining compiler-generated game assembly 288 functions, 242,904 (0x3B4D8)
Intentional handwritten game assembly 63 functions, 46,236 (0xB49C)
Preserved Psy-Q CRT/SDK assembly 598 functions, 117,332 (0x1CA54)
Total discovered functions 1,794
Embedded/unassigned resident text 1,780 (0x6F4)

Runtime overlay modules:

Module Matching C functions Matching C bytes
free_duel 4 / 9 (44.44%) 472 (0x1D8) / 4,140 (0x102C) (11.40%)
main_menu 13 / 31 (41.94%) 1,952 (0x7A0) / 17,724 (0x453C) (11.01%)
overworld_after_coup 6 / 14 (42.86%) 900 (0x384) / 6,184 (0x1828) (14.55%)
overworld_before_coup 6 / 14 (42.86%) 900 (0x384) / 6,184 (0x1828) (14.55%)
password 13 / 27 (48.15%) 1,972 (0x7B4) / 10,884 (0x2A84) (18.12%)

Generated from config/slus_01411/functions.csv and config/slus_01411/overlays/*_functions.csv by tools/project/progress.py.

Matching progress covers game-owned code only. Psy-Q CRT/SDK functions are identified and preserved as assembly rather than counted as decompilation targets.

Run make progress when intentionally refreshing the project-wide snapshot. It updates the generated table above and writes detailed machine-readable metrics to tmp/reports/progress.json. Routine decompilation changes do not need to update or commit the snapshot; make check-progress remains available as an opt-in consistency check.

Quick start

Place the original executable at game/SLUS_014.11, then run:

make verify-target
make tools
MAKEFLAGS=-j"$(nproc)" make match

make match succeeds only when the rebuilt executable is byte-identical to the retail target. The full repository audit additionally requires the DATA files and BIN/CUE listed in config/slus_01411/files.sha256:

MAKEFLAGS=-j"$(nproc)" make audit

The examples use all logical CPUs reported by nproc. Set a smaller -j value explicitly on memory-constrained systems.

Decompilation workflow

  1. Select a game-owned assembly function from config/slus_01411/functions.csv.
  2. Record each distinct source/compiler attempt in the appropriate attempt ledger, with a maximum of six variants per function.
  3. Accept C only when make match reproduces the entire executable exactly.
  4. Commit the matching source and authoritative metadata. Refresh the README separately with make progress when a project-wide snapshot is desired.

Unmatched functions remain exact assembly fallbacks. Handwritten and Psy-Q assembly are tracked separately from compiler-generated game code.

Repository layout

Path Purpose
src/game/ Matching C for the resident executable
src/overlays/ Module-scoped runtime overlay sources and layout policy
src/types.h Shared fixed-width primitive aliases
asm/ Exact assembly fallbacks and data assembly
config/slus_01411/ Function inventory, compiler profiles, symbols, and target metadata
tools/ Project scripts, pinned tools, and local toolchains
notes/ Research, plans, evidence, and detailed documentation
tmp/ Generated builds, reports, caches, and scratch work
game/ Ignored, immutable user-supplied retail inputs

All commands must run from the repository root, and project work must remain inside this working directory.

Documentation

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages