No description
  • C++ 56.8%
  • C 25%
  • Python 18.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-29 20:34:45 -05:00
config/PCV2 SUBAGENT WAVE wave_resub WAVE 3: 110 lands from L5/L6/CB3 - first all-match wave (110 of 110; 50 asm-backed naked fallbacks flagged - the live leaf/call pools shift into the no-C-spelling tier incl. the row-66 float-compare class confirmed at 0x4958A0 and the jge-vs-jns byte-test idiom; zero alias rows, zero deferrals). Session died at the wave-4 dispatch (HTTP 429 usage limit) seconds after the 02:54 stamp+gate left splits staged uncommitted; recovery re-verified the tree fresh from the stager ledger (integrate_log2c: staged 110, skipped 0, failed 0) and finished audit/receipt/commit next morning. Progress 888->998 units linked (978 from source, 37261 bytes, +110 units +4953 B), gate PASS whole-image SHA-1 bb7f9fd5, CI PASS, volume audit 110/110 exact-hash distinct + all splits-referenced, 96 structural families (91 singletons, 5 VC6 clone-family multis proven constants-only by positional image diff). objdiff regen: 3235 units, 998 complete. Receipt docs/notes/2026-11-29-subagent-wave.md (wave 3 + recovery sections). Wave 4 scaffolding ready in scratch/wave_resub; re-dispatch waits for the usage limit and a one-worker probe. 2026-11-29 10:57:49 -05:00
docs SUBAGENT WAVE wave_resub WAVE 3: 110 lands from L5/L6/CB3 - first all-match wave (110 of 110; 50 asm-backed naked fallbacks flagged - the live leaf/call pools shift into the no-C-spelling tier incl. the row-66 float-compare class confirmed at 0x4958A0 and the jge-vs-jns byte-test idiom; zero alias rows, zero deferrals). Session died at the wave-4 dispatch (HTTP 429 usage limit) seconds after the 02:54 stamp+gate left splits staged uncommitted; recovery re-verified the tree fresh from the stager ledger (integrate_log2c: staged 110, skipped 0, failed 0) and finished audit/receipt/commit next morning. Progress 888->998 units linked (978 from source, 37261 bytes, +110 units +4953 B), gate PASS whole-image SHA-1 bb7f9fd5, CI PASS, volume audit 110/110 exact-hash distinct + all splits-referenced, 96 structural families (91 singletons, 5 VC6 clone-family multis proven constants-only by positional image diff). objdiff regen: 3235 units, 998 complete. Receipt docs/notes/2026-11-29-subagent-wave.md (wave 3 + recovery sections). Wave 4 scaffolding ready in scratch/wave_resub; re-dispatch waits for the usage limit and a one-worker probe. 2026-11-29 10:57:49 -05:00
drafts update 2026-11-29 20:34:45 -05:00
hooks PHASE-2/3 SCOPED PASS (GC donor conventions): tools/gc_progress.py — README badges (code matched/linked, units linked, carved) + generated progress table with the CRT slab as the end-state proof region; carve registry config/PCV2/carved.txt gated into zpc ci (must exist as orig + >=60-char evidence + never linked); hooks/pre-commit (core.hooksPath=hooks) running CI on commit; scoped mini-batch through the FULL pipeline (grid -> land -> ci -> objdiff -> gc_progress): fn_415680 (bare ret) / fn_5c5e60 (xor al,al bool) / fn_415690 (ret 8 stdcall, span-at-object-extent discovery: 16 B unit inside a 144 B pad run) — 48 linked units / 3.3 KiB, all gates green 2026-11-18 20:22:26 -05:00
orig/PCV2 AUDIT quick-win pass: README truth (real entry = zpc gate/ci; configure.py declared a planned row in docs/parity.md), Progress section + generated committed docs/progress.md (computed-only rule), Objdiff page pointer + Working on it + Credits; zpc progress 'data pending' lie replaced with computed '7951 data labels mapped; 0 data units linked'; gate_relink toolchain paths env-overridable (ZPC_MSVC6/ZPC_ICL; gate re-run PASS SHA-1=pin); retired dead tools data_classes v1-3 + spike_link to scratch/retired; orig/PCV2/.gitkeep placeholder convention (orig/*/* + !.gitkeep); badges written but displayed nowhere -> README points at the generated table 2026-11-19 12:50:07 -05:00
src SUBAGENT WAVE wave_resub WAVE 3: 110 lands from L5/L6/CB3 - first all-match wave (110 of 110; 50 asm-backed naked fallbacks flagged - the live leaf/call pools shift into the no-C-spelling tier incl. the row-66 float-compare class confirmed at 0x4958A0 and the jge-vs-jns byte-test idiom; zero alias rows, zero deferrals). Session died at the wave-4 dispatch (HTTP 429 usage limit) seconds after the 02:54 stamp+gate left splits staged uncommitted; recovery re-verified the tree fresh from the stager ledger (integrate_log2c: staged 110, skipped 0, failed 0) and finished audit/receipt/commit next morning. Progress 888->998 units linked (978 from source, 37261 bytes, +110 units +4953 B), gate PASS whole-image SHA-1 bb7f9fd5, CI PASS, volume audit 110/110 exact-hash distinct + all splits-referenced, 96 structural families (91 singletons, 5 VC6 clone-family multis proven constants-only by positional image diff). objdiff regen: 3235 units, 998 complete. Receipt docs/notes/2026-11-29-subagent-wave.md (wave 3 + recovery sections). Wave 4 scaffolding ready in scratch/wave_resub; re-dispatch waits for the usage limit and a one-worker probe. 2026-11-29 10:57:49 -05:00
tools TOOL: zpc try obj path becomes per-PID (build/try/try_<pid>.obj) - concurrent worker tries no longer share build/try/try.obj; negative-tested: sequential MATCH preserved and two concurrent same-second tries returned sane per-unit MATCH verdicts 2026-11-29 01:42:37 -05:00
.gitignore AUDIT quick-win pass: README truth (real entry = zpc gate/ci; configure.py declared a planned row in docs/parity.md), Progress section + generated committed docs/progress.md (computed-only rule), Objdiff page pointer + Working on it + Credits; zpc progress 'data pending' lie replaced with computed '7951 data labels mapped; 0 data units linked'; gate_relink toolchain paths env-overridable (ZPC_MSVC6/ZPC_ICL; gate re-run PASS SHA-1=pin); retired dead tools data_classes v1-3 + spike_link to scratch/retired; orig/PCV2/.gitkeep placeholder convention (orig/*/* + !.gitkeep); badges written but displayed nowhere -> README points at the generated table 2026-11-19 12:50:07 -05:00
AGENTS.md AGENTS.md round 2: the always-applicable skill pieces moved to the repo layer - Owner decisions (verbatim), session conduct (plain-language/Go-chained/committed-state-first/workflow-first/current-only rows), and the pure file-pointer table (plan/parity/progress/inventory/registries/CI/baseline/bridge/permuter/censuses); the skill layer keeps only method lore (the tools' classifier/recipe cells) + situational cadence + pointers; sizes: SKILL.md 98741->67599 (-31.1K today), AGENTS.md 3009->9118; reach routing = AGENTS.md canonical, skill reference archived 2026-11-27 16:06:32 -05:00
CONTRIBUTING.md AUDIT written polish: docs/architecture.md (donor headings — The executable/Units/Source layout/Build — digest of the measured PE spec, unit mechanics, registries, gate chain; the session trail stays in docs/notes), CONTRIBUTING.md (donor sections adapted to the zpc workflow: what a change can do incl carve+churn disciplines, recovering-a-function loop, checking a change, rules incl no-hand-assembly + names-on-evidence), tools/doclinks.py (documentlink QA gate: standing docs must resolve / historical notes warn only / explicit PRODUCTS+DONOR+build allowlists; verified README verb list truthful along the way) — 0 standing-missing; T_ renames owner-parked in the ledger; doclink BASES carry the family rule (bare names resolve via tools/, config/PCV2/, docs/) 2026-11-19 13:51:50 -05:00
LICENSE Bootstrap: repo skeleton, orig/ pin (pso.exe V2 retail, SHA-1 bb7f9fd5), GC-convention layout 2026-11-18 11:24:51 -05:00
README.md DONOR RE-SYNC #332 (churn protocol, owner: 'the GC decomp at pso-decomp-master is updated'): snapshot + data_gc_match re-read + bank diff; upstream zeroz41/pso-decomp 49b48c32 'Matchpassz' (47 files), one commit past the 6b080e67 tree the 2026-11-19 re-sync ran against (its symbols.txt carries exactly 1356 __vt__ = the prior receipt baseline; baseline copy kept at C:/Users/Admin/Desktop/psopc-jp/build/gc_symbols_6b080e67.txt); registry 1356->1362 __vt__ (+6: TBoss8DragonColli_C/TLOC_End/TLOC_Start/TUnk_804A7248/TUnk_804A7254/TUnk_804A7260), slot redefs TBoss1DragonColli_C 13->12 + TObjNpcLappy/TObjNpcMoja 93->92; our bank churn = exactly those 3 rows (TBoss1DragonColli_C multi 35->13 cands; Lappy/Moja multi->mismatch 0 cands), all direct-pinned proven, tiers UNCHANGED 623/14/226, intersections 623 unchanged; donor_transfer regen idempotent (sha1-stable 15ca04150a13 across census+transfer reruns); stray-vt-write NOTE check RELOCATED to judge the FINAL post-pins+assoc pc_vt state (first census rerun since PIN-CREATED rows feed rec['classes']; 25 rows false-fired from the pre-pin placement, now 0, negative-tested alarm); ci PASS incl. whole-image gate; levers +1; receipt doc docs/notes/2026-11-20-donor-resync.md 2026-11-20 17:29:37 -05:00

Phantasy Star Online (PC, Japanese)

A work-in-progress matching decompilation of Phantasy Star Online for PC, Japanese V2 retail final (Episode 1 only; no EP2, no EP4): C and C++ source that compiles to the same code as the game's executable, function for function, in its original translation units.

Nothing from the game is included here. You need your own copy of the game to build it; see Legal.

Progress

Measured on pso.exe at the latest commit; a function is matched when it compiles to the original's exact bytes, and code/data are linked when the build takes them from compiled source instead of the original. Counts are computed, never hand-written:

  • Progress table — generated by python tools/gc_progress.py (regenerate it whenever the build state changes; never edit by hand).
  • Badge endpoint JSONs (donor shape, ready for hosted badges) are written to build/badges/*.json by the same tool; they wire to hosted images when the project gains a remote (see docs/parity.md, Decisions).

Target

Game Phantasy Star Online, PC (Windows), Japanese, V2 retail final
Executable pso.exe, SHA-1 bb7f9fd59e8cb729f086fc3c2c431b9537d29e39
Built 2003-02-06; Intel C++ 5.0 b001120 (library units) + Visual C++ 6 (game units), linked with VC6 link.exe
Sections .text 0x40e000, .rdata 0x64c000, .data 0x676000, .data1 0x7bf000

The executable ships without symbols. The repo carries the recovered registries it needs: the function inventory (config/PCV2/symbols.txt, from a fresh analysis of the target), the verified data-label inventory (config/PCV2/data_symbols.txt), and the embedded compiler records that name the original build units. Names are recovered from the binary's own class-name registry, embedded compiler records, sibling decompilations of the same engine, and code reading. Functions without evidence keep a placeholder such as fn_0040E013.

Building

Requires Python 3.10+ and user-supplied compiler kits: a Visual C++ 6 toolchain (Enterprise RTM cl/link), an Intel icl 5.0.1 kit, and the DirectX 8.0 SDK import libraries for the relink. The kit locations are resolved by tools/gate_relink.py — override them with the ZPC_MSVC6 and ZPC_ICL environment variables. (Run python tools/configure.py first: it verifies the kits and writes hash receipts into build/; --fetch stages them into gitignored build/tools/. The template's one-command ninja wiring stays deferred by owner decision — docs/parity.md, Decisions.) Put your pso.exe in orig/PCV2/, then:

python tools/zpc.py gate        # relink whole image, byte-compare vs the pin
python tools/zpc.py ci check    # regression gate (linked units, splits, carve registry)

The gate compiles every source-linked unit, relinks pso.exe from those objects plus the original objects for everything not matched yet, and checks the assembled image against the pinned SHA-1. Code that is not decompiled yet still comes from the original, so a passing build does not mean the decompilation is complete.

The working CLI is python tools/zpc.py <verb> — brief, lookup, try, probe, compiled, misses, twins, check, grid, land, progress, gate, ci drive the whole match workflow; run python tools/zpc.py brief for orientation.

Objdiff and the progress page

The per-unit diff view uses objdiff:

  1. python tools/zpc.py gate — produce the per-unit objects.
  2. python tools/objdiff_config.py — emit objdiff.json at the root (gitignored) plus the original-bytes target objects for linked units.
  3. build/objdiff-cli.exe report generate -p . -o build/progress.json — the per-unit report.
  4. python tools/gc_progress.py — badges + docs/progress.md.

Working on it

  • Data-milestone tail: descriptor record shapes for the registered clusters; class-name transfer onto the vtable scaffold.
  • The icl library tail (real stamped paths held): unit-boundary partition and the icl 5.0→5.0.1 substitution problem — the surviving kit cannot reproduce the target's 5.0 codegen in the measured classes; the choice between substitution work and evidence-carving is an owner decision.
  • Cross-build name transfer from the GameCube donor (the 623-name class intersection already banked in config/PCV2/gc_class_match.json).
  • Match grind cadence: batches from the ranked zpc misses list, parked by owner direction.

Credits

  • pso-decomp-master (GameCube, Episode I & II Plus) — format, standards and house template; the donor this repo shapes itself after.
  • psopct-decomp (PC, V2 demo) — x86 match/build machinery concepts, compiler-identification lore, and the provenance of both staged compiler kits.
  • objdiff — the per-function diff UI.
  • zkit — the CLI verb conventions zpc mirrors.

This repository contains no game assets, no game files, no compiler binaries and no code copied from the game. Every line of game source in src/ was written by hand to compile into the same machine code as the original; the CRT units link the Visual C++ 6 runtime source that ships with the (user-supplied) toolchain, and are never game code. Everything else the build needs comes from your own legally obtained copies, on your machine, when you build.

Phantasy Star Online is a trademark of SEGA. This project is not affiliated with or endorsed by SEGA.

License

MIT