SADX/SA1 Hacking/Modding

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

  1. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,269
    0
    16
    SonLVL
    The level geometry draw distance is set per-level. The object loading distance (not just draw distance, the objects actually get loaded/unloaded) is dependent on the flags and values set for each object in the object list for each level.
     
  2. Morph

    Morph

    AKA SonicFreak94. Tech Member
    773
    0
    16
    Utah
    SA1/2 hax
    Additionally, objects can arbitrarily use their own distance check, ignoring the values set by the object list and screwing everything up. Source: me working on greatly increasing object draw distance.
     
  3. codenamegamma

    codenamegamma

    Member Member
    71
    0
    0
    here's Rev 1.1 of the cheat table with the camera values and other stuff.
    http://codenamegamma.com/wp-content/uploads/2018/02/SADX-UltimateCheatTableR11.zip

    was hoping to find the time limit for Tail's Flying, but that didn't happen and I figured id better push this out.
     
  4. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,269
    0
    16
    SonLVL
  5. codenamegamma

    codenamegamma

    Member Member
    71
    0
    0
    converted it to a CE script for the table...nothing else really caught my fancy though so while I looked for others to convert over, I didn't really see any.
     
  6. PkR

    PkR

    Member Member
    181
    0
    16
    SADX Dreamcast Conversion, The Emeralds' Awakening
    I was able to fix those, sort of. As I suspected, it turns out those transitions are still in SADX. There's some camera-related value that gets reset after a cutscene finishes playing. Resetting the value causes the camera to cut to the character, and simply delaying the reset by a couple of seconds allows the transitions to work. I haven't played the entire game with this "fix", but it shouldn't cause issues. Apparently the transitions were supposed to play even when you cancel cutscenes, so I "fixed" those too, which may or may not help awkward camera angles that often happen when you cancel a cutscene.
    Note that this "fix" only restores what was put in there originally. Some of the transitions are still awkward because that's just the way they are. I'm not interested in reworking all cutscenes to make those transitions smoother.
     
  7. McAleeCh

    McAleeCh

    Oldbie Oldbie
    923
    0
    16
    Ah, amazing to hear! Thanks for the heads-up - will have to check it out as soon as I have the chance! = D
     
  8. PkR

    PkR

    Member Member
    181
    0
    16
    SADX Dreamcast Conversion, The Emeralds' Awakening
    [​IMG]
    I was looking in SA1's 1ST_READ.BIN and found a familiar-looking set of data, which turned out to be byte-by-byte identical to EFMSGFONT_ASCII24E.BIN in SADX system folder.

    This is the "Impress" font used for subtitles and recap screens in SA1. The other file, EFMSGFONT_ASCII24S.BIN, is a version of Comic Sans(?) used for subtitles and recap screens when playing the game in European languages other than English. The PC version of SADX doesn't load these files (although the Gamecube version apparently does), but there are some references to them in code.

    Anyway, I ripped both of these files as bitmaps (didn't bother to look for ASCII24S in SA1, it's probably 100% the same), which you can download here. I've also rearranged the bitmaps in the order SADXFontEdit exports SADX font data, so if this tool is ever updated with import functionality they will be importable as-is.

    Interestingly the PC version of SADX loads fonts from FONTDATA1.BIN (European) and FONTDATA0.BIN (Japanese). Other than the first 32 empty symbols, the letters in FONTDATA1 come in the same order as in these files, except that the "Impress" one doesn't have all those additional symbols for European languages.
    If SADXFontEdit had an option to import bitmaps I'd make a more "authentic" Dreamcast Font mod, but it doesn't at the moment and I really don't feel like re-painting all of those letters by hand. If anyone wants to do that though, feel free to use my rips as a reference.

    EDIT: I got a modified FONTDATA1 file to work, but it doesn't look the same. Apart from a brightness difference the font looks thicker overall in SADX. Looks like the game needs some code fixes to display the font properly.
    [​IMG]
     
  9. End User

    End User

    New Member
    14
    0
    0
    Supers Over Hedgehogs (SA2)
    Way ahead of ya. I think I posted my version of this a little over a year ago, but if it turns out that it was the one you used for the comparison screenshot, that's fine as well. Sadly, it doesn't include any of the extra symbols for the European release, but every symbol that was in the Dreamcast release is present here. It's basically the same as the version you posted, and it has another issue where the text can get cut off on both sides if it's too long.
     
  10. PkR

    PkR

    Member Member
    181
    0
    16
    SADX Dreamcast Conversion, The Emeralds' Awakening
    I saw this mod when it was posted, however the spacing issue makes it somewhat unusable long-term. From what I understand it isn't a 1:1 copy of the original font. Here's a comparison (top - mine, bottom - yours):
    [​IMG]
    It's pretty close for the most part, but it doesn't replace all of the symbols and the letters aren't aligned to the left, which I think may have contributed to the spacing issue.
    Anyway, I'm currently experimenting with getting this font to work in SADX, and so far I've got it to look like this (top - SA1, bottom - SADX):
    [​IMG]
    Unfortunately SADXPC does something with font rendering, which results in a washed-out look. Also the subtitle text is slightly bluish and transparent on the Dreamcast, but SADX makes it opaque white. I was able to correct that somewhat, but it generally looks a bit thicker than the original font despite the font data being 100% the same. Another difference is related to the recap screen - the font is slightly grey (248 248 248) on the Dreamcast, whereas the SADX one is white (255 255 255).
    I'll add an option to Dreamcast Conversion sometime soon that will allow to toggle between this font and the original SADX font.
     
  11. End User

    End User

    New Member
    14
    0
    0
    Supers Over Hedgehogs (SA2)
    Ah, that would explain why my version seemed way off. When I tried to replicate the Impress font, I used a more inefficient method of taking screencaps from an emulator and attempted to copy the text pixel-by-pixel. Now that I'm looking at your work and mine side-by-side, I can tell that I really shouldn't have done that. As for the spacing, I don't know what I was thinking with that, but I recall doing it that way because I found that the original font was spaced that way.

    While I played around with my version of the mod, I found that the Impress text appeared much closer to SA1's thickness when you interact with this Hint Monitor in vanilla SADX's Station Square Chao Garden. If the header's font is considered 1:1 with the Dreamcast version's, then the same could be said for the SADX Chao Garden action windows on the upper-right side of the screen, as those also look the same.
    [​IMG]
    [​IMG]
     
  12. PkR

    PkR

    Member Member
    181
    0
    16
    SADX Dreamcast Conversion, The Emeralds' Awakening
    Well, I ended up fixing this with some help from SF94. For some reason SADXPC treats the subtitle texture as ARGB4444 while the font only has 1-bit alpha. Changing the texture type to ARGB1555 made the subtitle text a lot sharper, even with the default SADXPC font.

    This is what the "Impress" font looks like right now:
    [​IMG]
    I restored the transparency and tried to imitate the color, but in the Dreamcast version it also seems to have a very faint gradient. It isn't noticeable, and the difference is now negligible.
    I've also added the "Comic Sans" font, which can be used in English and other European languages ("Impress" only has letters for English), though I've seen some spacing issues in Spanish at least once. Probably fixable by editing the text. I don't play the game in other languages so I hope someone else figures this out.
    [​IMG]
    The good news is that the Impress font doesn't seem to have any spacing issues.

    I decided to check if the remaining fonts were any different between SA1 and SADX, and found out that the Kanji font was different in SA1. I've updated the archive with all font files and a program to open them.
     
  13. Supakitsune

    Supakitsune

    It's TECHNOSTASY, SINCE 1987 Oldbie
    Nice work! That's always bugged me about SADX PC. The DC font is a little tacky, but it's got charm (and it's certainly better than Chalkboard/Comic Sans/whatever it is they used in SA2). The DX PC font is just...pretty lifeless and ugly. And half of that turned out to not really even be the font's fault! They really should've had more than just the one overworked intern doing the porting job. :v:
     
  14. PkR

    PkR

    Member Member
    181
    0
    16
    SADX Dreamcast Conversion, The Emeralds' Awakening
    For anyone who doesn't like installing mods manually, here's a new version of my universal SADX mod installer.

    You can use it to install the Mod Loader and some of the popular mods on any version of SADX. It has a profile-based system for most common setups - Dreamcast mods, Enhanced SADX and speedrun-friendly Minimal/Vanilla. For people new to SADX modding it has a Guide mode that shows comparison screenshots to help you decide which mods to install, and for more advanced modders there's a Custom mode that makes it fully customizable to your liking. It also arranges the mods in the correct order (although that's no longer a major problem), deletes old/deprecated mods, installs DirectX/Visual C++ runtimes/.NET Framework, cleans up the SADX folder, etc... The full list of features can be found here.

    The installer is available in two versions - the complete offline package and the web version. The installer itself is identical in both packages. The web version just downloads the files it needs to install the selected mods, while the offline version has files for all mods. The installer can also detect if the mods have been updated (on my server), or if a new build of the Mod Loader is available. It can even self-update seamlessly like the Mod Loader does after recent updates.

    Here are some screenshots:
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    I hope someone finds it useful, and feel free to share any feedback here, on Twitter, GitHub or ModDB.
     
  15. Tadashi

    Tadashi

    Member Member
    535
    0
    16
    Very cool!

    I wish you considered assing the mirror mode mod as well. It gives the game a Master Quest like feel. You'd be surprised how fresh the locations can look and feel just because of some simple screen flipping.
     
  16. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    920
    1
    18
    Formerly Sonic the Fighters
    Can SA:LE character animations for dialog be restored? I'm not sure if that's ever been looked into, but I would enjoy playing some SA:LE again.
     
  17. Speeps

    Speeps

    Previously Jmtshaw Member
    100
    2
    18
    You mean this? That's still there, all you need to do is play the game with Japanese voices.
     
  18. biggestsonicfan

    biggestsonicfan

    Model2wannaB Oldbie
    920
    1
    18
    Formerly Sonic the Fighters
    Oh, I did not know that. I thought the bugged out JP release was fixed and re-released as SA:International? What IS SA:DX based from? I forget the build timeline again.
     
  19. Irixion

    Irixion

    Member Member
    So on an unrelated note, why are SADX model mods so damn hideous? Why can't we fix the awful looking hands? Is it because we haven't cracked the animation format?
     
  20. MainMemory

    MainMemory

    Every day's the same old thing... Same place, diff Tech Member
    4,269
    0
    16
    SonLVL
    There's really nothing to "crack" in the animation format, the SDK spells it out for us. The reason the hands are difficult to replace has nothing to do with animations though, it's because of the game's vertex welding, a feature which allows the game to merge different parts of the model together to remove seams. We have a general idea of how vertex welding works and can edit it to work with new models, but the knowledge to do so is not widely available, and it requires using custom C++ code and manually counting vertices in the models, which not everyone can do.

    The Dreamcast Characters mod, for example, has ported the welding data from the Dreamcast version.