Forum Index
SUBSIM Forum Search

The Web's #1 BBS for all submarine and naval simulations!
[ SUBSIM Review ] [ SUBSIM STORE ]
Current Forum | Archives 2002-2003 |

SH3 Unpacker GUI file extractor [tool inside]
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop
View previous topic :: View next topic  
Author Message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Fri Apr 01, 2005 1:58 am    Post subject: SH3 Unpacker GUI file extractor [tool inside] Reply with quote

The SH3 Unpacker program is available. Build 133. It is a beta version of course.

Display any packed .TGA file right from the program (without even extracting). You need to make sure you have a file viewer that handles .TGAs of course. www.irfanview.com is a good choice.

Extract one .DAT file or the entire game at once. 675 .TGA files at last count.

Be sure to read the install instructions. They are on the web page and in the readme.txt file in the ZIP file.

http://www.delraydepot.com/tt/sh3.htm

Hope you have fun with it.

-timetraveller



Last edited by timetraveller on Sun Apr 03, 2005 8:57 pm; edited 4 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BBury



Joined: 01 Apr 2005
Posts: 13
Location: Houston, Texas

PostPosted: Fri Apr 01, 2005 2:12 am    Post subject: Reply with quote

Very cool.....
Back to top
View user's profile Send private message
Sniper_1



Joined: 01 Dec 2003
Posts: 277
Location: Dublin, Ireland

PostPosted: Fri Apr 01, 2005 2:17 am    Post subject: Reply with quote

The modders are slowly but surely chipping away at SH3 Rock .
BTW what program do you use for viewing .tga files?

Sniper_1.
Back to top
View user's profile Send private message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Fri Apr 01, 2005 2:20 am    Post subject: Reply with quote

Sniper_1 wrote:
The modders are slowly but surely chipping away at SH3 Rock .
BTW what program do you use for viewing .tga files?

Sniper_1.


Grab a copy of IrfanView, a great freeware viewer for many file types. That's what I use. It'll display most of the non-complicated alpha-channel ones, anyway.

http://www.irfanview.com/

-timetraveller
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sniper_1



Joined: 01 Dec 2003
Posts: 277
Location: Dublin, Ireland

PostPosted: Fri Apr 01, 2005 3:11 am    Post subject: Reply with quote

Thank you, i'll do that tomorrow morning.

Sniper_1.
Back to top
View user's profile Send private message
filboid42



Joined: 14 Mar 2001
Posts: 71
Location: Maine USA

PostPosted: Fri Apr 01, 2005 3:17 am    Post subject: Reply with quote

Nice work cant wait to try it out Thumbs Up
Back to top
View user's profile Send private message Send e-mail Visit poster's website
etchasketch



Joined: 22 Mar 2005
Posts: 76

PostPosted: Fri Apr 01, 2005 4:59 am    Post subject: Reply with quote

Do you mind if I ask what your extract process is?
Back to top
View user's profile Send private message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Fri Apr 01, 2005 10:13 am    Post subject: Reply with quote

etchasketch wrote:
Do you mind if I ask what your extract process is?


Not at all. I have the user browse for a .DAT file and it is read in. There is no real algorithm as such, the program just scans through the data in the following fashion. I skip through a .DAT file and look for the field ".tga + 00". Finding, .tga + 00, I build a possible filename. I then look for the actual start of the actual RBG data, hex 00 00 02 00 00 00 00, etc. Finding that, you have to back up to make sure the .tga + 00 you found is the correct one, as it seems many .tgas have additional non-RBG .tga names and data sandwiched between records, which was confusing the extraction. That may have been the few your algorithm couldn't find, as I had some random problems myself. If the .tga + 00 name found belongs to the RBG data (just back up from the start of the RGB data to the prior .tga + 00), then I extract the RGB data and write it to disk as a .tga file, using the found filename. That's about it.

Thanks for the clues on the how Ubisoft imbedded the .tgas. It was a great help in getting started with the code. I have done this type thing before. I wrote the overall file extractor for Codename: Panzers, including the graphic converter for their proprietary .DDS header file format. I've also written the .TEX graphic converter for Nexus: The Jupiter Incident. SH3 has been my main aim since then, waiting for it to come out. A lot of this code for the SH3 extractor was already done, and waiting in the other programs I've written. It was a matter of cut and paste and a little tweaking here and there.

-timetraveller
Back to top
View user's profile Send private message Send e-mail Visit poster's website
etchasketch



Joined: 22 Mar 2005
Posts: 76

PostPosted: Fri Apr 01, 2005 1:16 pm    Post subject: Reply with quote

Ah, i see.

Just for fun, compare your algorithm to mine (written in perl):

Code:
open FILE, "< $datfile";
binmode(FILE);
my $file=<FILE>;
while($file =~ m/\x00(\w+?\.tga)\W{1,15}?(\x00\x00\x02\x00\x00\x00\x00.....(..)(..)([\x08\x10\x18\x20]).*?TRUEVISION-XFILE.\x00)/sg) {
   open OUTPUT, "> $1";
   binmode(OUTPUT);
   print OUTPUT $2;
}



That's literally it.
Back to top
View user's profile Send private message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Fri Apr 01, 2005 3:00 pm    Post subject: Reply with quote

etchasketch wrote:
Ah, i see.

Just for fun, compare your algorithm to mine (written in perl):

Code:
open FILE, "< $datfile";
binmode(FILE);
my $file=<FILE>;
while($file =~ m/\x00(\w+?\.tga)\W{1,15}?(\x00\x00\x02\x00\x00\x00\x00.....(..)(..)([\x08\x10\x18\x20]).*?TRUEVISION-XFILE.\x00)/sg) {
   open OUTPUT, "> $1";
   binmode(OUTPUT);
   print OUTPUT $2;
}



That's literally it.


I'm thinking this is a pattern match type of algorithm, yes? Not sure of the Perl syntax. My extractor is written in Visual Basic. It doesn't use a pattern match technique (other than scanning for the byte strings I indicated in my description). It's all just program logic and Do loops.

-timetraveller
Back to top
View user's profile Send private message Send e-mail Visit poster's website
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Fri Apr 01, 2005 9:48 pm    Post subject: Reply with quote

The SH3 Unpacker program is available. Build 133. It is a beta version of course.

Display any packed .TGA file right from the program (without even extracting). You need to make sure you have a file viewer that handles .TGAs of course. www.irfanview.com is a good choice.

Extract one .DAT file or the entire game at once. 675 .TGA files at last count.

Be sure to read the install instructions. They are on the web page and in the readme.txt file in the ZIP file.

http://www.delraydepot.com/tt/sh3.htm

Hope you have fun with it.

-timetraveller

Back to top
View user's profile Send private message Send e-mail Visit poster's website
filboid42



Joined: 14 Mar 2001
Posts: 71
Location: Maine USA

PostPosted: Fri Apr 01, 2005 10:00 pm    Post subject: Reply with quote

Just got it and cant wait to use it! Thanks T
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Redwine



Joined: 10 Jan 2002
Posts: 1143
Location: Buenos Aires , Argentina.

PostPosted: Fri Apr 01, 2005 10:01 pm    Post subject: Reply with quote

Thanks a lot, it works wonderful.......

Thumbs Up
Back to top
View user's profile Send private message Send e-mail Visit poster's website
etchasketch



Joined: 22 Mar 2005
Posts: 76

PostPosted: Sat Apr 02, 2005 2:18 am    Post subject: Reply with quote

timetraveller wrote:
etchasketch wrote:
Ah, i see.

Just for fun, compare your algorithm to mine (written in perl):

Code:
open FILE, "< $datfile";
binmode(FILE);
my $file=<FILE>;
while($file =~ m/\x00(\w+?\.tga)\W{1,15}?(\x00\x00\x02\x00\x00\x00\x00.....(..)(..)([\x08\x10\x18\x20]).*?TRUEVISION-XFILE.\x00)/sg) {
   open OUTPUT, "> $1";
   binmode(OUTPUT);
   print OUTPUT $2;
}



That's literally it.


I'm thinking this is a pattern match type of algorithm, yes? Not sure of the Perl syntax. My extractor is written in Visual Basic. It doesn't use a pattern match technique (other than scanning for the byte strings I indicated in my description). It's all just program logic and Do loops.

-timetraveller


Yeah, it's pattern matching. It simply turns the dat file into one long byte string, and then performs matches on that string.


If you're interested in using regex's for VB 6, then look here: http://visualbasic.about.com/od/usingvbnet/l/blregexa.htm
Back to top
View user's profile Send private message
darkdrone



Joined: 02 Apr 2005
Posts: 192
Location: deep space recon mission

PostPosted: Sat Apr 02, 2005 4:08 am    Post subject: Reply with quote

great tool, but how do u recompress them or get the game to read them? i tried using a dat program to recompress but it only does i TGA file Sad
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot 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


Powered by phpBB © 2001, 2005 phpBB Group