Hacking PS2 game files - Extracting images?

Discussion in 'Sony Programming and Development' started by Trenton_net, Sep 15, 2014.

  1. Trenton_net

    Trenton_net AKA SUPERCOM32

    Joined:
    Apr 13, 2007
    Messages:
    2,378
    Likes Received:
    58
    In case anyone was wondering, here is how the header is made for TIM2 files:

    typedef struct
    {
    char FileId[4]; // ID of the File (must be 'T', 'I', 'M' and '2')
    BYTE FormatVersion; // Version number of the format
    BYTE FormatId; // ID of the format
    WORD Pictures; // Number of picture data
    char Reserved[8]; // Padding (must be 0x00)
    } TIM2_FILEHEADER;

    typedef struct
    {
    DWORD TotalSize; // Total size of the picture data in bytes
    DWORD ClutSize; // CLUT data size in bytes
    DWORD ImageSize; // Image data size in bytes
    WORD HeaderSize; // Header size in bytes
    WORD ClutColors; // Total color number in CLUT data
    BYTE PictFormat; // ID of the picture format (must be 0)
    BYTE MipMapTextures;// Number of MIPMAP texture
    BYTE ClutType; // Type of the CLUT data
    BYTE ImageType; // Type of the Image data
    WORD ImageWidth; // Width of the picture
    WORD ImageHeight; // Height of the picture
    BYTE GsTex0[8]; // Data for GS TEX0 register
    BYTE GsTex1[8]; // Data for GS TEX1 register
    DWORD GsRegs; // Data for GS TEXA, FBA, PABE register
    DWORD GsTexClut; // Data for GS TEXCLUT register
    } TIM2_PICTUREHEADER;
     
  2. amiga1200

    amiga1200 Dauntless Member

    Joined:
    May 9, 2012
    Messages:
    703
    Likes Received:
    4
    thanks a lot, TAXED! :witless:
    :eek:nthego:
     
    Last edited by a moderator: May 25, 2015
  3. krat0s

    krat0s Member

    Joined:
    Jun 1, 2014
    Messages:
    14
    Likes Received:
    1
    @Trenton_net sorry for getting a bit of topic here, but I would suggest something for you. I suck at images, I have no idea how they work but anyway, a user at Romhacking , time ago released a tool called Rainbow. It was designed specifically for TIM2 for PS2 images. Now it has advanced a lot , but the main point is that this app is the most up to date regarding the PS2 textures. The author also said that corrected things that even Optix PS2 Studio was handling in a wrong way. You might have sorted the problem already, but if you need more info head over to the site, and contact him. He is a pro at this stuff, especailly PS2 graphics. He might even add support for this strange format of yours, after all this was why Rainbow was designed.
    Cheers.
    http://www.romhacking.net/utilities/1069/
    https://github.com/marco-calautti/Rainbow


     
  4. Trenton_net

    Trenton_net AKA SUPERCOM32

    Joined:
    Apr 13, 2007
    Messages:
    2,378
    Likes Received:
    58
    Ah, that's pretty nifty. Thanks!
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page