Spa Files

Discussion in 'NDS - ROM Hacking and Translations' started by Gericom, Oct 19, 2011.

Oct 19, 2011

Spa Files by Gericom at 12:53 PM (1,233 Views / 0 Likes) 8 replies

  1. Gericom
    OP

    Member Gericom GBAtemp Advanced Fan

    Joined:
    Jun 30, 2011
    Messages:
    594
    Country:
    Netherlands
    Does someone know how to open spa files or what compression they use?

    The only thing I know is that the files contain particles (effects like snow and rain). And when I open the file with crystal tile, I can see a little bit the textures.

    Download: http://florian.nouwt...ssionEffect.spa
     
  2. Ray =D

    Member Ray =D GBAtemp Regular

    Joined:
    May 17, 2011
    Messages:
    288
    Country:
    Germany
    I think thats unknown for now. I already tried myself to open them :(
     
  3. Auryn

    Member Auryn GBAtemp Advanced Fan

    Joined:
    Jul 21, 2011
    Messages:
    529
    Country:
    Switzerland
    If you open them with CT2, why you not take a look at the icon before the file that tells you if it's compressed or not??
     
  4. rastsan

    Member rastsan 8 baller, Death Wizard

    Joined:
    May 28, 2008
    Messages:
    963
    Location:
    toronto
    Country:
    Canada
    Okay there is multiple file headers so for sure there could be compression. I am sure I am seeing a palette at the end of that file. What might be nice is if you screen shot-ed/uploaded another file of the same type for comparison sake.
    I would recommend grabbing a memory snapshot also of the file from an emulator. So you might possibly find it decompressed.

    While playing the game on your computer attach crytaltile2 to the emulator, then search for the file name. you might hit the fat file but you will also get results for the file as it is in memory (hopefully decompressed). It will be a simple matter to copy paste that from the memory snapshot and compare it to the other file that is (possibly) compressed. The differences, if their are any, are what you base a decompressor off of.

    Also might be nice if you told us the name of the game you are looking into. So anyone interested could take a look...
     
  5. jjjewel

    Member jjjewel GBAtemp Maniac

    Joined:
    Dec 17, 2009
    Messages:
    1,004
    Country:
    United States
    The file is not compressed. You can view Tile and see pictures. The only problem is to figure out the offset for the palettes and each picture.
    (From my experience, if you see a bunch of value 00 in the file, it's less likely that the file is compressed. Most compression method eliminates the repetitive values, so you wouldn't see a lot of the same values in there.)

    By the way, you said that the files contain particles (effects like snow and rain). I wonder why you want to do anything with it. (Usually, it's something nobody would edit. Except you want to make the rain drop looks different or change the snowflake's shapes, etc. :D)

    Edited: You can look for " TPS" (20 54 50 53) in the file. I think it's related to where each picture is located.

    Warning: Spoilers inside!
     
  6. andibad

    Member andibad Soon™

    Joined:
    Sep 14, 2009
    Messages:
    699
    Location:
    hospital
    Country:
    Indonesia
    yeah is not compressed i think, after i test spa file on pokemon BW (a/0/0/6)

    Warning: Spoilers inside!

    well is interesting XD
     
  7. Gericom
    OP

    Member Gericom GBAtemp Advanced Fan

    Joined:
    Jun 30, 2011
    Messages:
    594
    Country:
    Netherlands
  8. Gericom
    OP

    Member Gericom GBAtemp Advanced Fan

    Joined:
    Jun 30, 2011
    Messages:
    594
    Country:
    Netherlands
    I have got something:
    The file starts with:
    offset - length - comment
    0x00 - 0x04 - APS - 0x20415053 (Standard Particle Assignment)
    0x04 - 0x04 - Unknown
    0x08 - 0x02 - Unknown
    0x0A - 0x02 - TPS count
    0x0C - 0x0C - Unknown
    0x18 - 0x04 - Offset to start of first TPS

    The TPS starts with a 0x20 long header (it is little endian):
    offset - length - comment
    0x00 - 0x04 - TPS - 0x20545053 (Standard Particle Texture)
    0x04 - 0x04 - Unknown
    0x08 - 0x04 - Number of bytes in image
    0x0C - 0x04 - Unknown
    0x10 - 0x04 - BPP
    0x14 - 0x08 - Unknown
    0x1C - 0x04 - Total size


    Then there is the image.
     
  9. Gericom
    OP

    Member Gericom GBAtemp Advanced Fan

    Joined:
    Jun 30, 2011
    Messages:
    594
    Country:
    Netherlands
    Some process:
    [​IMG]
     

Share This Page