SADX/SA1 Hacking/Modding

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

  1. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    133
    43
    SonLVL
    Do you even know anything about how the Basic Model and Chunk Model formats work? If you did, I imagine you wouldn't have tried converting it manually, because the formats are fundamentally incompatible, you would need a conversion tool.

    As to the existence of such a tool, I tried making a LevelConverter tool for LandTables a while back, but it doesn't quite work. A ModelConverter tool could be in the cards if I can figure out how to fix the conversion.

    If you're thinking you can bypass the inability to import custom models to SA2 by just porting models imported for the Basic Model, it doesn't work that way. Our importer imports models as triangle lists, which are supported by the Basic Model, but the Chunk Model only supports triangle strips, so we would need to implement a conversion function, and at that point, I could write a Chunk Model importer anyway. If you just want to port SA1 models to SA2, that might work, depending on the model. Most only use triangle strips, but there are a few odd ones.
     
  2. Exant

    Exant

    Member
    6
    0
    1
    I researched the SAModel project in SATools and after a lengthy analysis I thought I could trial and error with manual converting. Of course I expected it to not work but you gotta try it at least once.
     
  3. Speeps

    Speeps

    Member
    122
    40
    28
    There's a new mod out (by SKingBlue) that replaces the English story script with one closer to the original Japanese dialogue by implementing Windii's re-translation!

    Screenshots:
    [​IMG]
    [​IMG]
    [​IMG]
    Download
     
  4. Sable

    Sable

    Member
    62
    7
    8
    SEGA Carnival
    A few questions:

    1 - Is it possible to replace the font with the original Dreamcast version and/or a higher resolution version?
    2 - Is it possible to restore 30 FPS functionality without the usage of outside programs such as Dxtory? (This includes switching back to 60 in menus / Twinkle Circuit / credits / etc)
    3 - Finally, is it possible to restore the music stopping upon Adventure Field transitions and death?
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    133
    43
    SonLVL
    In order to properly recreate the font, we'd have to completely replace the text drawing system.
    I'm not entirely sure what would be involved in such a mod, but I believe it would be possible to reduce most of the game to 30fps.
    Stopping the music would just be a matter of inserting code to, well, stop the music.
     
  6. Mr. Fox

    Mr. Fox

    Member
    556
    9
    18
    Is there a way to remap ESC to pause/cancel/go to previous menu etc functions similar to, you know, any other game/computer program?

    Yes, this seriously bugged me since 2004.
     
  7. docfuture

    docfuture

    Member
    31
    0
    0
    I have a question about editing the text for the human NPCs in SADX. Using SADXTweaker2 to edit the cutscene text works great and I have no problems with it. But the actual message files for human NPCs don't seem to be able to output in StructConverter?

    So I can go in and edit the text for human NPCs in say Station Square or Mystic Ruins and the files are edited properly. I can load them back up and see the changes.

    So the problem comes in when StructConverter

    A: Doesn't automatically recognize the changes when I click "check modified"
    B: If I manually go in to check one of the options in this section:

    [​IMG]

    It seems that these export settings are totally unrelated to the message files in the system folder. These are for the text files in the MISC folder that handle say, when you see one of the other player characters in the field or TV monitor messages.

    So am I just totally scrolling past or missing the option for the bin files/message files?
     
  8. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    133
    43
    SonLVL
    StructConverter only deals with the data exported by the split tool, the field NPC messages are entirely separate and must be copied to your mod's system folder manually. I realize this is not ideal, but figuring out how to implement a project system that ties together all the data extracted from the EXE file, the DLL files, and the files in the system folder is not an easy task.
     
  9. docfuture

    docfuture

    Member
    31
    0
    0
    That's cool. I can live with that. Thanks!
     
  10. codenamegamma

    codenamegamma

    Member
    73
    1
    8
    Been working on updating MainMemory's Cheat Table to help make it more user-friendly.

    What's Been Done?
    • Items sorted into groups,
    • Colored Groups - So your Eyes can easily tell what a group and what's not.
    • Additional Labeling
    • New Scripts - Like "Don't Lose Rings When Hit"
    • Embem Flags - YES, All 130+ of them can be toggled individually
    • Dropdowns and lists populated - Current Music has all 140+ Tracks listed to easily pick what you want instead of remembering ID's
    • Sections for future growth - Added a Chao Related Section for when that gets added

    You can download the first release here.
    http://codenamegamma.com/wp-content/uploads/2018/02/SADX-UltimateCheatTableR1.zip
     
  11. Strife

    Strife

    Member
    1,964
    74
    28
    United States
    Freedom Planet 2
    Nice update! Definitely easier to manage now.

    I have some extra values you can add if you want, mostly camera-related stuff:

    47D940 - Setting this to 0xC3 disables racing opponents for Tails
    Pointer 3B2CBB0 - Camera type, Setting it to 3 locks the camera in place and allows the following values to be modified:
    349D388 - Camera X
    349D38C - Camera Y
    349D390 - Camera Z
     
  12. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,525
    133
    43
    SonLVL
    Um. That's not an "AI State", that's part of the game's code. 0xC3 is the opcode for 'ret', which returns from the current function.
     
  13. codenamegamma

    codenamegamma

    Member
    73
    1
    8
    so I got them added, and the camera pointer does seem to work if I change the pointer breaking it, however, the Cam X, Y, & Z never seem to update.
    not sure if they're not correct or I'm doing something wrong.
     
  14. Strife

    Strife

    Member
    1,964
    74
    28
    United States
    Freedom Planet 2
    The values I'm using for the camera coordinates aren't pointers, if that's what you mean. My .exe file should be the same as any other 2004 exe since the other non-pointer codes work so I'm not sure where the discrepancies are.
    One thing I do notice is that by double clicking my values in Cheat Engine, the address is written as "sonic.exe+349D388" rather than just the address itself.
     
  15. codenamegamma

    codenamegamma

    Member
    73
    1
    8
    well, yea. when it does that exe+some number that's the base address + the number so in this case that first one. turned out to be 0389D388 so around 400000 off from the address you gave.

    now with that sorted.
    https://i.imgur.com/OQwcU6t.png

    Made a video.
    http://www.youtube.com/watch?v=3PY5wcve6nE

    the fact we can decouple the camera using that value is a godsend I don't know how I would nop out and patch the keep the camera from writing without it since it uses this odd method of Pushing to the stack to write to some values.

    i did also fully map out the camera structure and there's some interesting stuff. draw distance is there so that's nice, sadly I cant just mod that by itself, but it might be possible to see where it's getting the value from and bump it up since there is no reason a modern pc cant render basically the entire stage without issues.
     
  16. E-122-Psi

    E-122-Psi

    Member
    2,080
    226
    43
    Sheesh, taking out the sneaky angles sure shows how sloppy those cutscenes were.

    In terms of camera editing, one function I think might be interesting to re add or tweak from the Dreamcast original is how the end of the cutscenes often stream into the gameplay camera (or at least are MEANT TO but stutter a bit). The later ports tended to muck them up so they didn't quite work.
     
  17. McAleeCh

    McAleeCh

    Oldbie
    1,041
    65
    28
    Funnily enough, a new article which touches on this (among other things) by PkR and Sonikko has just been added to the SADX Sins blog:

    https://dreamcastify.wordpress.com/2018/02/21/issues-with-sadx-enhancements/

    Really hope someone figures out how to restore the original smooth(er) transitions one day - the sudden cuts in SADX are pretty jarring.
     
  18. Traversal

    Traversal

    Member
    31
    6
    8
    Well if you mean the stuff like characters sliding around or phasing into existence, I wouldn't call that sloppy. Why properly animate stuff off-screen when it isn't going to be seen? It's just extra work for nothing. I'm pretty sure you'd see that kind of stuff in a lot of games, at least around that era, and even nowadays too.
     
  19. PkR

    PkR

    Member
    188
    18
    18
    SADX Dreamcast Conversion, The Emeralds' Awakening
    Editing draw distance has been possible for quite a long time. There's a "current" maximum level draw distance value at 0x03ABDC74, but it gets updated every time a level is loaded or restarted. There's a function for each level that sets up fog, draw distance and skybox scale, and it picks values for those things from arrays (unique for each level/act and clip setting), the majority of which were identified long ago in the disassembly. It's currently possible to change fog color/distance, level draw distance, skybox scale etc. for any level. Object draw distance is a bit more difficult because in many cases it's hardcoded, but it's still possible to change it. There's an experimental mod by SonicFreak94 that dynamically increases object draw distance.
     
  20. Mr. Fox

    Mr. Fox

    Member
    556
    9
    18
    IMO, the object draw limit is probably the most obvious hint as to how old the graphics are. I mean, the polygon count and texture resolution is quite similar to modern mobile games and even some PC indies, but the objects fading in and out every 10 ft is really jarring.

    If it's hardcoded per level, couldn't you intercept the code and just do "level value" = "level value" + "new value"?