MLB The Show 14 Ps Vita tpf files

Textures, recreate headers, conversions, algorithms and parsing of image files
lorak
Posts: 36
Joined: Wed Aug 31, 2016 6:12 pm

MLB The Show 14 Ps Vita tpf files

Post by lorak »

I was wondering if we can convert/edit the sample files you can find here for .tp2 and here for .iff files.
The .iff file was generated after extraction with offzip; the .tpf file appears as it is, both look very similar though and it should be textures there.

This is the procedure I followed:
1. Extract the only .arc file of the game with psarc tool. I am aware that the brink.bms script also works;
2. Extract/decompress .mlbz files with offzip v0.4 covering 99% of them getting .iff files as output.

Thank you.
Last edited by lorak on Sun Feb 05, 2017 9:00 pm, edited 4 times in total.
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: MLB The Show 14 Ps Vita tpf files

Post by Acewell »

both of your samples look like the same file type despite the extension.
there is a string table at the end signaled by STRGTEXN,
followed by the number of files,
followed by length of table to end of file
then the file names of each possible GXT(?) texture

first image starts at 0x0 signaled by IFF0TX00
then 00000000
then size (long) + 16 until next IFF0TX00
:D
lorak
Posts: 36
Joined: Wed Aug 31, 2016 6:12 pm

Re: MLB The Show 14 Ps Vita tpf files

Post by lorak »

Acewell wrote:both of your samples look like the same file type despite the extension.
there is a string table at the end signaled by STRGTEXN,
followed by the number of files,
followed by length of table to end of file
then the file names of each possible GXT(?) texture

first image starts at 0x0 signaled by IFF0TX00
then 00000000
then size (long) + 16 until next IFF0TX00
:D

Could you please help me to extract the possible GXT textures form the files in the first post?
It would be great! Then, I could try the Scarlet v1.1.3 tool to maybe work the GXT textures.

To give a bit more details regarding what to look for in those files,
the .tp2 file (loadingball) should look like similar to this image:Image, meanwhile the .iff file (Miami Marlins home jersey) should look more or less like this:Image
Thanks.
Last edited by lorak on Sun Feb 05, 2017 11:24 pm, edited 5 times in total.
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: MLB The Show 14 Ps Vita tpf files

Post by Acewell »

lorak wrote:Could anybody please help me to extract the possible GTX textures form the files in the first post?

:shock: you quoted me then asked if anyone can help, so i guess i'm nobody? :P

this bms script will split your samples :)

Code: Select all

findloc NameTable binary "\x53\x54\x52\x47\x54\x45\x58\x4E"
math NameTable + 8
goto NameTable
get Files long
get NameTableSize long
savepos TMP
math Offset = 0x0
for i = 0 < Files
   goto TMP
   get Name string
   string Name + ".gxt"
   savepos TMP
   goto Offset
   get IFF0TX00 longlong
   get zero long
   get Size long
   math Size + 16
   log Name Offset Size
   math Offset + Size
next i


the textures are gxt with a custom header, but they do contain the real header
from 0x50-0x8f (64 bytes) in jersey-color.gxt for example

Code: Select all

47 58 54 00 03 00 00 10 01 00 00 00 40 00 00 00 
70 55 05 00 00 00 00 00 00 00 00 00 00 00 00 00
40 00 00 00 70 55 05 00 FF FF FF FF 00 00 00 00
00 00 00 00 00 00 00 85 00 04 00 02 0B 00 00 00


Noesis can open these textures if you trim down the header to the real one
jersey-color.gxt split from 00000004.iff and with corrected header
Image
lorak
Posts: 36
Joined: Wed Aug 31, 2016 6:12 pm

Re: MLB The Show 14 Ps Vita tpf files

Post by lorak »

Acewell wrote:
lorak wrote:Could anybody please help me to extract the possible GXT textures form the files in the first post?

:shock: you quoted me then asked if anyone can help, so i guess i'm nobody? :P

Yeah, that is kind of funny :lol:.
I did it in this way since my idea was to open the question to anyone capable and willing to help me with it. I am glad you came with the script to extract the textures from those .tp2 files (as .iff is in essence the same type as .tp2) and to go even farther commenting how to load the .gxt textures. I have corrected my post above changing the word anyone for the word you.

Thank you very much. :D

No experience with Noesis from my side. If I understand correctly from your previous post, we can convert those .gxt textures to .png, .dds, ... files after fixing its header, and then, edit the converted textures. By the way, I got the Atlanta Braves jersey also but it looks distorted or shifted when I load it in Noesis. I have trimmed down its header deleting the custom header from 0x00-0x4f. What could be the issue here? :?:

To final questions:
Perhaps we would be able to convert the new/edited (.png, .dds, ... ) textures back to .gxt in Noesis or with another tool?
Can we repack the .gxt textures to .tp2 files with your script?

Many, many thanks again for your help. :D
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: MLB The Show 14 Ps Vita tpf files

Post by Acewell »

lorak wrote:No experience with Noesis from my side. If I understand correctly from your previous post, we can convert those .gxt textures to .png, .dds, ... files after fixing its header, and then, edit the converted textures.

yes, new version of Noesis has native support for gxt and you only need the
program, no additional plugins or anything, just launch and open gxt texture :D

By the way, I got the Atlanta Braves jersey also but it looks distorted or shifted when I load it in Noesis. I have trimmed down its header deleting the custom header from 0x00-0x4f. What could be the issue here?

you have to remove the other part below it also, from 0x90 - 0x19f
i might be able to make another bms script to strip the junk from the header so you
can open them in Noesis. i will look at that more later. :D


Perhaps we would be able to convert the new/edited (.png, .dds, ... ) textures back to .gxt in Noesis or with another tool? Can we repack the .gxt textures to .tp2 files with your script?

that would be modding and is not my area, i don't have a clue how to convert
back to gxt and have it work with the rest of the custom header, sorry :oops:



edit
okay here is bms script that attempts to auto-fix the header for opening in Noesis :D
create a separate folder for the output files so you don't overwrite original.

Code: Select all

idstring "IFF0TX00"
math Offset1 = 0x50
math Size1 = 0x40
get Name filename
log Name Offset1 Size1
append
goto 0x60
get Size long
goto 0x9c
get hsize1 long
goto 0xac
get hsize2 long
xmath Offset "hsize1 - hsize2 + 0xa0"
log Name Offset Size
lorak
Posts: 36
Joined: Wed Aug 31, 2016 6:12 pm

Re: MLB The Show 14 Ps Vita tpf files

Post by lorak »

Acewell wrote:edit
okay here is bms script that attempts to auto-fix the header for opening in Noesis :D
create a separate folder for the output files so you don't overwrite original.

Thank you very much again!