Plants Vs Zombies XBLA .ptx

Textures, recreate headers, conversions, algorithms and parsing of image files
112288
Posts: 1
Joined: Sun Dec 06, 2020 4:57 am

Plants Vs Zombies XBLA .ptx

Post by 112288 »

Files found in main.pak/images. If anyone knows how to make these images viewable, help would be appreciated.
Also, these are only 19 of the 2000+ of these files I can find in main.pak.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Plants Vs Zombies XBLA .ptx

Post by LolHacksRule »

Raw textures of some sort. PS3's format uses DDS. I attempted to get an idea but got nowhere. PVZ2 also uses this format but I'm not sure if it's 100% similar...
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Plants Vs Zombies XBLA .ptx

Post by LolHacksRule »

ESRB_RATING.ptx appears to be DXT5(?) compressed with a size of 1152x676. They really considered the game having animated blood or was a mistake.

Image

background.ptx is the same but I cannot get the proper image, luckily I got the size (Shift 15 may help).
Image

I think I found a header at the bottom (cause Xbox Big Endian)

Code: Select all

int32: Width (of source image before conversion?)
int32: Height
int32: ? (02 = ?, 04 = ?, 1E = ?, 2A = ?, 3E = ?)
4bytes: 54201A (end)
Last edited by LolHacksRule on Sat Nov 13, 2021 8:50 pm, edited 2 times in total.
Sour And Juicy
Posts: 7
Joined: Mon Jan 25, 2021 11:32 pm

Re: Plants Vs Zombies XBLA .ptx

Post by Sour And Juicy »

There's some interesting tools and resources from this wiki, specifically Taiji (with a guide), which can extract any PvZ-related resource (albeit from the second game, not sure about the first).

It's been a long time since I've used it but there should be a .PTX to .PNG function in that tool, though it might require some finagling.

Edit: Also this page here, which is probably easier.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Plants Vs Zombies XBLA .ptx

Post by LolHacksRule »

The PTX format for this game isn't the same as PVZ2/other modern PopCap games according to what I can find about it.
yingfengtingyu
Posts: 4
Joined: Thu Feb 24, 2022 4:05 am

Re: Plants Vs Zombies XBLA .ptx

Post by yingfengtingyu »

It's different from PTX in PVZ2, PVZ PS3, PVZ PSV.
It used big endian DXT5_RGBA with some padding bytes after each line. (So you need block size)
The header is at the bottom of the file.
Int32 true width
Int32 true height
Int32 block size of each line
Int32 magic
You can use PopStudio(from github) to decode and encode it.