A question about bin compressions

Discussion in 'NDS - ROM Hacking and Translations' started by matthewn4444, Mar 16, 2008.

Mar 16, 2008
  1. matthewn4444
    OP

    Member matthewn4444 GBAtemp Regular

    Joined:
    Jun 21, 2007
    Messages:
    201
    Country:
    United States
    Does anyone know how to extract/decompress bin files that has LZ77 compression? (I'm trying to extract sc.bin from Shakugan no Shana DS). I also tried GBADecmpDemo.exe, but I don't know how to use it. Can Anyone help?
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,745
    Country:
    United Kingdom
    Assuming it is normal LZ compression I tend to go with the demo tool from
    http://gbadev.org/tools.php?showinfo=56

    If it is not normal LZ (rare but common enough to mention) then you will likely have to figure it out the compression and reimplement it (the tool above should serve as a good base). http://nocash.emubase.de/gbatek.htm also has some decent info on compression.

    Also you might like to take a look around http://www.romhacking.net/ I have not kept up with the latest LZ compression but some of the tools are pretty nice there.
     
  3. matthewn4444
    OP

    Member matthewn4444 GBAtemp Regular

    Joined:
    Jun 21, 2007
    Messages:
    201
    Country:
    United States
    Sorry and I'm still a noob, but how do these programs work?
     
  4. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
  5. matthewn4444
    OP

    Member matthewn4444 GBAtemp Regular

    Joined:
    Jun 21, 2007
    Messages:
    201
    Country:
    United States
    Thank you and was this extractor just for this game?
     
  6. undercarris

    Newcomer undercarris Advanced Member

    Joined:
    Mar 15, 2008
    Messages:
    59
    Location:
    Chile
    Country:
    United States
    i have a question thats nothing to do with this xD........ .... is there any homebrew that reads games that are inside a ZIP file or a RAR file XD? this would be very usefull to minimize the games zize [​IMG] xD
     
  7. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,745
    Country:
    United Kingdom
    The tool is just a command line app and is fairly dumb: that app only decompresses the entire file meaning it is generally a good idea to get what you need before you start. Usage is on the link and in the download.

    As for compressed roms. Some GBA stuff can do it as files are transferred to different memory sections and there is DSCompress that can do zip and gzip.
    90% of the space saved though is also saved by trimming the rom and the extra time and effort needed generally does not make for a good reason to compress roms.
    http://voidptr.org/?page_id=25
     
  8. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    Yes, just for this game. Well, the unpacking algorithm itself is common, but file formats vary widely between games. In this case I didn't see any header information, so I just used patterns (all files start at an offset that's a multiple of 256) to find the next file.
     

Share This Page