njankowski / dftools

Tools for Star Wars: Dark Forces assets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GMD Issue

Karjala22 opened this issue · comments

Hi Nicholas,

I found a GMD that seems to have an empty ending payload. It's able to extract one track, but it is hitting spurious additional tracks (endian corruption?).

At Offset 38477 it's picking up 0306EF91 and then 00FF2F00

image

In this case it gets to 38477 and tries to extract 4 and then 4 bytes for the header and chunk size and then explodes as it tries to read nonexistent data.

image

FIGHT-01.zip

I am not sure if the GMD is corrupt, perhaps we should throw a warning if it can't extract additional tracks after extracting the main one?

Thanks!
Karjala

The gmd.size field is equal to the entire size of the file.

It should be equal to (size of file - 8), because gmd.size should not include the first eight bytes of header data in its sum.

Should be resolved by:
7c82268

Thank you, that fixed it!

Also I got LFD archiving to work, currently working on DELTs. https://paste.ubuntu.com/p/hr5BKFN8bZ/ (Updated 2/21/2021)

Come visit us in DF-21's discord and I will shoot you updates quicker =)

Thank you again for all your help!

No problem Karjala!

Thanks for the report.

I got LFD archiving to work

It's looking really clean!

I'll probably add similar functionality soon, and I'm working on reducing the tool count.

For the issue, closing as resolved in the meantime.