| View previous topic :: View next topic |
| Author |
Message |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Fri Apr 01, 2005 1:58 am Post subject: SH3 Unpacker GUI file extractor [tool inside] |
|
|
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 |
|
 |
BBury
Joined: 01 Apr 2005 Posts: 13 Location: Houston, Texas
|
Posted: Fri Apr 01, 2005 2:12 am Post subject: |
|
|
| Very cool..... |
|
| Back to top |
|
 |
Sniper_1
Joined: 01 Dec 2003 Posts: 277 Location: Dublin, Ireland
|
Posted: Fri Apr 01, 2005 2:17 am Post subject: |
|
|
The modders are slowly but surely chipping away at SH3 .
BTW what program do you use for viewing .tga files?
Sniper_1. |
|
| Back to top |
|
 |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Fri Apr 01, 2005 2:20 am Post subject: |
|
|
| Sniper_1 wrote: | The modders are slowly but surely chipping away at SH3 .
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 |
|
 |
Sniper_1
Joined: 01 Dec 2003 Posts: 277 Location: Dublin, Ireland
|
Posted: Fri Apr 01, 2005 3:11 am Post subject: |
|
|
Thank you, i'll do that tomorrow morning.
Sniper_1. |
|
| Back to top |
|
 |
filboid42
Joined: 14 Mar 2001 Posts: 71 Location: Maine USA
|
Posted: Fri Apr 01, 2005 3:17 am Post subject: |
|
|
Nice work cant wait to try it out  |
|
| Back to top |
|
 |
etchasketch
Joined: 22 Mar 2005 Posts: 76
|
Posted: Fri Apr 01, 2005 4:59 am Post subject: |
|
|
| Do you mind if I ask what your extract process is? |
|
| Back to top |
|
 |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Fri Apr 01, 2005 10:13 am Post subject: |
|
|
| 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 |
|
 |
etchasketch
Joined: 22 Mar 2005 Posts: 76
|
Posted: Fri Apr 01, 2005 1:16 pm Post subject: |
|
|
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 |
|
 |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Fri Apr 01, 2005 3:00 pm Post subject: |
|
|
| 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 |
|
 |
timetraveller
Joined: 23 Dec 2004 Posts: 967 Location: Atlantic Shipping Lanes
|
Posted: Fri Apr 01, 2005 9:48 pm Post subject: |
|
|
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 |
|
 |
filboid42
Joined: 14 Mar 2001 Posts: 71 Location: Maine USA
|
Posted: Fri Apr 01, 2005 10:00 pm Post subject: |
|
|
| Just got it and cant wait to use it! Thanks T |
|
| Back to top |
|
 |
Redwine
Joined: 10 Jan 2002 Posts: 1143 Location: Buenos Aires , Argentina.
|
Posted: Fri Apr 01, 2005 10:01 pm Post subject: |
|
|
Thanks a lot, it works wonderful.......
 |
|
| Back to top |
|
 |
etchasketch
Joined: 22 Mar 2005 Posts: 76
|
Posted: Sat Apr 02, 2005 2:18 am Post subject: |
|
|
| 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 |
|
 |
darkdrone
Joined: 02 Apr 2005 Posts: 192 Location: deep space recon mission
|
Posted: Sat Apr 02, 2005 4:08 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
|