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 Fri Nov 08, 2024 4:34 am
All times are UTC + 0
[User Info] Solutions for corrupted SHP (TS) files.
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Banshee
Supreme Banshee


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

PostPosted: Sat Mar 05, 2005 6:03 am    Post subject:  [User Info] Solutions for corrupted SHP (TS) files. Reply with quote  Mark this post and the followings unread

Dealing with SHP (TS) problems with OS SHP Builder


This tutorial was made to teach people how to deal when you have problems to open SHP (TS) files. Due to all the story behind the development of the compression 3 support for this program, several features were made to bypass the dificulties and rescue missing data. The problem is that these features were never properly documented.


Loading Corrupted SHP (TS) files:


Unfortunatelly, some versions (3.x prior to 3.23) corrupted files that had blank frames. In order to get over it,  go to Options -> Preferences. Inside Preferences, go to the Loading & Saving section and set BS SHP Builder Offset Way, which is the way that BS SHP Builder 2.x and 1.x decoded SHP (TS) images. In this way, all SHP (TS) files will be loaded, although the corrupted ones might have problematic frames. Although this method reads all files, it may have problems in a stupid situation: when a frame that uses compression 3 would be smaller if used compression 1. In this rare (and wrong) case, the frame would appear incomplete (lower pixels would be corrupted).


Saving with safety:


If your version of OS SHP Builder is saving corrupted SHP (TS) files, proceed in the following way: Options -> Preferences. Inside Preferences, go to Loading & Saving. Set Compression 1 Only. This will make OS SHP Builder save your file like BS SHP Builder 2.x and 1.x used to do. The file will always work in game and on tools like XCC Mixer, FinalSun, among others. However, the file size will be a bit bigger than SHPs saved with XCC Mixer. There is also a "Compression 3 Only" option, however, we do not recommend it, as it can generate frames that can be wrongly viewed by the BS SHP Builder Offset Way and most of the bugs when saving files lies exactly on compression 3.


Reporting a File Corrupted by OS SHP Builder: Openlog.txt


If OS SHP Builder saved a corrupted file, you can find out what is wrong in your file by using a cool feature added in 3.21: Openlog.txt. In order to make the program generate an Openlog.txt when you load a file, proceed in the following way: Go to Options -> Preferences. Inside Preferences, go to Loading & Saving and set OS SHP Builder Offset Way With Log. Now load your corrupted file and you will certainly receive an access violation or similar message. Don't worry. Leave the program and read the  newly generated openlog.txt.

The openlog.txt has some information on non-blank frames of your file. Here's a sample:


Quote:
Starting frame 1 out of 238

Current Offset: 5720
Compression: 1
Image Size: 360
True Size: 360

Starting frame 2 out of 238

Current Offset: 6080
Compression: 3
Image Size: 384
True Size: 418

Starting frame 3 out of 238

Current Offset: 6464
Compression: 3
Image Size: 488
True Size: 609

Starting frame 4 out of 238

Current Offset: 6952
Compression: 3
Image Size: 432
True Size: 506

Starting frame 5 out of 238

Current Offset: 7384
Compression: 1
Image Size: 322
True Size: 322

Starting frame 6 out of 238

Current Offset: 7712
Compression: 3
Image Size: 448
True Size: 506

Starting frame 7 out of 238

Current Offset: 8160
Compression: 3
Image Size: 504
True Size: 609

Starting frame 8 out of 238

Current Offset: 8664
Compression: 3
Image Size: 384
True Size: 418

Starting frame 9 out of 238

Current Offset: 9048
Compression: 1
Image Size: 330
True Size: 330

Starting frame 10 out of 238

Current Offset: 9384
Compression: 3
Image Size: 376
True Size: 390

...



Now, for some explanation:


- Current Offset: The place in the file (in bytes) where the frame content is located. Note that the current offset of the last frame plus its image size must be equal to the size of file (showed in windows explorer) in bytes.

- Compression: 1 or 3. 1 is actually uncompressed while 3 has a special compression. When the compression is 3, the Image Size must be smaller than True Size. When the compression is one, both Image Size and True Size will have the same value.

- Image Size: Size, in bytes, of the frame contents in the file.

- True Size: Width x Height. The maximum size that the frame can have. And the size that the frame will ocupy in your RAM.




If you are a good observer, you will notice that the offset of a frame is the offset of the last non-blank frame + it's true size. The first frame starts after the header of the file and after the header of the frames, therefore, its offset won't be 0.

So, once you get the openlog.txt of your file, submit it to me and I'll check  what's wrong with it.




Final Observation:


When the program crashes while opening a file, you may possibly have other access violation messages when opening and creating other files... and also when leaving the program. Once you restart the program, these access violation messages will be over.

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 [1 Post] 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 cannot 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.2153s ][ Queries: 11 (0.0083s) ][ Debug on ]