SADX/SA1 Hacking/Modding

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

  1. pablodrago

    pablodrago

    Member
    34
    0
    0
    BS AS
    @Strife: There is an object in the adventure fields called "SCENE_CHANGE" or something like that, if you port this object into the speed highway, is posible to load the next part of the level.
    This object is a blue box, just set the X,Y,Z values for the size of the box and the Z rotation is the level to load.
    I don't remember if this object trigger the animation when the character begins to run down the buiding.


    Try to open the material editor and change all 255 values to 254, that usually helps.
     
  2. Jeffery Mewtamer

    Jeffery Mewtamer

    Blind Bookworm Member
    1,513
    0
    16
    @Strife: Does such a hack work with(or at least make less buggy) the stages Tails can't normally access but can be glitched into? Does such a trick work with any of the other characters? It's probably a pipedream, but a hack that allowed Tails, Knuckles, and perhaps even Amy and Gamma to play through the entirety of Sonic's levels would be awesome and this sounds like a good first step towards making that a reality.
     
  3. Strife

    Strife

    Member
    1,903
    13
    18
    United States
    Freedom Planet 2
    These are the results of my tests, based purely on renaming Sonic's object and set files so that they're loaded for Tails:

    Emerald Coast: The timer never appears and reaching the second area throws you back to the Adventure Fields - likely because the second area is used in one of his cutscenes. (Other characters have neither of these problems.)
    Twinkle Park: The bumper car track works fine, but when the second area is reached, Tails freezes when he falls into the roller coaster and said coaster never moves, forcing you to quit.
    Red Mountain: Throws you back to the Adventure Fields immediately - likely because Red Mountain was used in one of Tails' cutscenes. Other characters don't have this problem.
    Lost World: Works great.
    Final Egg: Works great.
     
  4. How does a chase camera work in this engine?
     
  5. Dude

    Dude

    Tech Member
    3,137
    0
    0
    Southbridge, MA
    Random VR/AR trash
    From what I've been able to figure out so far, if Sonic is facing away from the camera, it will slowly rotate until it is directly behind him, targetting a point in front of him. If Sonic is facing the camera, it will slow it's turning rate, eventually coming to a stop if he runs straight at it. Once he stops, it will resume trying to get behind him again.
     
  6. No, I mean, camera stops to wait for Sonic to go through a loop, and camera behaviour depends on gameplay type (normal, plane, fishing) and even a gimmick (icicle, cart, avalanche, shark). How does it work? Are there some trigger brushes and different camera logic for that?
     
  7. Dude

    Dude

    Tech Member
    3,137
    0
    0
    Southbridge, MA
    Random VR/AR trash
    Oh. That's more than just the chase cam, that's the entire game's camera system.

    There are trigger brushes, yes. You can turn them on in sadxlvl2 by using the view menu and clicking the 'camera' checkbox. The camera system is only about 75% known, and there are some editor features that are in-development. The trigger brushes are all stored in bin files in the system folder, they use the same naming convention as the SET files, except the prefix is CAM instead. Most of the triggers are rectangular boxes with 3 scale values and 2 rotation values. There is an option for uniform scale, which allows one (or maybe more) scale values to be used as a different kind of variable. That particular option hasn't been added to the editor yet, since I'm only kind of sure how it works. I'm still in the process of reverse engineering what all the flags mean.

    If you want to see my current (sloppy, stream-of-consciousness stuff) notes on the format: http://pastebin.com/atf3HRv1
     
  8. SF94

    SF94

    AKA SonicFreak94. Tech Member
    773
    0
    16
    Utah
    SA1/2 hax
    http://www.youtube.com/watch?v=IcUZhWfYmMI

    Fixed FOV in widescreen!
    Edit: The FOV is massive here because it's calculated based on resolution, and this video uses a 21:9 aspect ratio to emphasize it.
     
  9. So no more zoomed in Widescreen? The FOV in the video still looks...off. Maybe I'm just tripping. In any case you realize I'm expecting you to port this to the newer releases and an official SEGA adaptation for the Xbox 360 verison. :colbert:
     
  10. SF94

    SF94

    AKA SonicFreak94. Tech Member
    773
    0
    16
    Utah
    SA1/2 hax
    It looks off because it's based on resolution, which in this case is a 21:9 aspect ratio. I forgot to mention it in the post, but I did in the video description. Go me :V

    And the newer versions can die in a hole. I'm not touching those things with a ten foot pool unless I get access to the source code. Like seriously SEGA, give me the code and I'll fix your game.
     
  11. Strife

    Strife

    Member
    1,903
    13
    18
    United States
    Freedom Planet 2
    Do you suppose it'd be possible to have the HUD scale up based on the resolution?
     
  12. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,313
    16
    18
    SonLVL
    Of course it is!

    We just haven't figured out how yet...
     
  13. Dude

    Dude

    Tech Member
    3,137
    0
    0
    Southbridge, MA
    Random VR/AR trash
    As far as I know, the HUD is kind of an ad-hoc deal, and each drawcall would need to be investigated. The game definitely wasn't built with a scalable UI in mind, although they did have to make some adjustments when porting it to PC.

    It's been a long time since I've messed with it though.
     
  14. SF94

    SF94

    AKA SonicFreak94. Tech Member
    773
    0
    16
    Utah
    SA1/2 hax
    Unrelated: I forgot to post these.

    Pause Hide mod - press X+Y to hide the pause menu.
    Idle Chatter - press Z (RB) to listen to your character blab.
     
  15. Strife

    Strife

    Member
    1,903
    13
    18
    United States
    Freedom Planet 2
    [​IMG]

    I cobbled together a small mod that changes the texture of the numbers on the HUD and Trial menu to match the Dreamcast version. Use in conjunction with a Dreamcast model swap for best effect, of course.

    https://www.mediafire.com/?d0gw0s7u30sh5zw

    Just extract the zip to your root folder and it should pop up in SADX Mod Manager.
     
  16. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,886
    16
    18
    USA
    rom-properties
    aka a taunt button. :v:

    Are you really feeling it?

    Challenge: Try porting it to Ocarina codes for the GameCube version. I'm not sure if you'd need different memory locations for the different regions, but based on the source for this mod, it shouldn't be more than a couple DWORDs worth of codes.
     
  17. CheatFreak

    CheatFreak

    Everything or Nothing. Member
    56
    0
    0
    Michigan
    BetterSADX Patch
    On the subject of SADX hacking- this might be of worth to some people.

    While I was working on the new version of the BetterSADX patch (which is essentially a converter that turns the steam port into the 2004 port- including some of y'alls community mods to make things more pretty.) I decided to "reverse engineer" that stupid AppLauncher.exe, by which I mean- not even pay attention to what it does, and then write a program that does the same thing, but better.

    If you aren't aware- old versions of SADX on steam would run either Sonic Adventure DX.exe or config.exe based on what the user chose in the client- they changed this in the Achievements update for some reason and now it used some AppLauncher.exe that is passed arguments from the steam client based on user input.

    Figured them out. It's /bootgame and /bootconfig.

    Wrote a tiny program in C# that does runs sonic.exe if /bootgame and runs SADXModManager.exe if /bootconfig so people can replace the steam port with the 2004 port again.
    Again I did this specifically for BetterSADX, but if you guys would like to use it for your own purposes, feel free to. I'd include the source but I can't seem to find it at the moment.
    It's a simple program anyway though.

    https://u.teknik.io/0nkpnq.7z

    -- To avoid a double post --

    @MainMemory
    I was bored so I made some textures for your Goal Ring mod. Yeah I don't know why I did it either- just wanted to photoshop a thing.
    I might make ones for the Tutorial/Instructions screen too- just so I can wipe out any evidence of the capsule ever existing out completely.
    PVR files for the mod/system folder: https://u.teknik.io/BTT9KB.zip
    [​IMG]
     
  18. evilhamwizard

    evilhamwizard

    Researcher
    1,311
    31
    28
    Small bump.

    JmTsHaW posted a codebreaker code for the US 1.1 version of SA1 for enabling 60fps. I know the frame limit was found a while a go, but I never saw anything that altered the framerate before.

    Reposting the video just in case.

    [youtube]http://www.youtube.com/watch?v=iEdxnJreeHg[/youtube]

    I haven't tested the code myself, but the video doesn't really show off 60fps for some reason...

    Can anyone else confirm the code works?
     
  19. sonicblur

    sonicblur

    Oldbie
    1,312
    5
    18
    Works! Well, I don't have 1.1 though.

    So here's a 1.0 port:
    01754EBC 00000001
    01754EC4 00000001

    You can enter it as one code, instead of two separate ones. The results are weird, cutscenes sometimes run too fast, and when the game can't run at 60fps there is no frameskip so the entire thing slows down. But when it can do so, it's a nice smooth 60fps.

    I have capture hardware, but I can't capture VGA and my Dreamcast is hooked up over that. If anyone really wants, I can record a 60fps video off-TV with my phone though.
     
  20. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,313
    16
    18
    SonLVL
    I wish you had double posted because that's really cool. Can I include those in the Goal Ring Mod?