Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Patapon (GXT) texture file

Featured Replies

  • Author
  • Localization

OwocekTV, posted Fri Feb 20, 2015 7:29 pm (3303)


I used a BND extractor to open Patapon archive, and now I need help to decrypt/view a Patapon texture files, which will be very useful for me.
The header is XXG.01.0MIG (58 58 47 2E 30 31 2E 30 4D 49 47 2E)
Here is a sample file: https://dl.dropboxusercontent.com/u/105 ... 1_01_1.gxt
Any help would be awesome!

Thanks!
  • Author
  • Localization

puggsoy, posted Sat Feb 21, 2015 12:44 am (3307)


Looks like they're big endian 4bpp linear pixels. I can't seem to find a palette though. Is there any file that might look like it contains a palette?
  • Author
  • Localization

OwocekTV, posted Sat Feb 21, 2015 9:25 pm (3347)


Anybody?
  • Author
  • Localization

puggsoy, posted Sun Feb 22, 2015 2:14 am (3350)


Hmm OK, after looking through these I found the palettes. They're 0x40 bytes after the pixel data, and the pixel data is at 0x80. It's length is found as a long at 0x44 (and 0x48 too?).

However, for some images the pixel data is 4bpp with a palette that's 0x40 bytes long, and for others it's 8bpp for a palette that's 0x100 bytes long. I'll see if I can figure out how to differentiate them. Can you give me more samples to check? Maybe even the entire folder containing them, if it's not too large.
  • Author
  • Localization

puggsoy, posted Tue Feb 24, 2015 11:22 am (3401)


OK, pretty sure I got it. I'll try make something for this soon.
  • Author
  • Localization

OwocekTV, posted Tue Feb 24, 2015 1:19 pm (3403)


Thank you ^^
  • Author
  • Localization

OwocekTV, posted Sat Feb 28, 2015 11:28 am (3514)


So... any progress?
  • Author
  • Localization

puggsoy, posted Sat Feb 28, 2015 12:50 pm (3520)


Sorry, life has been very busy lately. I have a free day tomorrow so I'll see if I can make something for it then.
  • Author
  • Localization

puggsoy, posted Sun Mar 01, 2015 10:51 am (3529)


gxt2png
Code:
Usage: gxt2png inFile outDir
    inFile: The .gxt file to convert. Can alternatively be a folder containing the files to convert
    outDir: The folder to save the converted files to

Enjoy :)
  • Author
  • Localization

OwocekTV, posted Sun Mar 01, 2015 12:35 pm (3534)


Ok I've installed OpenFL and found missing lime.ndll.
Amazing work! You are awesome!

But...
Patapon 1 & 2 graphics don't have right colors but looks ok
Patapon 3 graphics doesn't work at all :(

Patapon 1 textures work just like Patapon 2, so colors are just not ok
Patapon 3 textures are glitched/corrupted

http://scr.hu/3p34/awykr - This should be dark turquise (blue)
http://scr.hu/3p34/mp7cc - This should be red/dark pink

https://dl.dropboxusercontent.com/u/105901018/pata3.7z - some Patapon 3 samples
  • Author
  • Localization

puggsoy, posted Mon Mar 02, 2015 11:07 am (3562)


I've updated it. It converts Patapon 1 and 2 textures properly now. Apparently the palette data is in RGBA format, I wasn't sure how it was supposed to look so thanks for telling me. I had some bit shifting issues, but now I know that I should use unsigned right shifting unless I specifically want signed.

Anyway, this won't work with Patapon 3 textures yet. The format looks identical, but for some reason the graphic doesn't show up properly. It looks like it should work the same but apparently it doesn't. Maybe the pixel data needs to be organised differently, I'm not sure.
I'll try figure it out, although unfortunately I can't promise anything.

(Oh, I've added lime.ndll now by the way, sorry that I missed that out. You shouldn't need OpenFL anymore.)
  • Author
  • Localization

OwocekTV, posted Mon Mar 02, 2015 3:01 pm (3570)


It's working perfectly now, thanks!
  • Author
  • Localization

OwocekTV, posted Thu Mar 12, 2015 5:19 pm (3782)


I have a 2 questions:
Can you make a feature to convert it back to gxt?
Can you provide me source code of this? I may add some things or just to teach myself.
  • Author
  • Localization

OwocekTV, posted Mon Apr 13, 2015 7:51 pm (4502)


Puggsoy, I need your help to create Patapon 3 graphics converter.

That's the things I figured out:
Based on that file: https://dl.dropboxusercontent.com/u/105 ... ips003.gxt

So first is the header. Next is the image data (which i haven't figure out, but that file should be 480x272)

After that, starting from 0x80 is the pixel data. This is more complex than the Patapon 1 and 2, because image is divided by pixel chunks, 16x8 (figured it out by real-time memory editing on emulator) which gives 128 pixels.

Chunks are placed like
111222333444
111222333444
555666777888
555666777888

Every hex in pixel data is a reference to Color ID stored in Palette data. Pallette data can be 256bit or 16bit.
256bit is stored like
00 00 01 FF 00 25 60 FF 00 55 33 FF... FF is splitting colors by each other and the triple hex's are just colors. Color ID starts from 0, so 00 00 01 have ID 0, 00 25 60 have ID 1, etc.

Then in pixel data if you got 55, convert it from hex to dec and get your colour by ID in Pixel Data. Simple.

In 0x0001FE80 you can see some numbers, I haven't figured what they do, but if its 02 00 00 00 00 04 00 00 00 04, pallete is 256 bit.

I hope this will help in converting Patapon 3 graphics, peace! :)
  • Author
  • Localization

puggsoy, posted Tue Apr 14, 2015 10:56 am (4516)


Sorry, I'm a little busy at the moment but I will try and do something for this. Thank you for your help :)
  • Author
  • Localization

OwocekTV, posted Tue Sep 01, 2015 6:13 pm (7096)


Uhh, can you upload this again? Switched to new system, and then, file is missing from your dropbox.
  • Author
  • Localization

puggsoy, posted Wed Sep 02, 2015 5:06 am (7109)


Ah sorry, I've been moving some stuff around. Here you go: https://dl.dropbox.com/s/2634ia3fx66jl2v/gxt2png.zip

By the way, I'm sorry that I haven't really shown any progress with the Patapon 3 textures. I am working on a program that should be able to handle multiple graphic formats (similar to QuickBMS, but for graphics instead of archives). It's taking a while now but will make things faster and easier in the long run.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.