GameZelda2 wrote:tma wrote:My guess is that your newly created HED/WAD files aren't working because these .dbg files need to be updated with new checksums.
Mmm, what do you mean? I'm building the HED/WAD again with the same files, so there shouldn't be any checksum change.
I've also tried to match those checksums with the CRC32 of the files and they doesn't coincid ???
EDIT: Also, I don't know Perl (I can understand some things, but not too much). But what does mean the "0x559566CC" magic? I see that the 2 magics on the top of it are the File entry/End of table DWORDS, but I don't know what this magic means
I thought you said you were modifying some files in the WAD earlier, before you said you were going to retry with the original files? If you're not changing files then I'm not really sure why it wouldn't work. I just spotted the checksum parts and thought that might be related. I've no idea how they're calculated, I haven't looked into it at all.
I found the 0x559566CC magic number in the file "dbg.pak.ps2" inside the "pak" sub-directory of the WAD.
One oddity I have found is that some of the .pak file headers are missing the first letter of the filename. The "dbg.pak.ps2" is a good example, the filenames look like they should be things like "zones", "songs", "scripts" etc, but they are in fact "ones", "ongs", "cripts". It's not a bug in my script, the filenames are actually stored that way and I couldn't see where the first character might be (I'm open to any suggestions).
For example:
Code: Select all
00000000 cc 66 95 55 b0 26 02 00 7d 00 00 00 be 86 bf dc |?f.U?&..}...?.??|
00000010 00 00 00 00 f8 17 f6 d6 00 00 00 00 20 00 00 00 |....?.??.... ...|
00000020 6f 6e 65 73 5c 7a 5f 77 6f 72 6c 64 5c 7a 5f 77 |ones\z_world\z_w|
00000030 6f 72 6c 64 5f 73 63 72 69 70 74 73 5f 70 61 6b |orld_scripts_pak|
00000040 2e 64 62 67 00 00 00 00 00 00 00 00 00 00 00 00 |.dbg............|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
There you can see the magic number I referred to (little endian of course), then the filename starts at 0x20.
As I was looking further through that file just now - perhaps the "Checksums" are actually magic numbers? In fact:
dbg/cripts/guitar/songlist.dbg:
[LineNumbers]
get_song_original_artist 6 (28,1859) (55,1860) (84,1861) (86,1862) (87,1864) (136,1865)
get_song_title 6 (28,1868) (55,1869) (84,1870) (86,1871) (87,1873) (136,1874)
get_song_prefix 6 (28,1877) (55,1878) (84,1879) (86,1880) (87,1882) (136,1883)
get_song_artist 10 (44,1886) (71,1887) (83,1888) (136,1889) (140,1890) (169,1891) (171,1892) (173,1893) (174,1895) (224,1896)
get_song_artist_text 6 (28,1899) (55,1900) (84,1901) (86,1902) (87,1904) (136,1905)
get_song_struct 6 (28,1908) (55,1909) (78,1910) (80,1911) (81,1913) (132,1914)
get_songlist_size 8 (0,1917) (36,1918) (51,1919) (104,1920) (140,1921) (162,1922) (164,1923) (178,1925)
get_songlist_checksum 7 (0,1928) (36,1929) (55,1930) (79,1931) (83,1932) (116,1933) (118,1934)
is_song_downloaded 12 (28,1937) (57,1939) (120,1940) (132,1941) (150,1942) (196,1943) (200,1944) (248,1945) (250,1946) (254,1947) (300,1948) (302,1949)
[Checksums]
0x54e72043 themetal
0x21902065 checksum
0x700c4085 lagrange
0x523e20a4 download_songlist
0x614910ae paintitblack
0x46a640ce startup_Script
0xddebc0ce mynameisjonas
0x6a9010dd imintheband
[..]
That checksum number corresponds with the filenames of the .imf!