Madden 12 PSP .msh file format - any help

Get your graphics formats figures out here! Got details for others? Post here!
jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Madden 12 PSP .msh file format - any help

Post by jayande » Sun Jul 05, 2015 5:20 pm

Hello. I'm trying to view the textures within the .msh graphic format correctly, found in the PSP version of Madden. I've included compressed and decompressed versions of the .msh file and the original.viv which serves as the container for them. I tried using the Console Texture Explorer for PSP, but all I got was the image below. Ideally I would like to be able to import and export textures. If there is a tool that I'm missing to be able to accomplish this, please let me know. I've attached the texture files below. Any help would really be appreciated.

Image
You do not have the required permissions to view the files attached to this post.

jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Re: Madden 12 PSP .msh file format - any help

Post by jayande » Sun Jul 05, 2015 5:22 pm

Here is the viv file that contains the .msh texture files mentioned above. Attached below.
You do not have the required permissions to view the files attached to this post.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2635
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 649 times
Been thanked: 1352 times

Re: Madden 12 PSP .msh file format - any help

Post by shakotay2 » Sun Jul 05, 2015 6:55 pm

did you notice "torso" starts amidst of the msh file?
SEA2_decomp_msh.JPG
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Re: Madden 12 PSP .msh file format - any help

Post by jayande » Sun Jul 05, 2015 7:56 pm

[quote=hakotay2"]did you notice "torso" starts amidst of the msh file?
SEA2_decomp_msh.JPG
[/quote]

No, I didn't notice, but I guess that would make sense. This is all fairly new to me. Is there any way to get the image to display correctly? Do you think editing the texture file (editing then adding it back to the .msh file) is a possibility? You added a jpg extension, How does that effect the file? Thank you for your help thus far. I really appreciate it.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2635
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 649 times
Been thanked: 1352 times

Re: Madden 12 PSP .msh file format - any help

Post by shakotay2 » Sun Jul 05, 2015 8:59 pm

jayande wrote:Is there any way to get the image to display correctly?
Dunno - I'm not a console user so I don't care too much for those formats. I just wanted to give you a hint.
Do you think editing the texture file (editing then adding it back to the .msh file) is a possibility?
That's what the Console Texture Explorer was made for I guess.
"Export" (as TM2), import changed tim texture, then "Save"
You added a jpg extension, How does that effect the file?
That's just a screenshot of the explorer, nothing more. You should check out some tim viewers for loading the exported TM2 file.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Re: Madden 12 PSP .msh file format - any help

Post by jayande » Mon Jul 06, 2015 6:41 pm

Why the number 28016 as the graphic offset?

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2635
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 649 times
Been thanked: 1352 times

Re: Madden 12 PSP .msh file format - any help

Post by shakotay2 » Tue Jul 07, 2015 7:28 am

Just the first senseful address after "torso".
Feel free to de- or increase it to improve the displayed picture.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Madden 12 PSP .msh file format - any help

Post by barti » Wed Jul 08, 2015 9:17 am

Here's what I got from the first part of the file:
SHPM - some kind of identifier
32bit long - total file size
23bit long - number of textures in file
G359 - no idea what this is

Then for each texture:
4-byte texture name
32bit long - offset to that texture

Each texture starts with a 16-byte header:
32bit long - unknown
16bit short - texture width
16bit short - texture height
32bit long - unknown

multiply the texture width by texture height and you get image data size
go forward by that size, and you get the pallette, with a 16-byte header.
Afterwards you get the colors (32-bit longs, noticable columns of FFs).

So you fill out Console Texture Explorer accordingly and you get a texture :D
Image

jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Re: Madden 12 PSP .msh file format - any help

Post by jayande » Wed Jul 08, 2015 1:14 pm

barti wrote:Here's what I got from the first part of the file:
SHPM - some kind of identifier
32bit long - total file size
23bit long - number of textures in file
G359 - no idea what this is

Then for each texture:
4-byte texture name
32bit long - offset to that texture

Each texture starts with a 16-byte header:
32bit long - unknown
16bit short - texture width
16bit short - texture height
32bit long - unknown

multiply the texture width by texture height and you get image data size
go forward by that size, and you get the pallette, with a 16-byte header.
Afterwards you get the colors (32-bit longs, noticable columns of FFs).

So you fill out Console Texture Explorer accordingly and you get a texture :D
Image
Wow! Thanks so much to both you and shakotay2! :D But please tell me, how exactly did you arrive at 224 for the Graphics offset and 4336 for the Palette offset? A bit more detail would really be appreciated. I want to learn as much as possible. Do these 2 settings apply for the other texture? Thanks again, for your time and assistance. Your awesome!

jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Re: Madden 12 PSP .msh file format - any help

Post by jayande » Thu Jul 09, 2015 12:50 pm

I've been trying to figure out how to come up with the Graphic and Palette offset for different textures for the last day or so with no luck. Others textures that I have found include:

Jersey: 128x128
Sleeve: 128x32
Thigh: 64x64

Where in the hex editor do I look to find the offsets? Is there a formula? If so, how is it calculated? Or is it trial and error after multiplying the texture width by texture height and you get image data size? I just need a bit more help. Again, I would really appreciate it.

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Madden 12 PSP .msh file format - any help

Post by barti » Thu Jul 09, 2015 4:38 pm

As I mentioned before, the first part of .msh file is kind of a header. So you have the texture names there and also the offsets:
Image

As you can see, the offset for "mask" is 42432. So we go to offset 42432.

Here we can ignore the first 4 bytes, and next there is the image width (as uint16, 2 bytes) and image height (same parameters). So you type that into CTE.
Then you move to offset 42448 (where the image header starts + 16 bytes) and put that as the bitmap offset.
Image

Now whip out your calculator and multiply the image width by the image height. Next go forward by that offset in the file. Make sure you go by that offset from the current position, not the beginning of file:
Image

Now you should be at offset 42704. The palette header is not useful in this case so add 16 to 42704 = 42720 and put that as the Palette offset. Also remember to set Type to Texture + PaletteOffset and BPP to 8 in CTE.

Image

Well, this wasn't the best example for this method but you get the idea :D
I hope this post cleared up the process for you.

jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Re: Madden 12 PSP .msh file format - any help

Post by jayande » Thu Jul 09, 2015 5:03 pm

Thanks! That clears up a few things :D What Hex editor are you using? I'm using HxD and I don't have the option for a data offset info window like your examples.

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Madden 12 PSP .msh file format - any help

Post by barti » Thu Jul 09, 2015 5:40 pm

I'm using Hex Workshop. Unfortunately it's not free, but there is a free trial.

jayande
ultra-n00b
Posts: 8
Joined: Fri Jul 03, 2015 5:48 am

Re: Madden 12 PSP .msh file format - any help

Post by jayande » Sun Jul 12, 2015 3:38 am

I'm still not getting good results. Seems like I'm close, but the images aren't displaying correctly. Using your method, could you try the helmet, torso and thigh and post your results please? Even working backwards using the correct hip offset values doesn't give the same result.

barti
veteran
Posts: 148
Joined: Sun Apr 01, 2012 12:44 pm
Has thanked: 51 times
Been thanked: 101 times

Re: Madden 12 PSP .msh file format - any help

Post by barti » Sun Jul 12, 2015 8:49 am

Helmet:
Image

Torso:
Image

Thigh:
Image

Post Reply