God of War 2 Structure of GODOFWAR.TOC File
Hi guys, I am writing a small tool in C to allow dump and repack the files inside the
PART1.PAK and PART2.PAK archive from the God of War 2 (PS2). My tool is able to dump
properly the files inside the PART1.PAK, but the PART2.PAK I don't know how to get
the proper offset to reach the file inside the PART2.PAK.
Below is some infos about the GODOFWAR.TOC and too the link with the sample of PART1.PAK
and PART2.PAK. If someone can help me, I'll be grateful.
Link with the samples: https://drive.google.com/file/d/1KpD52N ... sp=sharing
Some infos about the GODOFWAR.TOC format:
The GODOFWAR.TOC file has the infos as offsets, filesize, id_archive and filenames
of all files inside the PART1.PAK and PART2.PAK archive.
These infos about the GODOFWAR.TOC file I've understood thanks the bms script made by
There is only two PAK archives named PART1.PAK and PART2.PAK inside the original game iso.
The PART2.PAK is stored in the second layer of iso. The second layer I can extract it
using the Apache software.
The structure of GODOFWAR.TOC is the following:
STRUCTURE WITH THE FILENAME, FILESIZE, ID_PART AND ID_OFFSET (0x24 bytes)
0x00 - FILES COUNT long
0x04 - Filename string (the string length is always 0x18 bytes filled with 0x00)
0x1C - Filesize long
0x20 - id_archive long - if the bytes in this field are 0x00, 0x01, 0x02, 0x03,
0x04, the file is stored in PART1.PAK. If the bytes are greater than 0x04, the file is
stored in the PART2.PAK.
0x24 - offset_id long (offset_id * 4 + 32872) - The value in this field points to the
GODOFWAR.TOC offset where are 4 bytes long that multiplied by 0x800 generate the offset
to the file in the PART1.PAK or in the PART2.PAK archive. To the files stored in the
PART2.PAK, not is possible to get the proper offset using 0x800. This is the only
info that I need to know to finish my C code to dump and rebuild the PART1.PAK and