Skip to content

feat(tools): build a bind folder from a mod with p3p-cpk bind - #88

Merged
github-actions[bot] merged 1 commit into
masterfrom
feat/cpk-bind
Nov 6, 2026
Merged

github-actions[bot] merged 1 commit into
masterfrom
feat/cpk-bind

Conversation

@endercodezz

Copy link
Copy Markdown
Owner

What changed

p3p-cpk bind <out dir> <mod> <base...> makes a mod usable without Aemulus. It writes a bind/ folder with the changed files and rebuilds the game's containers around the mod's files, nested containers too. A file it can't place is listed as unresolved, and the exit code is 1.

tools/cpk/src/pak.zig reads and rebuilds the game's two PAK layouts.

Verification

  • Round trip: 185 of 185 real game containers rebuild byte for byte when a file's own data is put back.
  • Russian translation v0.8.3: 1,369 changed files, 183 containers, 266 of 336 in-container files placed.
  • PC runner with that folder and new_game.txt, stopped at vblank 9600: the game reads bind/data/init.bin, init_free.bin and title/sex_select.bin, and the first dialogue is in Russian, in Cyrillic. No runtime change, original EBOOT.
  • python tools/cpk/check.py: 37/37 CLI tests, including non-zero padding, containers with the same name, and 150 damaged containers.

Not verified

  • [UNVERIFIED] .spr: 70 .tmx files (interface graphics) stay unresolved.
  • [UNVERIFIED] Menus with the patched EBOOT, and anything past the first dialogue.
  • [UNVERIFIED] The New 3DS: not run.

Closes #87
Refs #23

Most of a translation lies inside the game's containers, which only
Aemulus could rebuild. bind writes a bind/ folder with the changed files
and the containers, nested ones too, with the mod's files put in. A file
it can't place is listed as unresolved.

Verified: 185 of 185 real containers rebuild byte for byte. The Russian
translation v0.8.3 places 266 of 336 files (the rest is .tmx inside .spr),
and its first dialogue shows in Russian on the PC runner.
tools/cpk/check.py: 37/37 CLI tests.
@github-actions
github-actions Bot enabled auto-merge November 6, 2026 15:31
@github-actions
github-actions Bot merged commit d20c23b into master Nov 6, 2026
9 checks passed
@endercodezz
endercodezz deleted the feat/cpk-bind branch November 6, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tools: p3p-cpk bind, build a bind folder from a mod

1 participant