TM2 TIM2 Image: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
imported>Ikskoks
 
(43 intermediate revisions by the same user not shown)
Line 17: Line 17:


// IMAGE HEADER
// IMAGE HEADER
   4 - Header (TIM2)
   4 - Signature (TIM2)
   2 - Version
   2 - Version
   2 - Number of Images
   2 - Number of Images
Line 104: Line 104:
</pre>
</pre>
<br /><br />
<br /><br />
== MultiEx BMS Script ==
 
== quickBMS Script ==


No BMS script.
No BMS script.
Line 112: Line 113:
== Supported Programs ==
== Supported Programs ==


* [[Game Extractor|Game Extractor]]
* [http://ikskoks.pl/wp-content/uploads/2017/06/ConsoleTextureExplorer_v1.0b.zip Console Texture Explorer]
* [https://www.romhacking.net/utilities/660/ Game Graphic Studio]
* [https://richwhitehouse.com/index.php?content=inc_projects.php&showproject=91 Noesis] (also works well with "special" TIM2 files like the ones from King of Colosseum II)
* OPTPiX iMageStudio for PS2
* [https://github.com/marco-calautti/Rainbow/releases Rainbow]
* [https://www.romhacking.net/utilities/659/ TextER]
* [https://www.romhacking.net/utilities/659/ TextER]
* [https://richwhitehouse.com/index.php?content=inc_projects.php&showproject=91 Noesis]
* [https://github.com/lab313ru/tim2view/releases/ tim2view]
* [https://github.com/lab313ru/tim2view/releases/ tim2view]
* [https://github.com/marco-calautti/Rainbow/releases Rainbow]
* [https://www.romhacking.net/utilities/661/ Tim2bmp Converter Tool]
* [http://sktest.aruarose.com/TM2Decompress.7z TM2Decompress] (this tool can only decompress TIM2 files compressed with LZSS algorithm)
* [https://www.xnview.com/en/xnviewmp/#downloads XnView MP]
* [https://www.xnview.com/en/xnviewmp/#downloads XnView MP]
* OPTPiX iMageStudio for PS2
<br><br>
<br><br>


== Notes ==
== Notes ==


No additional notes.
* This is standard image file format used in many PS2 and PSP games.
<br><br>
<br><br>


== Games ==
== Games ==
 
List of games using this file format:
* Final Fantasy XII [PS2]
* Final Fantasy XII [PS2]
* Ikki Tousen: Shining Dragon [PS2]
* Ikki Tousen: Shining Dragon [PS2]
* King of Colosseum II [PS2]
* Kelly Slater’s Pro Surfer [PS2]
* LMA Manager 2007
* LMA Manager 2007
* Mahou Sensei Negima [PS2]
* Mister Mosquito [PS2]
* Mister Mosquito [PS2]
* Rule of Rose [PS2]
* Rule of Rose [PS2]
Line 136: Line 143:
* Sword Art Online: Infinity Moment [PSP]
* Sword Art Online: Infinity Moment [PSP]
* Unlimited Saga [PS2]
* Unlimited Saga [PS2]
<br><br>




<br><br>


[[Category:CE_None | Compression: None]]
[[Category:CE_None | Compression: None]]
[[Category:BMS_None | BMS: None]]
[[Category:BMS_None | BMS: None]]
[[Category:Program_Game_Extractor | Program: Game Extractor]]
[[Category:File Format]]
[[Category:File Format]]

Latest revision as of 18:05, 19 August 2022

Contents: GRAFs page - All - 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Edit

Format Type: Image
Extensions: tm2 tim2 tim
Platforms: PS2, PSP
Endian Order: Little Endian



Format Specifications

// Specs based off "Rainbow" from https://github.com/marco-calautti/Rainbow/

// IMAGE HEADER
  4 - Signature (TIM2)
  2 - Version
  2 - Number of Images
  
// IMAGE DATA
  // for each Image
    4 - Total Image Length
    4 - Palette Length
    4 - Image Data Length
    2 - Header Length
    2 - Color Entries
    1 - Image Format (0=8bpp paletted?)
    1 - Mipmap Count
    1 - CLUT Format
    1 - Bits Per Pixel (1=16bbp, 2=24bpp, 3=32bbp, 4=4bbp, 5=8bpp)
    2 - Image Width
    2 - Image Height
    8 - GsTEX0
    8 - GsTEX1
    4 - GsRegs
    4 - GsTexClut
    X - User Data (optional) (length = HeaderLength-48)
    
    parameters.linearPalette = (clutFormat & 0x80) != 0;
    clutFormat &= 0x7F;
    parameters.colorSize = parameters.bpp > 8 ? parameters.bpp / 8 : (clutFormat & 0x07) + 1;
            
    X - Image Data (length = ImageDataLength){
      if (bitsPerPixel <= 8){
        // indexed colors
        }
      else {
        if (colorSize == 2){
          // 16BITLE_ABGR_5551 Format
          }
        else if (colorSize == 3){
          // 24BIT_RGB Format
          }
        else if (colorSize == 4){
          // 32BIT_RGBA Format
          }
        }
      }
    
    X - Palette Data (length = PaletteLength) (only if Bits Per Pixel <= 8?){
      int numberOfPalettes = paletteData.Length / ((int)colorEntries * parameters.colorSize);
      int singlePaletteSize = paletteData.Length / numberOfPalettes;
      
      // for each palette
        if (colorSize == 2){
          // 16BITLE_ABGR_5551 Format
          numColors = singlePaletteSize/2;
          }
        else if (colorSize == 3){
          // 24BIT_RGB Format
          numColors = singlePaletteSize/3;
          }
        else if (colorSize == 4){
          // 32BIT_RGBA Format
          numColors = singlePaletteSize/4;
          }
          
      if (!linearPalette && bitsPerPixel != 8){
        // read the palette then apply the following...
        int parts = thisPaletteLength / 32;
        int stripes=2;
        int colors = 8;
        int blocks = 2;

        int i = 0;
        for (int part = 0; part < parts; part++){
          for (int block = 0; block < blocks; block++){
            for (int stripe = 0; stripe < stripes; stripe++){
              for (int color = 0; color < colors; color++){
                newPalette[i++] = oldPalette[ part * colors * stripes * blocks + block * colors + stripe * stripes * colors + color ];
                }
              }
            }
          }
        }
      else {
        // color palette is OK as is
        }
        
      }



quickBMS Script

No BMS script.


Supported Programs



Notes

  • This is standard image file format used in many PS2 and PSP games.



Games

List of games using this file format:

  • Final Fantasy XII [PS2]
  • Ikki Tousen: Shining Dragon [PS2]
  • King of Colosseum II [PS2]
  • Kelly Slater’s Pro Surfer [PS2]
  • LMA Manager 2007
  • Mahou Sensei Negima [PS2]
  • Mister Mosquito [PS2]
  • Rule of Rose [PS2]
  • Spider-Man: The Movie [PS2]
  • Sword Art Online: Infinity Moment [PSP]
  • Unlimited Saga [PS2]