Posted: Mon Mar 30, 2015 7:54 pm Post subject:
Error opening unknown Sole Survivor shp
I'm trying to determine the filenames for a few unknowns that remain in the sole survivor mix files and I've found two shp files that XCC thinks are unknown files and that OS Shp Builder encounters an error decoding. The two files are in sole.mix and have ID's 623E17FC and B7623E17. The files are actually identical and I'm fairly confident are TD style .shp files given the header structure. The error message indicates the fault occurs decoding a format40 frame.
Edit:
I had a quick look through the source and it looks like the code allocates width*height to buffer the encoded data, but worst case for format40 is larger than the destination image for highly varying data and so could be larger than this (and for this file may well be). I suspect the unknown field C is actually the max buffer size required to hold an encoded frame as a similar field exists in the wsa format for much the same reason. QUICK_EDIT
@Blade
I dont have the mix from that game. Can you tell me where I can find it? or can you just upload those 2 files?
EDIT: also, to be clear, are you referring to the Delta field in .wsa format, or to another field?
Funny that you pointed it out, and to now compare .wsa to shp(td), because it would make sense that all the unknown fields in shp(td) are in fact the known ones from .wsa as their header would be almost exactly the same, with the exception that frame headers contain only one offset in wsa and 2 in shp(td). QUICK_EDIT
I'll upload one of the files when I get chance later this afternoon, they are both the same so either should be fine.
Yeah, I'm referring to Delta, the dword that starts at 0x0A in the WSA header. It's the maximum buffer size needed to hold an XORDelta for a frame (otherwise called format40). shp(td) is pretty much a version of wsa that uses LCW compressed key frames to better support random access from what I can tell.
Where it is supposed to be all zeros, we find the filesize, and where it is supposed to be the filesize, we find a reference to a frame which supposedly contains the diffs between the first and last frames. Which, by the documentation, is a characteristic of .wsa files. So that is that.
But I didnt find what the error is in OSSB's impl, and tbh debugging it is hell so I'd rather replace this impl with my own, but is it even worth it? If you have other shps(td) that result in errors when opening, pls tell me. Otherwise, ... well, for now, I'll just stop working on this until further news. QUICK_EDIT
If I come across any more I'll let you know, the screenshot you provided allowed me to determine the file names (sradar.shp and hsradar.shp for the record), which is the only information I was interested in for now. QUICK_EDIT
Using 2 other tools (XCC and Katz's) also brings the conclusion of a damaged frame, kinda interested in how your program is decoding it ok compared to the rest.
Figured I'd contribute that data is all. _________________ "Don't beg for things; Do it yourself or you'll never get anything." QUICK_EDIT
Joined: 22 Nov 2010 Location: Iszkaszentgyorgy, Hungary
Posted: Tue Apr 07, 2015 3:34 pm Post subject:
SHP Builder uses the XCC algorithm of opening SHP files IIRC so no surprises there. Noidea what Katz used tho. _________________ "If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more... QUICK_EDIT
Curiosity killed me so I still went for it this morning and it turns out the bug in OSSB has to do with passing a longword as a word parameter in the function HuntMyOffset(...). It was afterall an easy bug to find, my bad :v I was debugging at like 0-15FPS in a vm so I took shortcuts thinking the bug was elsewhere but that bit me in the end..
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum