:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Thu Oct 18, 2018 3:38 pm
All times are UTC + 0
 Forum index » Featured Tools » OS SHP Builder » Bug Reporting
Error opening unknown Sole Survivor shp
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [11 Posts] 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

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

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

@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

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:  11 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

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

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

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
Commander


Joined: 14 Sep 2006
Location: Constant Flux

PostPosted: Tue Apr 07, 2015 3:32 pm    Post subject: Reply with quote

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."
Lin Kuei Ominae wrote:
wrong forum. this is not minecraft.


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


Joined: 22 Nov 2010
Location: Iszkaszentgyörgy, Hungary

PostPosted: Tue Apr 07, 2015 3:34 pm    Post subject: Reply with quote

SHP Builder uses the XCC algorithm of opening SHP files IIRC so no surprises there. Noidea what Katz used tho.
_________________



AS Discord server: https://discord.gg/7aM7Hm2

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

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


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Apr 08, 2015 6:54 pm    Post subject: Reply with quote

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] View previous topic :: View next topic
 Forum index » Featured Tools » OS SHP Builder » Bug Reporting
Jump to:  
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 one of the following words: 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

Wildcard SSL Certificates
[ Time: 0.1211s ][ Queries: 13 (0.0058s) ][ Debug on ]