News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Utilities: Rainbow: texture format converter  (Read 12670 times)

RadioTails

  • Sr. Member
  • ****
  • Posts: 343
  • Holding the Mega Drive controller
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #20 on: July 20, 2014, 10:21:58 am »
I will have a look at that. Hope that Dolphin has a good debugger.

That would be a great help with the project I'm working on (http://www.romhacking.net/forum/index.php?topic=16635.0)

From what I have looked at, the files are uncompressed.  They seem to contain groups of textures, and that the information for each texture is stored before the texture.  If necessary, I can upload one of .nut files.


It has some issues. Memory breakpoints (as in "break when a specific RAM address is read / written on") don't work even in builds made specifically for enabling them (DebugFast). If you plan on using them, your best bet is to download the emulator's code and edit the read / write functions, but it may or may not work, so cross your fingers.

I inquired recently about this in the Dolphin forums, check it out if you need more info on how to do it:

https://forums.dolphin-emu.org/Thread-solved-recompiling-dolphin-to-set-memory-read-breakpoint

From what I understand, the default version only runs "Execution Breaks".  It has to be modified to run "Read / Write Breaks".  There is a DebugFast 4.0 which can be downloaded here: http://smashboards.com/threads/dolphin-debugfast-4-0-emulator-memory-breakpoints-download-links-32-64-bit.354071/

I can't test it myself because version 4.0 won't open any games, due to my crappy card.  I can get them open on 3.5 however, but I need to upgrade my computer.

Be interested to know if the break features work.
Avatar by LazyNinjartist

PhOeNiX

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #21 on: July 21, 2014, 05:08:46 am »
It seems that someone at XentaX managed to find something out about this texture format. It seems to be used by many games: Star Fox Assault, Naruto Shippuden:Ultimate Ninja Storm 2, Eternal Sonata, Dragon Ball Z: Burst Limit.
The guy that was working on this format also says "But there was something else... *thinks* ah...., .nut files! I remember them from Tales of Symphonia (PS2 version)! They had TIM2 instead of NT*3"
From what I understand he explains that the textures he found in Tales of Symphonia for PS2 were NT*3 images (aka .nut), but with a different header. Maybe the TIM2 format that I implemented in Rainbow is a more generic texture container. Could you please send me some nut files? I would like to check if the structure of this nuts files is the same.
Maybe the raw pixel data is encoded in a console specific format, but the container should be the same.

Here you can find the discussion http://forum.xentax.com/viewtopic.php?f=18&t=8071.
You will require to make a donation in order to log in. I just used the Google cache to read the thread.

July 21, 2014, 10:48:14 am - (Auto Merged - Double Posts are not allowed before 7 days.)
I got some nut files from this game. It seems that the container is pretty similar. The main difference is that the images are tiled with a tile size of 8x8. I found two different encodings as for now: 4bpp and 8bpp with 16bit palettes. Here is how the first texture of the font .nut file should be (with an almost right palette):
« Last Edit: July 21, 2014, 10:48:14 am by PhOeNiX »

RadioTails

  • Sr. Member
  • ****
  • Posts: 343
  • Holding the Mega Drive controller
    • View Profile
Re: Utilities: Rainbow: texture format converter
« Reply #22 on: July 23, 2014, 04:49:37 pm »
Thanks for taking a look at the .nut files.  Didn't expect them to be tiled textures.  I presume the information to tell whether the texture is 4bpp or 8bpp is stored before the texture?  Same as the palette?

The textures that I mainly require to edit is the title screen.  The English textures are stored in \_us\Title\  If you would like me to upload them (I can get the Japan and Europe ones as well), let me know.
Avatar by LazyNinjartist

Pokeytax

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Cavespeak
Re: Utilities: Rainbow: texture format converter
« Reply #23 on: August 29, 2014, 10:30:36 pm »
Nice work on the tool! It's proving a big help with a translation I'm working on.

I've encountered some PIM2/.PM2 files, which are almost identical to .TM2 files - the only differences are the file extension and that the magic number is "PIM2" instead of "TIM2" (they appear to invariably be swizzled). Changing these two things allows Rainbow to handle them no problem. I can handle the "conversion" myself but I just wanted to document the file format here in case it comes up for you or anyone else.