Game crashes if data files are different sizes than the original
Closed this issue · 4 comments
When modifying the script CPK, if the CPK is larger or smaller than the original CPK, the game will refuse to progress when starting a new game.
Potentially a show-stopper, as some translations take up more space than the original Japanese text.
Will look into what's causing this.
Still poking around with the debugger.
Initial investigation hasn't yielded much. Problem seems to be with how the binary processes ITOC tables and not with how the CPKs are packed.
EDIT: incorrect speculation
Not much progress. Seems to be a limitation of the engine rather than a bug that can be fixed with a one-byte patch.
I'll keep at it some more, but I'm kinda stumped.
If anyone has experience with any of the following:
- MIPS reverse engineering
- hacking around PSP games
- CRIware subsystems for the PSP
- the CriPak (.cpk) format
- the game engine used by Kadokawa Games
I would appreciate any help! Please comment for any questions.
Resources:
- https://gbatemp.net/threads/baka-test-portable-english-translation-project.370054/
- where most of my information about Uchuujin's internals come from
- project members do not seem to be active anymore
Possible solution: using one byte per character (ASCII) instead of the original two byte encoding scheme (Shift-JIS), thereby halving the size of the translations.
This would still require a custom assembly routine, but it is certainly easier than reverse engineering a substantial portion of CRIWare's file routines. Will work on this.
I'm happy to report that the routine has been implemented and works very well! I'm now seeing space reductions of translated script files compared to their originals. I'll close the issue once I commit the newly-updated patching script.