Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secret of Mana (2018, PC) — File Format & Engine Documentation

Reverse-engineering notes for the PC (Steam) release of Square Enix's 2018 remake of Secret of Mana / Seiken Densetsu 2 (Steam AppID 637670, internal codename "Mordred").

This repository is documentation and analysis only. It contains no game assets, no extracted content, no keys and no binaries from the game. Everything here was derived from a legally purchased Steam copy, and the tools operate on your own local installation.

There is no porting, modding or BYOA intent — the goal is a written record of how this particular title is built, because it is an unusually well-documented specimen of a PhyreEngine game shipping on Windows.


TL;DR — what this game actually is

Engine Sony PhyreEngine (D3D11 target), Bullet physics, Recast navigation, Lua 5.2.1, Dear ImGui
Audio SQEX::Sd ("sead") — Square Enix's in-house audio middleware, CRI HCA codec, WASAPI output
Video Windows Media Foundation via a custom IMFByteStream, container encrypted (OpenSSL shipped)
Executable 32-bit x86, MSVC 2013 toolset, Steam DRM wrapper (.bind), build timestamp 2018-07-13
Gameplay data Square Enix's own formats — .mpd tilemaps, .col collision, .scp/.mpl scripts, .ai tables
Scripts A human-readable, comma-delimited event-script DSL, XOR-obfuscated with a 256-byte table
Total install ~8.1 GB across 22,653 loose files — nothing is packed into archives

The single most interesting structural fact: PhyreEngine is used only for rendering, animation, scene graph and asset streaming. Not one game-specific C++ class is serialised into a .phyre file. All gameplay data lives in separate, in-house formats that carry obvious SNES-era lineage — including scripts that still reference .gif sprite files.

See docs/01-overview.md to start.


Documents

Document Contents
01 — Overview Build identity, directory layout, file census
02 — PhyreEngine usage Engine version evidence, middleware, class inventory
03 — .phyre container Header layout, self-describing type tables, texture payloads
04 — Audio: sead / SAB / HCA Bank format, codec census, sead.win.config
05 — Maps: .mpd / .mpl Tilemap planes, animated tiles, layer manifests
06 — Collision: .col Mesh records and the surface-type bitfield
07 — Scripts: .scp / .mpl / .bin The XOR table, its recovery, and the script language
08 — Remaining formats .ai, Database/*.bin, EffectFork .psb, video .dat
09 — Is it a real PC port? Evidence for and against, with a verdict

Tools

Small, dependency-free Python 3 scripts under tools/. They read from a game installation you point them at; they never bundle game data.

export SOM_ROOT="/path/to/SteamLibrary/steamapps/common/Secret of Mana"

python tools/census.py                     # file-type inventory of the install
python tools/phyre_info.py <file.phyre>    # header + embedded type/member tables
python tools/phyre_texture.py <file.phyre> # report texture format/size (verifies the model)
python tools/sab_info.py <file.sab>        # audio bank chunks + HCA parameters
python tools/mpd_parse.py <file.mpd>       # tilemap geometry, planes, animated-tile table
python tools/col_parse.py <file.col>       # collision meshes and surface flags
python tools/scp_key.py                    # locate the script XOR table inside the exe
python tools/scp_decrypt.py <file.scp>     # de-obfuscate a script resource

tools/scp_key.py locates the obfuscation table inside your own copy of the executable and writes it to a local file; the table itself is not committed here.

Verification status

Claims in these documents are labelled:

  • Verified — a parser reproduces the format over the entire corpus with zero mismatches.
  • Consistent — model fits every sample checked, but not exhaustively proven.
  • Open — observed but not explained.
Format Status Coverage
.phyre texture payloads Verified 3216 / 3217 files
.mpd (all three variants) Verified 911 / 911 files
.mpl layer manifests Verified 520 / 522 files
.col collision Verified 501 / 501 files
.scp / .mpl / .bin obfuscation Verified 1151 / 1151 files
.sab bank header + HCA Verified 11311 / 11311 files
.phyre header fields 4–17 Open —
.ai record layout Open —
Video .dat encryption Open —

Licence

Documentation: CC BY 4.0. Tools: MIT. Secret of Mana and Seiken Densetsu are trademarks of Square Enix. This project is unaffiliated with and unendorsed by Square Enix or Sony Interactive Entertainment.

About

File format and engine documentation for the PC (Steam) release of Secret of Mana (2018) - a PhyreEngine title. Analysis only, no game assets.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages