sebdel / mra-tools-c

39 stars 13 forks source link

Bug: wrong offset assigned stops file from being processed #92

Open jotego opened 3 years ago

jotego commented 3 years ago

When trying to parse the attached MRA file I get the following error:

warning: offset set past the part size. Skipping part.
warning: offset set past the part size. Skipping part.

which seems to refer to parts sfz.01 and sfz.02 as I modified the code to print out the part names. It looks like if I insert the parts into an interleave section, the error goes away. So this might be some leftover data from a previous interleave affecting the program.

Anyway, there is no offset nor length for those two files as they are simply part files. The zip file for the game can be found here. This is a kind of homebrew version of a game, actually. The qsound.zip file is part of common MAME rom sets.

Could you have a look at this error, please?

Street Fighter Zero CPS 1.5.mra.zip

jotego commented 3 years ago

This seems to be related to a problem parsing the zip file. For some reason, the table of contents seems to be read as 0 for size and CRC of all elements. Unzipping the file and re-zipping it using the Linux command tool fixes it.

Still, there is a flaw in the MRA tool's zip parsing procedure.

sebdel commented 3 years ago

Sorry, I've been off for a while. I'll look into it but if I remember correctly I wanted to avoid external deps as much as possible so our zip parser is embedded and rather limited.

sebdel commented 3 years ago

Sorry, could you reattach the offending zip ? I can only find qsound.bin.