Oh, well, okay.
The following is what dgendreau from Scorehero wrote me about that topic. I don't know if that helps you / how much you can follow, but if you are able to use a hex editor, you could at least follow this special instructions:
"I extracted the file "anarchyintheuk.pak.ps2" from datap.wad using a hex editor.
Starting at offset 0x0015098000, I extracted 0x2FBC0 bytes to a separate file."
If you could manage to send me that file (it will be < 200 kB this time

), that would be great!
So here's dgendreau text:
"Notes on disc:
Code: Select all
SECTOR_SIZE = 0x800
// we find the WAD sub-file descriptor for "\songs\anarchyintheuk.pak.ps2"
in datap.hed:
0000061AC0 30 A1 02 00 // STARTING_SECTOR in wad file: 0x02a130 * SECTOR_SIZE == 0x15098000
0000061AC4 C0 FB 02 00 // SIZE(bytes) (end offset=0x150C7BC0
0000061AC8 "\songs\anarchyintheuk.pak.ps2" // pad out to nearest DWORD with 0s
in datap.wad
// anarchyintheuk.pak.ps2 file starts here
0015098000 5E E8 C1 4B B0 01 00 00 A4 F9 02 00 12 E3 66 F5 00 00 00 00 FF 21 6A A8 00 00 00 00 20 00 00 00
0015098020 "data/songs/anarchyintheuk.mid.qb.ps2"
...
00150980C0 5E E8 C1 4B A0 FA 02 00 48 00 00 00 D4 1B 18 A2 00 00 00 00 92 3D D4 33 00 00 00 00 20 00 00 00
00150980E0 "data/songs/anarchyintheuk_song_scripts.qb.ps2"
To make things simpler, I extracted the file "anarchyintheuk.pak.ps2" from datap.wad using a hex editor.
Starting at offset 0x0015098000, I extracted 0x2FBC0 bytes to a separate file:
The sub-file descriptor table at the start looks like this:
Code: Select all
anarchyintheuk.pak
  SUBFILE_DESCRIPTOR
0000000000 5E E8 C1 4B // ???? weird magic number
0000000004 B0 01 00 00 // SUBFILE_START_OFFSET,
0000000008 A4 F9 02 00 // SUBFILE_SIZE (190kb sounds ok for a midi)
000000000C 12 E3 66 F5 // unknown
0000000010 00 00 00 00
0000000014 FF 21 6A A8 // filename for "anarchyintheuk" song file is "A86A21FF.IMF"!!!
0000000018 00 00 00 00
000000001C 20 00 00 00
0000000020 "data/songs/anarchyintheuk.mid.qb.ps2"
  SUBFILE_DESCRIPTOR
00000000C0 5E E8 C1 4B // ???? weird magic number
00000000C4 A0 FA 02 00 // SUBFILE_START_OFFSET, (0x2FAA0+0xC0 = 0x2FB60)
00000000C8 48 00 00 00 // SUBFILE_SIZE (72 bytes)
00000000CC D4 1B 18 A2 // unknown
00000000D0 00 00 00 00
00000000D4 92 3D D4 33 // unknown
00000000D8 00 00 00 00
00000000DC 20 00 00 00
00000000E0 "data/songs/anarchyintheuk_song_scripts.qb.ps2"
  SUBFILE_DESCRIPTOR
0000000180 5F 56 24 B5 // ????end of sub-file descriptor table magic number
0000000184 30 FA 02 00 // seems to offset to an empty sub-file at the end of the pak file
0000000188 04 00 00 00
000000018C 00 00 00 00
0000000190 00 00 00 00
0000000194 00 00 00 00
0000000198 00 00 00 00
000000019C 00 00 00 00
00000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I havent nailed down how the SUBFILE_START_OFFSET works exactly, but I believe you have to add the start of each sub-file descriptor with its SUBFILE_START_OFFSET.
This yields the following partial dump of each sub-file
Code: Select all
  somewhere near sub-file "anarchyintheuk.mid.qb.ps2"
00000001B0 00 00 00 00
00000001B4 A4 F9 02 00 // same value as SUBFILE_SIZE in table above
00000001B8 1C 08 02 04 10 04 08 0C
00000001C0 0C 08 02 04 14 02 04 0C 10 10 0C 00 00 04 0C 00
00000001D0 DF BA 39 D4 80 30 6B 69 30 00 00 00 00 00 00 00
00000001E0 00 01 00 00 00 00 00 00 00 00 00 00 00 04 0C 00
00000001F0 87 E5 45 D5 80 30 6B 69 50 00 00 00 00 00 00 00
...
  somewhere near sub-file "anarchyintheuk_song_scripts.qb.ps2"
000002FB60 00 00 00 00
000002FB64 48 00 00 00 // same value as SUBFILE_SIZE in table above
000002FB68 1C 08 02 04 10 04 08 0C
000002FB70 0C 08 02 04 14 02 04 0C 10 10 0C 00 00 04 07 00
000002FB80 5A FA 44 0A D4 1B 18 A2 30 00 00 00 00 00 00 00
000002FB90 0B F7 19 01 09 00 00 00 09 00 00 00 01 16 3B 4D
000002FBA0 0B AD 2C 01 24 00 00 00 00 00 00 00 00 00 00 00
000002FBB0 AB AB AB AB 00 00 00 00 00 00 00 00 00 00 00 00
Notice how each sub file seems to start with the same header of some sort:
00 00 00 00 (DWORD)sf_size 1C 08 02 04 10 04 08 0C 0C 08 02 04 14 02 04 0C 10 10 0C 00 00 04
Then they start to deviate.
...
The reason you are seeing repeating useless junk in the pak files is because they were not extracted correctly.
The sizes seem all wrong and the contents are not the same as the pak files that I have extracted by hand with a hex editor.
Most likely, the extractor utility is not interpreting the hed file format correctly.
Each record in the hed file is formatted as follows:
NOTE: integer format is little-endian
Code: Select all
DWORD file_start_sector // sub-file start offset into WAD file, in SECTORS
DWORD file_size // size of sub-file in BYTES
char[] pathname // null terminated string for pathname
BYTE[] padding // pad record out to next DWORD boundary with 0s
Most likely, the extraction utility is interpreting the first field as an offset in bytes instead of Sectors (0x800 bytes per sector). This would explain the repetition and overlaps.
Another gotcha could be the padding after each string in the hed file.
Finally, when I wrote VGSPlayer, I ran into several DVDROM drives that did not read UDF format discs larger than 2GB in size correctly.
I fixed this by reading the raw disc sectors and parsing the UDF disc format directly."