Spa Files

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

  1. Gericom
    OP

    Gericom GBAtemp Advanced Fan

    Member
    851
    898
    Jun 30, 2011
    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

    Ray =D GBAtemp Regular

    Member
    288
    38
    May 17, 2011
    Gambia, The
    I think thats unknown for now. I already tried myself to open them :(
     
  3. Auryn

    Auryn GBAtemp Advanced Fan

    Member
    537
    348
    Jul 21, 2011
    Swaziland
    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

    rastsan 8 baller, Death Wizard,

    Member
    996
    228
    May 28, 2008
    Canada
    toronto
    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

    jjjewel GBAtemp Maniac

    Member
    1,009
    293
    Dec 17, 2009
    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

    andibad Soon™

    Member
    701
    90
    Sep 14, 2009
    Indonesia
    hospital
    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

    Gericom GBAtemp Advanced Fan

    Member
    851
    898
    Jun 30, 2011
    Netherlands
  8. Gericom
    OP

    Gericom GBAtemp Advanced Fan

    Member
    851
    898
    Jun 30, 2011
    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

    Gericom GBAtemp Advanced Fan

    Member
    851
    898
    Jun 30, 2011
    Netherlands
    Some process:
    [​IMG]