(WIP) BIN Repacker - Prince of Persia (SoT/WW/T2T) gamedata research tool, looking for help

Discussions about all other tools (CusPop, SAV/HOF editors) and hex editing.
Post Reply
BlackDaemon
Efendi
Efendi
Posts: 8
Joined: May 22nd, 2018, 2:48 pm

(WIP) BIN Repacker - Prince of Persia (SoT/WW/T2T) gamedata research tool, looking for help

Post by BlackDaemon »

Mine first attempts with .bin format tool :)

Current functionality is very primitive, atm it's more, like small add-on for format researching purposes :P
- .bin files reading (compressed and uncompressed);
- unpacking files from .bin;
- packing unpacked files back to .bin (simple copying);
- reading and unpacking textures (PC version);
- partial packing textures (PC version, except 8bit + palette format);
- binary per-byte searching inside file for IDs of other files, and current file ID in another files
- external config (override.txt) for additional files description, and, in case if needed to set file type manually.
Spoiler: show
Image
From obvious things in my todo-list for now is to figure out packing 8bit + palette textures, figure out 3D objects format, how PersianRug works with them, and figure out this.
Attachments
bin_repacker_2018_05_29_0806.rar
(116.22 KiB) Downloaded 726 times
Falcury
Calif
Calif
Posts: 565
Joined: June 25th, 2009, 10:01 pm

Re: (WIP) BIN Repacker - Prince of Persia (SoT/WW/T2T) gamedata research tool, looking for help

Post by Falcury »

Wow, you're making such incredible progress on this.
Very cool to be able to see the texture files.

Any chance of a command-line version of your packing/unpacking tools? Might be useful for automating the process using scripts (instead of needing to individually select input files and output folders within the program).

By the way, what techniques are you using to reverse engineer this?
Are you deducing patterns from the files themselves? Or maybe you are using a debugger or disassembler to find the places in the code where the files get loaded?
BlackDaemon
Efendi
Efendi
Posts: 8
Joined: May 22nd, 2018, 2:48 pm

Re: (WIP) BIN Repacker - Prince of Persia (SoT/WW/T2T) gamedata research tool, looking for help

Post by BlackDaemon »

Falcury, nothing major here yet, unfortunately :roll:

I'll take a look, because need to learn, how console tool accept/working with arguments :lol:

Simple per-byte comparison and hex-editor. Unfortunately, debugger things is beyond for my current skills :? Actually, i begun researching a few years ago, like attemps to mod weapon/monster params, swap model/textures (article in Russian). Also, PS2/PSP version using similar resources format in WW/T2T games, PC version has more differences. Another thing was original files size "wall", fortunately i choose right time for revisit attempt, and it's no longer an issue :P
Spoiler: show


BlackDaemon
Efendi
Efendi
Posts: 8
Joined: May 22nd, 2018, 2:48 pm

Re: (WIP) BIN Repacker - Prince of Persia (SoT/WW/T2T) gamedata research tool, looking for help

Post by BlackDaemon »

Initial command-line port :P

Code: Select all

Extract BIN: -e <bin_file> <extracted_files_folder>
Decode textures: -d <bin_file> <textures_folder>
Encode textures: -c <bin_file> <textures_folder>
Build BIN: -b <bin_file> <extracted_files_folder> <new_bin_file>
Attachments
bin_repacker_cli_2018_06_25_1227.rar
BIN Repacker, command-line version
(95.16 KiB) Downloaded 349 times
Dastan
Scholar Scribe
Scholar Scribe
Posts: 2
Joined: December 31st, 2019, 1:08 pm

Re: (WIP) BIN Repacker - Prince of Persia (SoT/WW/T2T) gamedata research tool, looking for help

Post by Dastan »

Hi! I know I'm a little too late regarding pop modding :lol:
I'm trying to edit some texture in pop ww, but after editing .tga file with photoshop I can't put the changes back into the .bin file
I don't understand the "- packing unpacked files back to .bin (simple copying);" part, can you explain it?
Thanks!
Post Reply