Welcome Guest [Log In] [Register]
Welcome to Maco. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
TDU2 Xbox 360 STI Reverse Engineering
Topic Started: Jul 31 2013, 03:43 PM (5,052 Views)
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
Ok, search forever and again got nothing. So here we go. vettefan88 developed a program that " will convert a .png file to a usable sticker file. but it has it's limits, it will only convert the first of 4 layers, so the car needs to be paintable. setting the paint on the car will set the car for all 4 layers. using the ingame engine."

First 20 bytes of his STI:

Code:
 
00 02 00 00 00 00 00 00 00 16 10 00 42 44 32 2E 50 41 4D 42 00 00


First 20 bytes of in game STI:

Code:
 
DF F0 D4 4D 03 C2 36 6C E4 E8 07 70 3D 29 6D 8E 1D E2 A7 6F C2 10
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
So basically, The first hex header is something like "bnd2 pamb" and the other is gibberish. The first is a png converted to sti, and the second is created within the game. Both are different images, but both work in the game. And ALL of vettefan88s sti file begin with the same 20 bytes.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
If someone could please get this into png format, I am more then willing to provide sample files. To be honest, I would do it myself if I knew how to.

I do believe that it will be simple to write two programs, sti2png and png2sti, once the format is figured out.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
This is the first 0x40 bytes of vettefan88s STI file. It is the Buggy.

ASCII:
Code:
 
............BD2.PAMB..........TSs.......................................


HEX:
Code:
 
00 02 00 00 00 00 00 00 00 16 10 00 42 44 32 2E 50 41 4D 42 00 00 00 00 00 16 0F F0 00 16 0F F0 54 53 73 9E 86 99 8C 8F 04 00 04 00 00 01 07 09 00 00 04 80 00 00 00 00 00 00 00 00 00 00 00 1B 00 08 0F B0 00 00 00 00 00 00 00 00 00 00 00 00


After this its tons of blank space (00 00 00 etc).

It is a graphic file with this shape:
Posted Image


It is white with the mw3 logo though...
Edited by sylux102, Aug 1 2013, 03:55 PM.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
this links to his .STI files. MW3 Buggy is the simplest one i think (mostly white image)

Stickers.rar from MediaFire
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
every single STI file starts with these bytes:

Code:
 
00 02 00 00 00 00 00 00 00 16 10 00 42 44 32 2E 50 41 4D 42 00 00 00 00 00 16 0F F0 00 16 0F F0 54 53 73 9E 86 99 8C 8F 04 00 04 00 00 01 07 09 00 00 04 80 00 00 00 00 00 00 00 00 00 00 00 1B


ASCII:

Code:
 
............BD2.PAMB..........TSs........................


then i think the next part is the car id:

from buggy:
Code:
 
00 20 00 03 00 00 00 01 00 00 98 75 00 00 00 00 00 00 00 00 FF FF 00 00 FF FF 00 00 88 00 00 02 B7 2E D0 52 00 7F E3 FF 00 00 0D 10 00 00 02 00 B7 36 DA 00 00 00 00 00 00 00 00 00 00 00 00 00


ASCII:

Code:
 
. ........!...............0R..........8.............



from another car:

Code:
 
00 20 00 03 00 00 00 01 00 14 F8 21 00 00 00 00 00 00 00 00 FF FF 00 00 FF FF 00 00 88 00 00 02 AF 30 80 52 00 7F E3 FF 00 00 0D 10 00 00 02 00 AF 38 8A 00 00 00 00 00 00 00 00 00 00 00 00 00


ASCII:

Code:
 
. ........u................R..........6.............


and A LOT of this fills up the files (repeats itself a lot):

Code:
 
00 FF 92 49 49 24 24 92 00 00 00 00 00 00 00 00


ASCII:

Code:
 
.II$$........
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
Breakthrough... sort of.

First 40 bytes of STI (ASCII):

Code:
 
............BD2.PAMB..........TSs.......................................


First 40 bytes of games natural texture format (ASCII):

Code:
 
........`....2DBBMAP....@...@....UG...................7...................


BD2.PAMB is 2DBBMAP backwards!

.2db is the games regular texture format. Its basically a dds with a few extra lines in front saying "2dbbmap" and one at the end saying "REAL". I have a program that will convert from .dds to .2db and back, but it wont work on .STI because the file is... sorta different.
Edited by sylux102, Aug 1 2013, 10:58 PM.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
.2db files are always dxt5 dds files. So things are getting so close i can taste it (whatever it is)...
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
sylux102
Aug 2 2013, 03:36 AM
.2db files are always dxt5 dds files. So things are getting so close i can taste it (whatever it is)...
So here is the "empty" space of a DXT5 DDS converted to a .2db:

HEX:
Code:
 
FF FF 49 92 24 49 92 24 00 00 00 00 AA AA AA AA

ASCII:
Code:
 
I$I$....


Familiar? thats because it is... look at the empty space of the .STI:

HEX:
Code:
 
00 FF 92 49 49 24 24 92 00 00 00 00 00 00 00 00

ASCII:
Code:
 
.II$$........


and again for side by side comparison:

Code:
 
I$I$....
.II$$........
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
Asg16_4
Member Avatar
Member
[ *  * ]
Hey there sylux102 i'm glad to see your making progress I currently have this game for my PS3 and I was wondering if the difference of console will affect the encryption type. Because I opened up the .sti file unencrypted in HxD and I searched for the "bmap" thing you were talking about earlier and nothing popped up... :unsure: I'm unsure if it has something to do with the fact that it's unencrypted or the fact that is a different console. :ermm: Btw it's me ASG from tdumods... :P
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
Yes send me your sti file and I will take a look at it. Make sure it is all black covering all of the Eden buggy. It is the same format but it may have a different compression method. And it maybe encrypted. The xbox one isn't but the pc one is.

vettefan88, who did this first, wrote a program to convert this directly to png, but if I can get it to 2db that works too.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
Asg16_4
Member Avatar
Member
[ *  * ]
I can unencrypt it like that except I don't know which file to send you from my sti files I got ones that don't have the bmap thing and ones that do but i'll give a download to all of them and am I supposed to be painting it black before I send it? Also btw I found the bmap thing in the front ont of the file while i was looking through the "stickers - part 1" file that file is composed of about 6-7 sti files and well i'll just give you them all and give them to you through mediafire but not at the current moment. I'm going to my brothers house. Btw can you link me to the sti to png program?
Rainbow Dash is best pony!
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
No I cannot link you to the sti to png program because nobody except vettefan88 has it. And it only works with the xbox version. Even if I could link you to it I wouldn't. At least not until I figured it out.


and no you can't unencrypt it. If you could, you would be able to edit it. And this thread would be closed. What you call unencrypting is actually just unpacking. You could just email them to me at sylux102@gmail.com as a zip rar or 7z.

It must be the Eden buggy. No paint mods, just use black stickers to cover the whole car. Then send me that sti file.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
OK, so I tried byte swap and the header gets:

Code:
 
............2.BDMBPA..........sTS.......................................


then word swap and...:

Code:
 
.............2DBBMAP..........sST.......................................


Huzzah! It is the same as a regular .2db! except... the emtpy space is wrong...

lets compare:
Code:
 
I.$$I........ (this is the wordswapped one)
I$I$.... (this is the 2db control)
I.$I$........ (this is the byte swapped one)
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
sylux102
Member Avatar
Advanced Member
[ *  *  * ]
sylux102
Aug 3 2013, 11:56 PM
OK, so I tried byte swap and the header gets:

Code:
 
............2.BDMBPA..........sTS.......................................


then word swap and...:

Code:
 
.............2DBBMAP..........sST.......................................


Huzzah! It is the same as a regular .2db! except... the emtpy space is wrong...

lets compare:
Code:
 
I.$$I........ (this is the wordswapped one)
I$I$.... (this is the 2db control)
I.$I$........ (this is the byte swapped one)
the rest is a special kind of byte swap.
A sword wields no strength unless the hand that holds it has courage.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
DealsFor.me - The best sales, coupons, and discounts for you
Go to Next Page
« Previous Topic · Other (Modding) · Next Topic »
Add Reply

As some of you may know, I have left the rom editing scene, never to return. I will be attending UNL. I will also be getting a job, so I will not have the time to run a community and make all of these projects.

I'm leaving you all in good hands. Sylux102, one of the best Maco staff members, will be carrying on in my stead. His forums are on Zelda64.net. Register there, since this website is archive only.

As for OoT 2D and Izou, I will be leaving those in the hands of GodsTurf's team, Lunar World. If you are fans of these projects, subscribe to them.