Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 3:25 pm
All times are UTC + 0
Error opening unknown Sole Survivor shp
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Mon Mar 30, 2015 7:54 pm    Post subject:  Error opening unknown Sole Survivor shp Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Mar 31, 2015 11:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Out of interest, is there some place to get that files from?
edit: Ignore me.

_________________

Back to top
View user's profile Send private message
dube.g
Vehicle Driver


Joined: 12 Feb 2015

PostPosted: Thu Apr 02, 2015 2:27 am    Post subject: Reply with quote  Mark this post and the followings unread

@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).

Back to top
View user's profile Send private message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Thu Apr 02, 2015 9:30 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Edit:
I've attached one of the files.



623E17FC.shp
 Description:
unknown shp file

Download
 Filename:  623E17FC.shp
 Filesize:  218.87 KB
 Downloaded:  18 Time(s)


Back to top
View user's profile Send private message
dube.g
Vehicle Driver


Joined: 12 Feb 2015

PostPosted: Fri Apr 03, 2015 10:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

Weird, I've tried it with my viewer and it opened fine. I'll see what is wrong with OSSB's impl.

pic for proof:
http://i.imgur.com/zBT7qw5.png

EDIT: just noticed the insane values in the filesize and zero fields. i guess my program is interpreting them wrong, hm

Back to top
View user's profile Send private message
dube.g
Vehicle Driver


Joined: 12 Feb 2015

PostPosted: Mon Apr 06, 2015 12:53 am    Post subject: Reply with quote  Mark this post and the followings unread

err, so

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.

Back to top
View user's profile Send private message
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Mon Apr 06, 2015 4:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Tue Apr 07, 2015 3:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

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."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Tue Apr 07, 2015 3:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

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...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
dube.g
Vehicle Driver


Joined: 12 Feb 2015

PostPosted: Tue Apr 07, 2015 5:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

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..

pic for proof: http://i.imgur.com/UIqY2qZ.png

For Banshee, to try:
File: SHP_RA_File.pas
FuncName: HuntMyOffset
Todo: change "const Offset: word;" to "const Offset: longword;"

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Apr 08, 2015 6:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks a lot. It has been applied at revision 84.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1710s ][ Queries: 13 (0.0086s) ][ Debug on ]