XAYRGA / jampacked

BAA unpacker for JSystem games
MIT License
3 stars 0 forks source link

BAA unpack function generates `.bnk` files larger than expected #1

Open cristian64 opened 5 months ago

cristian64 commented 5 months ago

The 8 extra bytes that are added to the size do not appear to be correct:

https://github.com/XAYRGA/jampacked/blob/d90190824c82c9027a32070407530f463e8b2fa4/jampackednf/unpack_baa.cs#L22

The issue was observed in GCKart.baa, where some of the resulting .bnk files include 8 extra bytes that are part of the subsequent .wsy files.

For example, 6.bnk ends with:

57 53 59 53 00 00 02 30        WSYS...0

...which happens to be the start of 2.wsy.

cristian64 commented 5 months ago

Similarly, I sense the 8 extra bytes that are added to the size for WSYS are not correct either:

https://github.com/XAYRGA/jampacked/blob/d90190824c82c9027a32070407530f463e8b2fa4/jampackednf/unpack_baa.cs#L26