Sonic Adventure 2 Hacking

Discussion in 'Engineering & Reverse Engineering' started by Turbohog, Feb 20, 2012.

  1. eXtaticus

    eXtaticus

    Member
    2
    0
    0
    Does anybody have the means to create a tool to change the volume of the music and sound effects? It's just that the sound effects are way too loud in the PC version, and I was wondering whether or not there was a fix for that. :)

    Thanks in advance.
     
  2. Dr. Mecha

    Dr. Mecha

    Member
    1,083
    0
    16
    Dallas, TX
    3d Models
    Please post it here when you done. I BEG YOU TO DO IT!!!
     
  3. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,435
    75
    28
    SonLVL
    PAKtool

    Use 'paktool /u pakfile' to unpack a file and 'paktool /p filename' to pack a file.

    When unpacking a file, it will create an ini file where each section header is the 'short path' to the file and the 'long path' is in the LongPath field.

    When packing a file, you need to have that ini file indicating the files and their long paths (so when making a new pak you'll have to create an ini first). The program itself does not care what file extension you give it, it will always read from .ini and write to .pak.

    Note that the game will always use a pak file in the PRS folder over a PRS'd GVM in the gd_PC folder if one is available, but all paks of that type have to have a filename.inf file inside it, and the format for that is currently unknown.
     
  4. flarn2006

    flarn2006

    Member
    277
    3
    18
    SA2 Cheat Table
    Awesome! :-) I had heard from someone (maybe it was you) that the format hadn't been completely cracked yet; I was hoping someone would finish the job!
     
  5. darkspines35

    darkspines35

    It's Easy Actually. No, seriously. Tech Member
    248
    0
    16
    .V.
    Sanik Adevnt Casters
    http://www.youtube.com/watch?v=fvwUlCNHVds

    I love to break things. Thanks to MainMemory's paktool, I broke the game. Shaders and all. Weeee :specialed:
     
  6. Graxer

    Graxer

    Member
    I actually like the idea of playing as a solid blue Sonic with just white eyes. (As can be seen in the ending pose, ignoring the left half) :v:
     
  7. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,435
    75
    28
    SonLVL
    GVM2PAK, contrary to what its name might suggest, actually supports four types of input files: GVM (uncompressed or PRS), PVM (uncompressed or PRS), GVR and PVR. This tool will convert all the textures to DDS and generate an INF file. Once you have a PAK, you can move it to the PRS folder, unpack it, edit the DDS textures, and repack it. You should never need to edit the INF file, because the only relevant data in there are the textures' filenames and global indexes.

    This program requires the DirectX Runtime.
     
  8. iGamr

    iGamr

    Member
    585
    10
    18
    Wouldn't that basically be playing as the icon for the lives counter? :v:
     
  9. flarn2006

    flarn2006

    Member
    277
    3
    18
    SA2 Cheat Table
    Just a tip for anyone who just wants to look through the contents of PAK files—create a directory and copy (not move) all the .PAK files into it. Then go to that directory in a command prompt and run the following:

    Code (Text):
    1. for %f in (*.pak) do paktool /u %f
    2. erase *.pak
    This will extract each .PAK file into its own directory, and then erase the copied PAK files. Make sure PAKTool is in your path (or in the directory where the PAK files are.)
     
  10. flarn2006

    flarn2006

    Member
    277
    3
    18
    SA2 Cheat Table
    But how would I repack it without a PAK2GVM tool?
    EDIT: MainMemory told me on Steam that you just put the .PAK file in the PRS folder, regardless of whether it was there before.

    [​IMG]
    Yes, I know it doesn't line up perfectly.
     
  11. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,435
    75
    28
    SonLVL
  12. flarn2006

    flarn2006

    Member
    277
    3
    18
    SA2 Cheat Table
    Have you tried running the decrypted version in a debugger to try and figure out why it doesn't work?
    Also, why do you think it's even encrypted in the first place? What does Sega lose by having people hack it?
     
  13. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,435
    75
    28
    SonLVL
    Of course I've tried running it in a debugger. Unfortunately I cannot accurately diagnose what's going wrong, since I can't debug the encrypted copy to see what it does when it works.
     
  14. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    I'm thinking the encryption is 'stock' cheat protection, and I'm willing to bet it is because SEGA is tired of having their leaderboards sodomized to hell. I doubt it has much to do with us making new content.

    Just speculation though, take it how you will.
     
  15. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,435
    75
    28
    SonLVL
    The encryption method is known as 'CEG' (Custom Executable Generation), and it's provided by Steam and used in several Steam games. SA2 just happens to be the first Sonic game using it (I think). Nobody's been able to reverse it yet, only crack it so the game runs without Steam, which I'm not interested in.

    Fusion, if you're reading this: how about importing and exporting Chao between the different versions of Adventure and optionally the GBA games? And would you mind sharing what you know about the Chao saves (SADX and SA2) with the rest of us?
     
  16. flarn2006

    flarn2006

    Member
    277
    3
    18
    SA2 Cheat Table
    How many games use this encryption method? If it's popular enough, maybe someone who knows more about it will be able to reverse it.
     
  17. Almost every game on Steam that doesn't have it's own protection.
     
  18. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,844
    0
    16
    Glendale, AZ
    Living life.
    Now that you guys have done alittle bit of digging in the PC version I think its safe to ask this.

    Do you guys think its possible to fix the radar system in this game? it would make the treasure hunting stages allot more easier.
     
  19. MainMemory

    MainMemory

    Have no fear...Amy Rose is here! Tech Member
    4,435
    75
    28
    SonLVL
    I did find the Emerald Radar's code (it helps that all objects are named in sa2), but in order to make it detect all three shards at once, I would have to add new code for looping. If this were SADX we could modify the exe and easily add custom code, but sa2 is nowhere near that level of hacking.
     
  20. Lanzer

    Lanzer

    The saber calls for its master... Member
    6,844
    0
    16
    Glendale, AZ
    Living life.
    Alright, just seeing where we are atm.

    Right now I'm more interested in fixing the small things that really bugged the hell out of me in SA2. the radar was one but another would be fixing the god damned countdown during Metal Harbor the rocket countdown always seemed too short to me and would help if it was increased by another 4-8 seconds.

    Also, toning down the music during cutscenes so it wasn't soo blaring and drowning out the dialog. I should really PM Morph and see if hes going to do a fixed version of SA2BPC.