Compressed VC games are uncompressed before load?

Discussion in 'Wii - Hacking' started by sr_corsario, Aug 13, 2010.

  1. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
    Hello!!

    I have just see a compressed file in a NeoGeo VC game. (KOF95 - USA) In this case is the game file, (game.bin.z) for this reason is importan (for me xD)

    "The problem" with neogeo roms is the size because the game is charged into the ram and it needs to fit in it.

    Now, appear a game.bin.z file with just the half size of it should have!! (15Mb instead of 30Mb aprox)

    Certenlly we will need to know how to compress it in order to inject a new game...

    However... my question is:

    When a VC game is started, its charged on ram, ┬┐Is the main.dol (1.app) loading the game compressed (romc for exemple) or it decompress it before playing?

    For one hand i think it decompress the rom (game file) on ram (is it called on the fly?) to load it later easylly but for the other hand... its a waste of time... and for ex. on KOF95 it dont spend many time for instance i supouse it load the game.bin.z as is.

    Im asking all of this because could be a nice door for a new pack of neogeo injections... I mean big games...

    Any idea?
    And what about .z file? I tried with 7z, winrar, winzip but didnt work...

    Sr Corsario


    Edit:I was able to inject compressed games using stev418 information, and the small ones works... but unfortunately it looks like to decompress the game.bin.z into memory for instance... [​IMG] big games will not work [​IMG]
     
  2. s3phir0th115

    Member s3phir0th115 GBAtemp Advanced Fan

    Joined:
    Dec 31, 2008
    Messages:
    700
    Country:
    United States
    They use a compression method that 7z, WinRAR, etc don't understand.

    I think I used something called U8 to deal with the compressino of some of the stuff.

    As for what roms use, I wish I could tell you. I have yet to be able to decompress some VC stuff, unless they've updated the compression/decompression tools. (Super Mario RPG for instance.)
     
  3. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain

    Mmm .... no, I know more ot lease U8 and romc compresion and unfortunally its not the case. [​IMG]

    Edit: And the most important is to know if the game.bin.z is decompressed or not. (or any other compressed rom file)
     
  4. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,523
    Location:
    ???
    Country:
    Germany
    game.bin.z? It could be U8, that's fast and good compressed. It also could be lzh8 or this romc compression for newer games.
     
  5. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain

    It Dont have any U8 header [​IMG]
     
  6. s3phir0th115

    Member s3phir0th115 GBAtemp Advanced Fan

    Joined:
    Dec 31, 2008
    Messages:
    700
    Country:
    United States
    Well, I remember using u8 tool or something like that at least once when I was injecting Master Quest into the normal Ocarina of Time. I don't know which files used it, but I know at least one did.
     
  7. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,523
    Location:
    ???
    Country:
    Germany
    It could also be LZ77. You could try to decompress the file with LZ77Mii (part of Wii.cs Tools)
     
  8. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
    I tried with:

    gbalzss.exe
    u8extr.exe
    romc.exe i get a file to big ... 55Mb... it should be near to 30Mb

    Thanks but it dont work ... it give that mesage "File is not LZ77 compressed"
     
  9. FIX94

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,523
    Location:
    ???
    Country:
    Germany
    You could also try lzh8:
    http://hcs64.com/files/lzh8_cmpdec08.zip
     
  10. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
  11. stev418

    Member stev418 GBAtemp Fan

    Joined:
    Sep 25, 2007
    Messages:
    492
    Country:
    Australia
    ok did some digging in the 01.app with hex editor and found something of interest

    inflate 1.2.3 Copyright 1995-2005 Mark Adler

    so im thinking compression is DEFLATE which iirc is zlib? :S so its zlib of some sorts anyway
     
  12. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
    On elotrolado the user GameZelda suggest as well zlib compression and a tool.
    Its offzip (Luigi Auriemma) website and with the option:

    "offzip -a game.z game 0x0" i got a 00000000.dat file with 52.822.080 bytes it looks like to be a correct (more or less) file... moreover I can see a diferent used bios on the archive...
     
  13. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    Then i hope you have both games in the "original" form, so you can determine how the currently used game.z file was build. I assume that the used bios is essential for this to work.
     
  14. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain

    Well... bios on neogeo vc games dont matter a lot... can be used uni-bios ... and the "old" vc neogeo games have a diferent one.
    However... in hex edit, the 0.dat file looks like to be good.

    Im very excited!! [​IMG]


    Edit:File order is changed XD (talking about P,M,V,S,C, and bios order on game.bin)
     
  15. WiiPower

    Member WiiPower GBAtemp Guru

    Joined:
    Oct 17, 2008
    Messages:
    8,165
    Country:
    Germany
    I assume you have both games in "original" form? I think i would try to make some sort of diff of both files and then apply it to your uncompressed .z file.
     
  16. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
    Now "both" are not igual than before... because data order insite game.bin is diferent... this afternoon i will try to finish "the study"

    Thanks for your interest

    Edit:Now the file order looks like to be:

    header
    S file
    C files (with "usual" modification and extra FF's)
    V (with extra FF's)
    Bios
    P file (with swap, as usual)
    M file
     
  17. stev418

    Member stev418 GBAtemp Fan

    Joined:
    Sep 25, 2007
    Messages:
    492
    Country:
    Australia
    hey man, i used a tool called xpert2 and its included zlib tool, was able to decompress rom and then compress back to a 100% match, i dont have the original rom to check but looks like it will do the trick. I sent you pm with link to xpert
     
  18. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
    Thanks stev418

    The compression/decompression is working perfectlly [​IMG] Now i hope it works on big injections

    Will try first with the usual "small" games and later with the big ones


    Thanks again!!

    Sr Corsario


    Sr Corsario


    Edit:I was able to inject compressed games using stev418 information, and the small ones works... but unfortunately it looks like to decompress the game.bin.z into memory for instance... big games will not work
     
  19. GHBAimen

    Member GHBAimen GBAtemp Regular

    Joined:
    May 26, 2009
    Messages:
    177
    Country:
    Sweden
    http://gbatemp.net/index.php?showtopic=851...p;#entry1126169

    [​IMG]
     
  20. sr_corsario
    OP

    Member sr_corsario GBAtemp Fan

    Joined:
    Jun 11, 2008
    Messages:
    423
    Country:
    Spain
    GHBAinem thanks for reaply, but is not the same compression.

    however now this thread is finish (at less for me) because the answer to the "question" is unfortunately YES

    When the "ram" is full, the wii get freeze...

    Will not be possible big injections. [​IMG]
     

Share This Page