SADX/SA1 Hacking/Modding

Discussion in 'Engineering & Reverse Engineering' started by MainMemory, Aug 15, 2009.

  1. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    <!--quoteo(post=341373:date=Aug 17 2009, 02:23 AM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Aug 17 2009, 02:23 AM) <a href="index.php?act=findpost&pid=341373">[​IMG]</a></div><div class='quotemain'><!--quotec-->On the animation format, it seems that byte $4 is usually $49, and if byte $5 is $4, when the animation finishes it will change to the animation specified in byte $6. If byte $5 is $3, the animation will repeat.
    Edit: Setting byte $B to $C0 or above makes you invisible.
    Setting byte $5 to $2 makes the character stand straight up, not moving, with arms and legs pointed straight down.
    Edit2: Disregard byte $B. $8 is transition speed Float, and $C is animation speed Float.
    Edit3: I hit refresh and suddenly I'm a tech member!<!--QuoteEnd--></div><!--QuoteEEnd-->

    Could you give mea file/offset combination to one of these animation structures? Iwant to see if there are any pointers that go to the transformation data. I'm thinking I could make a solution to shadow not skating in mods and such.
     
  2. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    I don't know where they would be in a file, only where they are in RAM. The data for Sonic's standing animation is: 0C 31 5C 10 49 03 00 00 00 00 80 3D 00 00 00 3F. It points to $5C310C in chrmodels.dll.
     
  3. Glisp

    Glisp

    That one weird guy that does stuff. Member
    1,278
    1
    16
    Bloomington, IN
    None at the moment I'm afraid.
    AHEM. What about the Gamecube version? Are you all forgetting about that? It would be nice to actually use the REAL Super Sonic in the Gamecube version as well with a GC Action Replay code. (Unless there already is one I don't know about that gives the real thing.)
     
  4. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    I can't hack GameCube.
    Edit: This just in! Gravity has values for all three axes. I'm walking on the side of a building.
    Edit2: <a href="http://www.youtube.com/watch?v=S35lYG5GXoo" target="_blank">Video</a>
     
  5. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    0
    0
    across town from Hinchy
    All the bitches.
    <!--quoteo(post=341544:date=Aug 17 2009, 05:04 PM:name=Glisp)--><div class='quotetop'>QUOTE (Glisp @ Aug 17 2009, 05:04 PM) <a href="index.php?act=findpost&pid=341544">[​IMG]</a></div><div class='quotemain'><!--quotec-->AHEM. What about the Gamecube version? Are you all forgetting about that? It would be nice to actually use the REAL Super Sonic in the Gamecube version as well with a GC Action Replay code. (Unless there already is one I don't know about that gives the real thing.)<!--QuoteEnd--></div><!--QuoteEEnd-->


    Most likely not going to happen. The GC version is set up more like the DC version, making it pretty much impossible.


    edit:

    <!--quoteo(post=341457:date=Aug 17 2009, 12:39 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Aug 17 2009, 12:39 PM) <a href="index.php?act=findpost&pid=341457">[​IMG]</a></div><div class='quotemain'><!--quotec-->Okay, so you're hacking it beyond doing what the game does for Super Sonic. Also, I finished the editor, but I'm too lazy to make lists for anything other than Hedgehog Hammer and Emerald Coast. If you try another level, it will crash. Also, Get Properties takes your current position and copies it to the Property fields for rockets and dash hoops.<!--QuoteEnd--></div><!--QuoteEEnd-->


    There's actually a complete list of every single level, made by Sega, but it will be in engrish. The SADX preview had files listing them all for the debug mode. Those could be used until those get translated.
     
  6. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    I've got all the lists from the wiki and fixed a few bugs, like not actually changing the object id. And now it won't crash if it doesn't have a list for a level.
     
  7. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    Um I haven't tried this object editor yet... curious does it have a 3d interface? I've been looking for a programmer to collab with to make an all inclusive 3d level editor. Are you up to it?
     
  8. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    I know pretty much nothing about 3D programming. And I only know VB .NET and Java. I could learn 3D (I should anyways), but I don't know where to start.
     
  9. Dude

    Dude

    Tech Member
    3,138
    0
    16
    Southbridge, MA
    Random VR/AR trash
    <!--quoteo(post=341612:date=Aug 17 2009, 10:00 PM:name=MainMemory)--><div class='quotetop'>QUOTE (MainMemory @ Aug 17 2009, 10:00 PM) <a href="index.php?act=findpost&pid=341612">[​IMG]</a></div><div class='quotemain'><!--quotec-->I know pretty much nothing about 3D programming. And I only know VB .NET and Java. I could learn 3D (I should anyways), but I don't know where to start.<!--QuoteEnd--></div><!--QuoteEEnd-->
    hehe you're better off than I am, I can't even write decent VB - all I really do is dissect structs by looking at them in hex and fiddling with them
     
  10. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    Me too! That's how I found 99% of the addresses in the Character areas. And now there's a screenshot of my editor.
     
  11. Endri

    Endri

    Officer I don't have my drivers license with me. C Tech Member
    I don't understand. I'm trying to figure out how to load the textures.

    It seems the texture name theirselves are ignored. If you rename the SUPERSONIC.PVM and replace it for the SONIC.PVM, Sonic will use Super Sonic textures (naturally), however, the Sonic model will continue to the same texture index.

    Code (Text):
    1. ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;###########&nbsp;&nbsp;&nbsp;&nbsp;################
    2. ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#SONIC.PVM#&nbsp;&nbsp;&nbsp;&nbsp;#SUPERSONIC.PVM#
    3. ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;###########&nbsp;&nbsp;&nbsp;&nbsp;################
    4.  
    5. offset$0 =&nbsp;&nbsp;&nbsp;&nbsp;mtx_kuchinaka0,&nbsp;&nbsp;&nbsp;&nbsp;s_anakage1
    6. offset$1 =&nbsp;&nbsp;&nbsp;&nbsp;mtx_kuchinaka1,&nbsp;&nbsp;&nbsp;&nbsp;s_hando2
    7. offset$2 =&nbsp;&nbsp;&nbsp;&nbsp;s_anakage1,&nbsp;&nbsp;&nbsp;&nbsp;s_hando3&nbsp;&nbsp;&nbsp;&nbsp;
    8. offset$3 =&nbsp;&nbsp;&nbsp;&nbsp;s_hando2,&nbsp;&nbsp;&nbsp;&nbsp;s_testhand&nbsp;&nbsp;&nbsp;&nbsp;
    9. offset$4 =&nbsp;&nbsp;&nbsp;&nbsp;s_hando3,&nbsp;&nbsp;&nbsp;&nbsp;sstx_body
    10. offset$5 =&nbsp;&nbsp;&nbsp;&nbsp;s_testhand,&nbsp;&nbsp;&nbsp;&nbsp;sstx_body2
    11. offset$6 =&nbsp;&nbsp;&nbsp;&nbsp;stx_btest1,&nbsp;&nbsp;&nbsp;&nbsp;sstx_redeye
    12. offset$7 =&nbsp;&nbsp;&nbsp;&nbsp;stx_eye2,&nbsp;&nbsp;&nbsp;&nbsp;stx_itemshoos0
    13. offset$8 =&nbsp;&nbsp;&nbsp;&nbsp;stx_ha,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stx_itemshoos1
    14. offset$9 =&nbsp;&nbsp;&nbsp;&nbsp;stx_hara,&nbsp;&nbsp;&nbsp;&nbsp;stx_shoose16
    15. offset$A =&nbsp;&nbsp;&nbsp;&nbsp;stx_hoho,&nbsp;&nbsp;&nbsp;&nbsp;stx_shoose17
    16. offset$B =&nbsp;&nbsp;&nbsp;&nbsp;stx_itemring,&nbsp;&nbsp;&nbsp;&nbsp;stx_shoose18
    17. offset$C =&nbsp;&nbsp;&nbsp;&nbsp;stx_itemshoos0,&nbsp;&nbsp;&nbsp;&nbsp;stx_shoose19
    18. offset$D =&nbsp;&nbsp;&nbsp;&nbsp;stx_kanagu,&nbsp;&nbsp;&nbsp;&nbsp;sstx_body
    19. offset$E =&nbsp;&nbsp;&nbsp;&nbsp;stx_newspin,&nbsp;&nbsp;&nbsp;&nbsp;sstx_redeye
    20. offset$F =&nbsp;&nbsp;&nbsp;&nbsp;ym_sjppse,&nbsp;&nbsp;&nbsp;&nbsp;sstx_spin
    Actually, the Super Sonic pvm has more textures, but the rest of them are animation textures used for the aura, the bolt of lightning, and water splash.

    So, basically, I'm trying to find a pattern. If SONIC.PVM is replaced by SUPERSONIC.PVM, Sonic's body will use the Super Sonic's eye texture, since they both share the same offset both in the memory and in the PVM file, as denoted here:

    Code (Text):
    1. offset$6 =&nbsp;&nbsp;&nbsp;&nbsp;stx_btest1,&nbsp;&nbsp;&nbsp;&nbsp;sstx_redeye

    Then again, if the files are left as is, the Super Sonic model won't use Sonic's textures. It will use random scenary textures instead. But why doesn't it just uses Sonic's texture, if they share the same offsets?

    When SUPERSONIC.PVM is in place of SONIC.PVM, when the Super Sonic model is active, the lookup table points to the Sonic texture loaded in the memory, and make it use its offset.

    However, when the Super Sonic texture is not assigned in the place of Sonic's original texture, an offset is pointed by another pointer. But why?

    So, a not so simple matter of creating a new PVM, inserting a texture layout similar to Super Sonic's original PVM, with the very same PVR files and offsets (since the Super Sonic texture set is very robust, contain many animation frames), and then, adding Sonic's PVR set to it, but with different offsets, naming the file SONIC.PVM and changing the original Sonic model in CHRMODELS.DLL (the file itself or in the memory), to make Sonic uses the original textures while in its normal state.
     
  12. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    0
    0
    across town from Hinchy
    All the bitches.
    Yeah, the PVR file names do not matter at all. It just goes by the order the files are in. The material structure in each model points to which PVR to use. So the best way to do it would be, to add Sonic's textures to the end of the Super Sonic file, and then edit the material structure so Sonic will load those new PVR files.
     
  13. Endri

    Endri

    Officer I don't have my drivers license with me. C Tech Member
    Exactly. That's definitely the closest approach a can think of about at all. Unless there's something easier that we might be missing, but I don't think it so.

    And this method is good, since Super Sonic will still be able to use his original PVM for the Perfect Chaos fight.
     
  14. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    0
    0
    across town from Hinchy
    All the bitches.
    I think I might work on making an edited CHRMODELS.DLL and SONIC.PVM for this.

    Also, unrelated, but SA1 plays great with the Saturn controller.
     
  15. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,719
    0
    0
    being an asshole =P
    <!--quoteo(post=341627:date=Aug 18 2009, 12:45 AM:name=Endri)--><div class='quotetop'>QUOTE (Endri @ Aug 18 2009, 12:45 AM) <a href="index.php?act=findpost&pid=341627">[​IMG]</a></div><div class='quotemain'><!--quotec-->Then again, if the files are left as is, the Super Sonic model won't use Sonic's textures. It will use random scenary textures instead. But why doesn't it just uses Sonic's texture, if they share the same offsets?<!--QuoteEnd--></div><!--QuoteEEnd-->Probably because both files get used in the Perfect Chaos fight? You know, when Sonic goes to normal, Sonic's PVM is used, not SuperSonic's...
     
  16. Polygon Jim

    Polygon Jim

    Eternal Tech Member
    0
    0
    0
    across town from Hinchy
    All the bitches.
    This isn't relating to Super Sonic, but comparing the files between SA1 Japanese, and SA1 International, they stripped stuff out of the level models. most levels are about 1-2KB smaller in International.
     
  17. Neoblast

    Neoblast

    Member
    175
    0
    16
    Maybe there's some stuff related to that in the sa1 japanese version?
     
  18. Endri

    Endri

    Officer I don't have my drivers license with me. C Tech Member
    <!--quoteo(post=341662:date=Aug 18 2009, 02:55 AM:name=Polygon Jim)--><div class='quotetop'>QUOTE (Polygon Jim @ Aug 18 2009, 02:55 AM) <a href="index.php?act=findpost&pid=341662">[​IMG]</a></div><div class='quotemain'><!--quotec-->This isn't relating to Super Sonic, but comparing the files between SA1 Japanese, and SA1 International, they stripped stuff out of the level models. most levels are about 1-2KB smaller in International.<!--QuoteEnd--></div><!--QuoteEEnd-->It always felt to me that the International version had something different, even if this difference was imperceptible.
     
  19. Endri

    Endri

    Officer I don't have my drivers license with me. C Tech Member
    I heard that Super Sonic can walk on water in the Perfect Chaos fight. Is that true?
    <a href="http://www.youtube.com/watch?v=2Y4-ap93yic" target="_blank">Answer.</a>
     
  20. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,609
    201
    43
    SonLVL
    2 things... Sonic's model doesn't change until he hits the ground, and he's still trying to fall through the water. Is this a program or did you code this into the game?
    Every once in a while, I update the wiki article with more addresses. I'm probably going to upload a new table once I clean it up.