My thoughts on NVIDIA’s RTX Remix video and SADX mods + request to the developers of SADX RTX mods

If you’re into SADX modding, you’ve probably seen this video by NVIDIA showcasing modded SADX, the announcement of a “$50,000 RTX Remix Mod Contest”, and probably some of the drama that ensued.

At first, I was really happy to see SADX featured, it’s even right at the start of the video! Unfortunately, with regard to Sonic Adventure/DX, the video does a great deal of misrepresentation, a lot of work showcased in the video is uncredited, and the intentions of the people behind the RTX mods/hacks for SADX are questionable to say the least.

Which game is actually used in the video?

Let’s start with the video itself. Here’s a still frame from the beginning of the video. What does this look like?

If you’re aware of the differences between Sonic Adventure ports, you can easily recognize this is SADX PC with the Mod Loader. Even if you aren’t familiar with the differences between Dreamcast and DX Emerald Coast, the dead giveaway is Sonic’s pose, which he doesn’t use normally. It appears to be Sonic’s “skidding on slope” animation (or an edit of it), which can be seen in the Autodemo prototype, where Sonic’s Light Speed Attack worked differently. To get Sonic to display this animation, his action ID needs to be changed in the player data structure. This can be accomplished with Cheat Engine if you are familiar with the game’s internals and know the exact address, but the most likely way they did it was by using the “Event Animation Editor” feature of Speeps’ Meme Maker mod. The camera zoom-in could’ve been done manually or with Meme Maker’s Camera Editor. Among other mods it is obvious that the video used Dreamcast Conversion (but without Lantern Engine) and some kind of Sonic model mod based on the SA1 Dreamcast Sonic model (previously Kaori claimed it was their model, but later retracted the claim). None of the above are ever mentioned or credited in the video.

In the part of the video where “Sonic Adventure Remixed” is showcased, it is clear that Dreamcast Conversion is still being used because you can see the vertex distortion effect on the ocean waves from the Dreamcast version.

This effect was removed in SADX, and a slightly edited version of it is restored in the Dreamcast Conversion mod. I talk about this effect on the Dreamcastify blog.

What is “Original Game”?

So, with the above we’ve established that the version of the game shown in the video is definitely using the Mod Loader and various mods. Next, let’s have a look at the snapshot below.

At the bottom left, it says “Original Game”, which is a gross misrepresentation. If they mean “Sonic Adventure DX” as the logo on the top left implies, there is no way this would qualify as the “original game”. To start with, not a single version of Sonic Adventure DX uses the Dreamcast version’s ocean textures in this level. So “Original Game” is actually the 2004 PC port of Sonic Adventure DX modded with the SADX Mod Loader and the Dreamcast Conversion mod (and likely some kind of texture upscale mod), at the very least.

Another thing I find particularly unfortunate is the way the lighting is misrepresented. It looks fullbright in the “Original Game” part of the video because the Lantern Engine mod was disabled. One of the major differences between Dreamcast and DX level models is that the DX models have baked-in vertex colors to compensate for the removal of Lantern Engine. The Dreamcast levels, on the other hand, do not have vertex color data. As a result, if you don’t use Lantern Engine, there will be no lighting on Dreamcast levels among other things. That’s one of the reasons this warning appears when you start the game with Dreamcast Conversion but without Lantern Engine:

Yes, I know they had to disable Lantern Engine because it’s not compatible with RTX Remix. That’s no excuse for failing to represent either version of the game, especially since they have graphical differences, which are the main point of comparison in the video! Whether or not that was intentionally misleading or just someone’s lack of competence, I don’t know. But if you want to know what “original game” looks like, here it is:

Here’s a link to the MP4 file if the video doesn’t play.

Just a reminder: this is the actual product that was released for PC as “Sonic Adventure DX” in 2004. Looks a bit different without the Mod Loader, doesn’t it? Many people don’t realize or just take for granted the work we did in the Mod Loader over the years to fix various issues in the game. The original port doesn’t even set the window size correctly on 16:9 screens in windowed mode, not to mention the low precision Z-Buffer and lack of mipmaps. The Steam version has some of these issues fixed (adding a whole bunch of its own), but it isn’t compatible with the Mod Loader and, since it doesn’t use a fixed pipeline renderer, it isn’t compatible with RTX Remix in the first place.

To sum up, I think it’s an unfair comparison. Part of me wants to believe the video was made in good faith, so here’s how I think this part could’ve been done better:

  1. They could’ve compared against the original Dreamcast, Gamecube, PC (2004 or Steam) version of the game without hacks or mods, with clear indication of what version of the game is used.
  2. If they had to use the modded 2004 PC port, they could’ve disabled Dreamcast Conversion for a more accurate representation of the 2004 PC port.
  3. If they had to have Dreamcast Conversion enabled, they should’ve recorded the “Original Game” part with Lantern Engine. Of course, even with that the “Original Game” bit is questionable, but at least they wouldn’t be mixing Dreamcast levels with SADX PC lighting, so it would be closer to the Dreamcast version, which is the “original game” after all.
  4. Instead of “Original Game”, it should’ve said “RTX Off”, which is probably what they meant to say anyway.
  5. The developers of the Mod Loader and all the mods that appear in this video should’ve been consulted with beforehand, and a list of used mods and tools should’ve been included in the video or in its description, ideally with proper credits.

The last point in particular is really unfortunate because the developers of the RTX mods are credited at the end of the video, but nobody else is. Which brings me to the next thing I want to discuss.

Is it okay for a corporation to use uncredited fan work to promote their product?

Let’s look at some simple facts:

  1. NVIDIA uploaded a video showcasing various RTX Remix mod projects for different games, which include RTX mods for Sonic Adventure DX.
  2. The Sonic Adventure DX part of the video showcases the “Sonic Adventure Remixed” project, which uses the Mod Loader and Dreamcast Conversion (and possibly other mods) as dependencies. In addition, the “Original Game” part of the video misrepresents the original game by using a modded version with the Mod Loader and a mismatched mod set.
  3. The developers of the Mod Loader and mods, including Dreamcast Conversion, are not credited in the video, and there was zero communication from NVIDIA or the developers of “Sonic Adventure Remixed” with us regarding the use of our work in the video.
  4. The video is a promotion for a “$50,000 RTX Remix Mod Contest”.

Overall, I think it’s really bad taste and a misrepresentation of both the game and our work.

Is it okay for “Sonic Adventure Remixed” to take part in NVIDIA’s contest?

I have seen some of the strangest tweets and comments on this matter, so let me clarify several points I thought were obvious:

  1. I do not claim ownership of original SA1 Dreamcast assets. I also do not claim ownership of the ideas, bug fixes or concepts implemented by me in Dreamcast Conversion, the Mod Loader or any other SADX projects I’ve been involved in.
  2. Needless to say, our work, including mine, involves Sega’s copyrighted assets and code, and it cannot be used in any commercial project in principle. From the legal point of view, we are at Sega’s mercy entirely, and it’s extremely generous of Sega to allow our projects to exist at all.
  3. I do not have the legal right to prevent people from using my work.
  4. At the same time, I feel like I have a reasonable moral right to request for my work not to be used in contests with monetary awards, or in promotion of other products.

I have seen people say things like, “funny how these modders who use Sega’s stuff without permission are so protective of their mods when the same thing happens to them”. In my case at least, I don’t mind if someone uses Dreamcast Conversion or the Mod Loader as a dependency. I have a problem when my work is used in another project where money is involved in any capacity.

Because of the Mod Loader’s accessibility, many people seem to think Sonic Adventure DX is easy to hack and mod. Perhaps Dreamcast Conversion is just copying some files to replace SADX models and textures with their Dreamcast counterparts from the Dreamcast version so it isn’t even worth crediting? For anyone who thinks so, I encourage you to have a look at the unmodded PC version of SADX and a GDROM rip of the Dreamcast version and see if you can figure it out. Years of research engineering and tool development by dedicated enthusiasts went into these mods and tools, and taking this all for granted is an insult to all the work that was done over these years.

For Dreamcast Conversion, you can get some ideas from the Dreamcastify blog, but there’s much more work behind the scenes. I’m tired of talking about this for so many years. If someone can make the PC version look like the Dreamcast original or better WITHOUT RELYING ON DREAMCAST CONVERSION – more power to them, and feel free to use the documentation on the Dreamcastify blog! In fact, I will be happy if someone makes a better alternative. For now, though…

Request to the developers of Sonic Adventure DX RTX mods (and anyone else with similar ideas)

If you intend to get involved in any commercial projects or participate in contests with monetary awards, please rebase your work to not use Dreamcast Conversion as a dependency. I would like to make it clear that I am not affiliated with NVIDIA or any of Sonic Adventure DX RTX projects. Dreamcast Conversion is a strictly non-commercial fan project, and its usage in the RTX Remix video was done without prior consent. I do not consent to entering any of my work in contests with monetary awards, as dependencies or otherwise.

SA1 analog drift fix, release of Dreamcast Image Builder, Autodemo research and more

It’s been an eventful couple of months, so there are several things I’d like to talk about today.

New version of the SA1 analog fix

You may have heard of the analog deadzone fix for SA2 DC by OnVar. I was looking at input code in SA1 and found many similarities, so I made a request to woofmute, who successfully ported OnVar’s fix to SA1. The fix is available for the US version (1.005) and the Autodemo. I’m not sure whether the issue is addressed completely or if the fix has any side effects, but it appears to work and it’s definitely better than my old hack, so I suggest you give it a try.

The fix injects custom code into 1ST_READ.BIN. The patched bytes for the US version are as follows. With some patience you could turn it into a very long CodeBreaker code…

;Input function hijack
411e2=0ce0f6f3f5f34c8925c708f235f2488908a10ce0

;Input Patch block 1
41284=20e0f6f304c708f2f5f3b28935f2b08920e0b6aff7ff

;Input Patch Orig code reposition
41406=f7ff20e0f4aef6f3

;float for block 1
4129c=000040c5

There are two ways to get the patch:

  1. If you have the TOSEC GDI of SA1 US 1.005, you can apply an xdelta patch to track03.bin. It works the same way as the SA2 patch in the description of the video linked at the top of this post, so you can use the video for reference.
  2. To apply this fix and more, you can use the new Dreamcast Image Builder that I will talk about in the next section. The Autodemo version of the fix is also available for Dreamcast Image Builder.

Release of Dreamcast Image Builder

This is an update to SA1-DC-HD, a project that originally started as a helper tool to add various enhancements to SA1 DC for playing on the flycast emulator. The project has grown to become a universal patcher for Dreamcast games.

As you can see, it’s heavily inspired by the SADX Mod Loader/Mod Manager and uses the same concept of “mods” to add hacks to games. Of course it’s a lot more limited than the actual Mod Loader, but you can do neat things with it. For example, to test its capabilities I made a mod that replaces Deer with Sheep from SA2:

(Chao body parts not implemented yet)

You can check it out here. All mods from SA1-DC-HD are built-in, so you can use it right away. The wiki explains how to use the tool and develop mods for it.

New Autodemo research

You may have seen new videos uploaded by Speeps and woofmute which demonstrate various debug features of the Autodemo and levels that didn’t work before, such as Casinopolis. This was made possible thanks to the research done by Speeps, woofmute and other members of x-hax, as well as previous research by evilhamwizard, ItsEasyActually, supercoolsonic and others.

As you may know, parts of the Autodemo come from different builds of the game that were at different stages of development. When the Autodemo was put together, only the levels that were meant to be shown in the demo were recompiled, and the other levels were left over from older builds (for most of these, textures and lighting files were also missing). We can tell which binaries were recompiled by looking at file dates on the Autodemo GD-ROM:

15.10.1998 - binaries that boot without hacking

STG01 (Emerald Coast)
STG04 (Speed Highway)
STG05 (Red Mountain)
STG08 (Ice Cap)
STG10 (Final Egg)
ADV00 (Station Square)
ADV00OBJ (Station Square objects)
ADV0100 (Egg Carrier Outside)
ADV0130 (Egg Carries Inside)
ADV01OBJ (Egg Carrier objects)
AL_GARDEN00 (Station Square Chao Garden)
AL_MAIN (Chao)
B_CHAOS2 (Chaos 2)

07.10.1998 - binaries that don't boot without hacking

AL_GARDEN01 (Egg Carrier/Beta Windy Valley Chao Garden)
AL_GARDEN02 (Mystic Ruins Chao Garden)
AL_RACE (Chao Race)

24.09.1998 - binaries that don't boot without hacking

STG00 (Test stages)
STG02 (Windy Valley)
STG03 (Twinkle Park)
STG06 (Sky Deck)
STG07 (Lost World)
STG09 (Casinopolis)
ADV02 (Mystic Ruins)
ADV02OBJ (Mystic Ruins objects)
SHOOTING (Sky Chase)
MINICART (Twinkle Circuit)
B_E101_R (E-101 MK2)
B_ROBO (ZERO)
B_EGM1 (Egg Hornet)
B_EGM3 (Egg Viper)
SBOARD (Sand Hill)
B_CHAOS0 (Chaos 0)
B_CHAOS4 (Chaos 4)
B_CHAOS6 (Chaos 6)
B_CHAOS7 (Perfect Chaos)

You can see that there are three “sets” of files sorted by last modified date. The files that don’t boot were compiled against an earlier version of the game’s main binary (1ST_READ.BIN), so the pointers to functions and data in the main binary are all invalid in these files. However, it’s possible to find the functions and data they were meant to point to by comparing the pointers to known functions and data between these files and the files that boot.

Earlier work on this, which demonstrated partially functional Windy Valley and Sky Deck, was posted by evilhamwizard on Sonic Retro. More recently this was picked up by Speeps, who started putting together a list of known broken pointers and their correct counterparts. As the pointer list grew, more levels became functional when known pointers were replaced. To facilitate mass pointer replacement and game testing, I added Autodemo support to my SA1-DC-HD project (now Dreamcast Image Builder). As we were experimenting with the Autodemo, I adjusted the image builder’s mods system to be more flexible and easier to use and converted (together with woofmute) Speeps’ modifications into mods for it. I also repurposed some of my previous work to find missing textures by matching the names in the Autodemo’s texture lists against textures in the final version, the E3 build, the Autodemo Windy Valley mod for the PC version (where missing textures were recreated by its developers) and Dreamcast SDKs (which surprisingly have some early SA1 textures).

As a result of this combined effort, we got the game to show stuff that was never seen before. For example, here’s a preview of the old version of Chao Race restored by Exant:

Or a very early version of the Mystic Ruins:

Or woofmute’s restoration of the debug object placement editor:

Or a super early version of Twinkle Circuit:

Of course, you also have Speeps’ near-complete restorations of Twinkle Park, Lost World and Sky Deck. The biggest restoration so far is the early Windy Valley, the holy grail of the Autodemo for many SA1 fans. It’s based on Speeps’ and evilhamwizard’s pointer fixes and uses textures from the 2018 PC mod by supercoolsonic & ItsEasyActually.

There’s a lot more stuff released and in progress. We now have a public repository with some Autodemo mods, which you can apply with Dreamcast Image Builder to get the restored functionality and content ingame.

Note: Not all of the mods work on hardware at the moment. flycast is recommended.

Discontinuing HD GUI

This is a quick note to let you know that I will no longer provide updates for the HD GUI mod. The repository has been archived. If you are interested in continuing the mod’s development, feel free to unarchive it and/or make a fork of it.

The fascinating Korean version of SADX PC and release of the Korean mod

TLDR version: There was a Korean version of SADX PC released back in 2004. I ported the Korean translation to the Mod Loader, so you can now play SADX in Korean if you install this mod. The mod is compatible with Dreamcast Conversion and Dreamcast DLC but incompatible with HD GUI.

Four years ago I got my hands on a somewhat rare version of SADX PC. I was completely unaware of its existence until I accidentally ran into a listing on an auction, so I got it right away. I’ve mentioned it before in a previous post, and today’s mod release brings the occasion to finally talk about it again.

Introduction and game package

This version was released in July 2004 in Korea by a game and toy company called Sonokong. It’s a complete Korean translation of the game with English voices. The game comes in a box with a fully translated manual, which is also in color! It looks a lot better than black-and-white Japanese and US manuals I’ve seen until now. Here are some pictures of the box, the discs and the manual. Please excuse the poor picture quality, maybe someday I’ll get to scanning these properly.

Installation and initial testing

Just like the US version, the game comes on two CDs. The simple CD check is also the same, so you can install and run the game on Windows 10 and above, unlike the Japanese version which no longer works because of SafeDisc. With the Korean version, you can pass the CD check even with the US version’s CD 2.

The autorun and the installer are also fully translated.

I can’t comment on the quality of the localization since I don’t read Korean, but I can say for sure a lot of work was put into it. Unlike French, Spanish and German translations that come with the US and Japanese versions, this one translates not only all textual data, but also all menu textures, the title screen and the main menu background. But the most impressive part is the Korean font used for subtitles and Chao Garden messages. To my knowledge, this is the only official release of SADX that introduces both asset and programming changes to accommodate a language that wasn’t in the original game. It’s also executed in an interesting way, which we will get to a bit later.

As amazing as this version is, it’s still the 2004 PC port of SADX at its core, so the game has terrible graphics with no mipmaps, broken windowed mode at non-4:3 resolutions, poor music quality etc. It’s pretty hard on the eyes, especially in motion.

(From now on, I’ll be using screenshots from the US version with the Mod Loader and the Korean mod)

Korean localization and option menu differences

Korean text replaces Japanese in this version. English text is also available, although the title screen and the main menu background will always use the Korean versions of the textures. The game doesn’t let you pick Japanese voice language, so only English voices can be used. Interestingly enough, Japanese voices are still included with the game: it just doesn’t show the voice language setting in the options menu and overrides the voice language variable with English as soon as a save file is loaded. However, before a save file is loaded the game still plays the “Select a file” voice from the Japanese voices folder. To work around it, the developers replaced that voice with its English counterpart. The rest of the Japanese voices are untouched.

I’m not entirely sure, but I think such elaborate workarounds to make sure no Japanese is heard in the game may have had something to do with Korean laws regarding Japanese media, which were stricter when the game came out.

Funnily enough the texture for the option was still translated, so when you use the mod on the US version with the Mod Loader, you can select Japanese voices as if the option was intended to be there originally (although it says “Korean” instead of “Japanese”). You can also select other languages for text (not sure if you’d really need to if you’re playing this!), which the Korean version doesn’t let you do.

The localization has everything you’d expect, including character tutorials, Mini Game Collection etc.:

Reverse engineering the Korean font

The implementation of the font used in the last two screenshots is intriguing. What caught my attention initially was the large size of the FONTDATA0.BIN file, which is used for Japanese characters in the original version (1.72MB vs 759KB in the original). My first guess was that they either replaced Japanese characters with Korean ones, or added them to the end of the file with the IDs matching the Korean codepage 949.

I started inspecting the file in SADXFontEdit in SA Tools. As expected, this file contains Hangul characters used to display Korean subtitles and Chao texts. However, apart from those, the file also has some characters from other languages, including Greek, Russian, Chinese and Japanese, which amounts to a total of 20609 characters (for comparison, the original file used for Japanese has only 8836, and almost all of those are Kanji, although Cyrillic and some other characters are present as part of the Japanese codepage). On top of that, soon I realized that character IDs stored in the file matched those of the codepage 1200 (UTF-16).

Yes, you read that right. In the Korean version of the game the subtitle font is an actual Unicode font. Although it only supplies specific blocks of the Basic Multilingual Plane, in theory you could add back the other blocks to implement any language included in the plane. Back in 2020 when I first discovered this, I updated SADXFontEdit with some new functionality, including support for the Unicode layout, so when you select the correct codepage you can see the matching character next to its ID.

As we know, the US and JP versions don’t support Unicode, so how does this work? The game’s dialog texts, menu prompts etc. were compiled into the game as strings encoded with the Korean codepage 949, not Unicode. However, when the game processes text data to create a subtitle texture, it parses the characters and assigns them Unicode IDs to be used to pick graphics from the font data you see in the screenshots above.

This was where I ran into an issue I didn’t understand at first. When I first ran the game, it would either display garbage text in place of subtitles, or just crash. That was how I found out that the Korean version required the system locale (language for non-Unicode programs) to be set to Korean for subtitles to render properly.

If the game already knows it’s converting Korean to Unicode, why does it need that? Eventually I found the answer when I was looking at the game’s font related functions in the disassembly that I quickly cobbled together. The Korean version uses the function MultiByteToWideChar to convert “C strings” (in this case Korean strings in the local codepage) to UTF-16 “wide strings”. It’s an interesting solution considering that other versions have a custom function to parse characters and assign font IDs to them.

So why does it fail when the system locale isn’t set to Korean? The developers call the function with the default first argument (0), which takes the current system locale as the source codepage. As a result, Korean text is converted to Unicode as if its original codepage is whatever you have set as the language for non-Unicode programs. If the developers of the Korean version set the first argument of MultiByteToWideChar to 949, the Korean version would display subtitles correctly on any system regardless of the locale. I think a lot of people would’ve never caught this issue because the game was meant to be sold only in Korea. Anyway, we can fix this on the mod’s side.

Implementing code differences

With such changes to the font system, simply replacing FONTDATA0.BIN in a mod wouldn’t make the game support Korean, and a bunch of hacks had to be done first. One thing to do was to introduce calls to MultiByteToWideChar before letting the game parse text data. As I didn’t know the stuff I explained in the previous paragraphs, it took me a while to realize the importance of these calls, and my initial attempt to get the game to display Korean text correctly were unsuccessful. I gave up on the mod for a while, and it was only this month that I gave it another try and figured it out. Another necessary change was in the function that maps character IDs to bitmap data in the font file. There were overrides for , and , but other than that it was pretty straightforward.

I put together a DLL mod that replaces three text-related functions, then I replaced one Japanese hint message in Emerald Coast to test it. The Mod Loader used a hardcoded codepage for strings that are normally in Japanese, so I added global codepage overrides for all languages, which can now be used by other mods.

At first I wasn’t sure how far I could go with this, but when I finally saw the Mod Loader display Korean text, making a Korean mod started looking feasible. I was also driven by the technical challenge and the uniqueness of this version of the game, support for which required several changes to our tools, which I was happy to implement.

Extracting and importing Korean text

Speaking of technical challenges, obviously I had to somehow extract all Korean text from the game and put it into the mod. Finding it all manually was out of the question, which was part of the reason I gave up on the mod last time. However, after my experience with matching assets between different versions of the game, I was tempted by the idea of automatic splitting. Since the game still has English text, it’s possible to scan the EXE to find it, and then work up the structures to get to the start of each item. There were three types of data that had the largest amount of text: cutscene text, Tikal hints and multi-language strings such as character unlock messages, menu prompts etc. I put together a program to make the task easier. Basically it created an INI file for SA Tools’ split tool to extract the text from the Korean EXE. Of course some manual tweaks were required to ensure all addresses were correct, but the program did most of the tedious work. Cutscene text in particular required almost no touch-ups because I made it verify the text in other languages to ensure it’s the same entry in both games.

Building a mod from this data in SA Tools was a challenge. I had to add custom codepage support and fix a few bugs, but mod building in the tools is more stable now and the end result was worth it.

At this point I ran into an issue many retranslation mods had to deal with. There was some text in the game that wasn’t supported by the Mod Loader and/or the SA Tools at the time. It’s still possible to replace such text in a DLL mod, but I wanted all text replacement to be done via the Mod Loader’s INI-based system, so I had to do some work on the tools again. I added support for the following data types, which can now be replaced in mods without code:

  • Tikal hints that show up after you die on a boss. These are different from the hints you see in stages, and they’re stored in different ways depending on the boss, so I had to improvise a bit to make them rippable in the tools and replaceable in the Mod Loader.
  • Mission descriptions for Mission Mode.
  • Mission Mode tutorial text.
  • Single language strings, such as unlock prompts for Game Gear games or Metal Sonic. I added them to the SA Tools a couple years ago but not to the Mod Loader.
  • Multi-language strings, such as character unlock messages or “Welcome to Twinkle Circuit!”. Same as above.

Implementing Chao texts

With all that in place, all Korean text in the game was finally transferred. There was one big obstacle remaining: Chao texts. Although it loads the same font data, the Chao text system in SADX uses completely different code from the system used by subtitles and menu prompts, probably because it was copied from SA2B and duct taped with the SADX font system. So I had to do the same thing I did for the subtitles for the Chao text functions. This was probably the most difficult part of the whole mod. The functions involved with SA2B text were all difficult to hook, and even when I managed to replace them correctly I would only get crashes. It took me a long time to get a working decompilation of the functions that convert strings for the SA2B system. I’d like to thank Kell for a decompilation of these functions in the US version, which I used for reference.

Interestingly enough, the Chao system also uses wide strings internally, but all text is stored in the Japanese codepage, or Korean in this case. The game performs conversion from C strings to wide strings just the same, but the Korean version uses MultiByteToWideChar again instead of the simple parsing function used for Japanese in the original version.

After many hours of debugging I finally figured out the error in my decompiled code that was related to finding character data. In the pseudocode I got by decompiling the Korean version, the cell ID of the character data in the font was calculated by adding 0x776A to the character ID, which made it go out of range. The sign had to be flipped to make it subtract 0x8896 instead. After I fixed that, the text started working.

Now the mod was ready for testing. Out of curiosity I tried it with Dreamcast Conversion and realized that the Dreamcast Chao Garden hints were missing. Luckily they were translated in the Korean version, so I added them to SA Tools, made some changes to DC Conversion to make it more compatible with mods that replace them, and reimported the translated hints. I was happy that even the normally unused Dreamcast hints were translated.

Mod download, compatibility and conclusion

SA Mod Manager 1-click install
Manual download

The mod is compatible with Dreamcast Conversion, but with a few quirks. Since there are no Dreamcast menu textures in Korean, Dreamcast Conversion’s replacement of some GUI textures will be undone by this mod. This is a quick fix, and I might update it with proper compatibility eventually. There may be bugs in the mod, particularly crashes. Please send me crash dumps if you run into any.

For obvious reasons HD GUI is incompatible. If you’re interested in making HD Korean textures and an HD Korean subtitle font, please let me know.

This is the first translation mod that works by replacing the Japanese font, and the first to modify font-related code. I hope this release attracts more Korean players to SADX modding and helps other translation mods. I also think it’s truly amazing that after all these years of research and reverse engineering there are still new things about this game waiting to be discovered.

The mod’s source code is located here.

SADX Mod Installer update

The SADX Mod Installer was discontinued back in 2022. However, with the arrival of the new SA Mod manager and retirement of the original SADX Mod Manager I felt it was necessary to update it. Many people are still using it, and Linux/Steam Deck tutorials seem to rely on it. Although I want to retire the installer as soon as possible, I made the following update to make it easier for people using it right now:

  • If you’re running Windows 7 or above, it will install the new SA Mod Manager (auto picking x86 or x64). If you’re running Windows XP, it will install the legacy SADX Mod Manager.
  • .NET 7.0 Desktop (x86 or x64) is installed automatically on Windows 7 and above.
  • The installer was made compatible with Windows XP. All tools, including Steam conversion, are completely functional on XP. Online functionality will not work on XP and 7 due to outdated certificates, but it might work if the system has correct certificates.
  • The Steam conversion process has been altered to rely on patches. Now the installer doesn’t supply the EXE or DLLs from the 2004 version, instead it patches the Steam version to turn it into the 2004 US version using a 5MB diff file. This was made possible thanks to HDiffPatch. Best Buy, EU original, Sonic PC Collection and Korean versions of SADX are also patchable.

The installer still doesn’t support the new configuration format introduced in the new Mod Manager, and I think it will probably stay that way. However, the new Mod Manager picks up the old format settings generated by the installer so this should be no problem to the players.

At some point in the future the new Mod Manager will handle the Steam conversion, and the installer will no longer be necessary. Some of its features will be implemented in the new Mod Manager or through other means: for example, Guide Mode could be done as a web page with 1-click install links.

Native Steam savegame support in SADX 2004

Previously you had to use BetterSADX or the SADX Mod Installer to transfer savegames to the 2004 version, but soon it will be possible to load the Steam version’s saved games in the Mod Loader. You will be able to load files directly from their original location, so no transfer is required whatsoever. If you play a Steam saved game in the modded 2004 version, the original Steam version will also be able to load it, so you can play the same file on both versions. The Chao Garden save is also supported: if you load a saved game located in the Steam folder, it will use the Steam version’s garden file. As you can see in the screenshot, custom filenames (ANSI/English only) are also possible, so your saved games no longer have to be named “SonicDX??” for the game to recognize them.

The format used for saved games is almost identical between the two versions, but there are a couple differences that make them incompatible. You can load 2004 saves in the Steam version if you rename them, but not the other way around. The files created by the Steam version are 16 bytes bigger (1408 bytes vs 1392 in the old port), and 12 of these extra bytes are used to store the file creation date and time. At the beginning of the file there is a checksum, and both versions use the same algorithm which calculates the checksum value based on the contents of the whole file. The reason the 2004 version won’t load Steam saved games is because the game only accounts for 1392 bytes when reading the file and calculating the checksum, which doesn’t match because it doesn’t include those extra 16 bytes in the calculation. The Steam version removes the checksum check on the file select screen so it recognizes saved games from the 2004 version, although the date and time might look wrong. When progress is saved in a file that originally came from the Steam version, the Mod Loader writes the current date and time into the file so it should display correctly in the Steam version as well.

Dreamcastify is back

Dreamcastify, a website that documents SADX downgrades, was having some technical issues throughout the last two years. Some video comparisons that were hosted on Youtube were taken down, and after a WordPress update the pages didn’t load properly and many images were missing. I reworked all pages so that they load again and made the following changes:

  • All video comparisons are now hosted on the site itself.
  • The pages display smaller JPG images by default, and a full-size PNG version of each image can be seen if you click on the preview. This made the site much more responsive.
  • There were some minor text edits (mostly wording) and some info updates regarding mods and emulation.
  • The feedback section was removed. Sorry, I don’t have the resources to read all of the comments. I haven’t looked at the newly arrived 850+ comments for about 3 years now, and from a quick glance they seem to be just spam anyway.

This is likely the last update to the site for the observable future. I was originally going to take it down because I didn’t have interest in updating it anymore, but then I thought it should be left online as a source of information, so I took a weekend to sit down and fix it for good, as well as rewrite some things.

I’d like to thank KGL for getting the initial editing and format updates done.

Introducing SADX Gamecube Project + Overview of differences between SADX PC and Gamecube

Today I’d like to introduce a project I’ve been meaning to start for a long time. Gamecube Project is an ongoing attempt to research the differences between PC (2004) and Gamecube versions of SADX, and implement them as a mod for the PC version. While this mod will be nowhere near as ambitious and fast-progressing as Dreamcast Conversion, I’d like to release the first version of the mod to get started.

Download

Download (SADX Mod Loader 1-click install)

(This mod isn’t compatible with Dreamcast Conversion. You can’t load both mods at the same time).

Although I’ve been contemplating it for a while, there were many technical difficulties in getting this off the ground. Here’s a list of steps we’ve made over the years before this project could exist:

  • SonicFreak94 developed a mod that makes the lighting in SADX PC more Gamecube-like. I made an experimental fork of this mod with some attempts to improve accuracy.
  • Exant and hesoyaam figured out REL file compression in the final version of SADX GC, and I integrated it into SA Tools.
    Edit: It was pointed out to me that this post doesn’t mention that REL compression was figured out by RikuKH3 first. This is indeed true. REL compression was first figured out by RikuKH3, who got a commission to make a tool to decompress REL files for a Russian translation project. Since RikuKH3’s tool was closed source, we needed a better long-term solution for SA Tools. The SACompGC library linked above is based completely on decompiled code from the Gamecube version of SADX. However, the Russian translation mod also included a hacked DOL file that bypassed compression to enable the game to load uncompressed REL files. Exant compared that hacked DOL file with the original to find the relevant code to decompile.
  • I did some initial research on GCAX soundbank formats used in Gamecube versions of SADX, SA2B, Heroes, Shadow and Billy Hatcher.
  • I mapped out the data in SADX GC (with contributions by End User) and created a template for SA Tools to be able to extract it.
  • To make a direct comparison possible, I matched up the data with filenames we got from X360 symbols like I did earlier with the PC and DC versions.
  • I wrote a comparison tool that lists differences in levels and models and generates C++ code to patch the PC models to match the GC version. This patcher was first used in Dreamcast Conversion, but it was originally developed for Gamecube comparisons.
  • Exant, Kell and I implemented support for Gamecube GVM files in the Mod Loader.

The last one in particular addressed a major roadblock because I wanted to use original GVM textures rather than texture packs. Thanks to Exant and Kell it is now possible.

Now let’s discuss the actual differences between SADX PC and SADX Gamecube. Unlike the Dreamcast version, there are no major design differences, and most of the changes can be explained by technical factors rather than artistic choices. Some differences are easier to notice while others are more subtle, but I’ll try to cover all of them.

Lighting

The lighting in the Gamecube version often looks pretty different from the PC version. There are several reasons for these differences:

  1. While both versions use the same format of lighting data, the PC version uses that data to set up Direct3D lights, while the Gamecube version uses a custom lighting formula that applies diffuse lighting last, which makes the environments look more vibrant.
  2. For character and object lighting, the Gamecube version generates palettes and applies them per-pixel, while the PC version uses only some of the values to set up Direct3D lights, which look different either way. The Gamecube version uses the ambient value, two colors for diffuse and two colors for specular to generate the palette, while the PC version only uses the ambient color and one specular color.
  3. The PC version uses a high multiplier for specular lighting, which results in an even more “glossy” look than in the Gamecube version, which was already “glossy”. Also, specular lights in the PC version are set up as view-dependent (they move when the camera rotates), while on the Gamecube specular is view-independent (stays in the same place regardless of camera rotation).
  4. The renderer in the PC version ignores built-in vertex colors for object models. A fix for this was introduced in the Mod Loader.
  5. Although the lighting data format is the same, values for several levels in the PC version were edited to make the lights brighter. This washes out the lighting even further and makes areas look almost fullbright. Simply importing lighting values from the Gamecube version into the PC version (as done by the Gamecube Project mod) even without changing the underlying system makes night lighting in the Mystic Ruins much more convincing.
GamecubePCPC with Gamecube values

SonicFreak94 has made a mod that recreates parts of the Gamecube lighting system in the PC version. At the moment character lighting is not accurate and some stages still look a bit different. I’ve made a fork of this mod in an attempt to improve accuracy, and some stages look closer to the Gamecube version, but others are still different. I’ve also tried to use more values to improve character and object lighting, but since it relies on the same same formulas as the old Direct3D lights, it doesn’t look accurate to the Gamecube version. Still, I think the work that went into the mod is important progress towards fully replicating it in the PC version eventually.

Some special effects

The PC version has some bugs that prevent certain effects from working properly. The Dreamcast and Gamecube versions had bubbles moving inside Chaos’ body, but in the PC version they are static. This is fixed in Dreamcast Conversion and Gamecube Project.

Material colors

The renderer in the Dreamcast and Gamecube versions ignores material colors in most cases (Chao models use them in the DC version though), while in the PC version it converts material colors to vertex colors. This results in unintended tinting of some models. For example, the clouds in Red Mountain are supposed to be white, but the PC version makes them gray:

GamecubePC

I added a fix to the Mod Loader that makes material colors in all models white, so this issue is no longer relevant.

Textures

The PC version uses the same texture format as the Dreamcast original, while the Gamecube version uses a different texture format. Both formats have their strengths and weaknesses, which makes some textures look better on GC, although generally the DC version has the sharpest textures and the PC version has the worst quality textures. Here are some examples featured previously on the Dreamcastify blog:

There are some exceptions though, for example here’s a texture from the character select screen:

DreamcastGamecubePC
Here you can see that the Gamecube version has severe quality degradation, while Dreamcast and PC look the same.

On the other hand, there are several textures on the Gamecube that are sharper than on the Dreamcast. We could only find a handful of these among thousands, but they do exist:

Unfortunately we can’t pick the best quality version of every texture from all versions because many textures in SADX were edited or replaced. Sometimes it’s a simple color edit, other times it’s based on the same source material but composed differently, and sometimes it’s a completely different texture. Here are some examples:

Top is Dreamcast, bottom is Gamecube

The Gamecube Project mod puts back almost all Gamecube textures in the PC version, so if the PC version has a better quality texture there will be a quality regression. However, most of the time Gamecube textures are higher quality than PC textures.

Another difference with textures is lack of mipmaps in the PC version. Although the Mod Loader now generates mipmaps automatically for textures that don’t have them, the original PC port looked pretty terrible without them:

Textures in the Gamecube version have built-in mipmaps so the environments look much smoother in the distance.

Finally, the PC version introduces mirroring for some textures instead of relying on models’ UVs and material flags, which reduces texture resolution. The Dreamcast and Gamecube versions don’t have this, so their textures are higher quality.

Levels and models

Although they look similar enough to be mistaken as identical, many levels and models in the Gamecube version are different from the PC version as far as their data goes. There are three main reasons for these differences:

  1. Models that use mirrored textures have had their UVs and material flags adjusted in the PC version.
  2. Some levels have a different model order, and sometimes the PC version has extra models in the level. Most of the time this has to do with the addition of the detail (clip) setting in the PC version, which is used to make certain items invisible to improve performance. There are also other adjustments related to transparency sorting, which was possibly different on the Gamecube.
  3. There were some texture ID bugs in the Dreamcast and Gamecube versions which the PC version fixed. For example, E-102 Gamma’s Laser Blaster upgrade in Egg Carrier’s water reservoir room was changed to use correct textures.

While points 2 and 3 are fine to leave as-is, models in the PC version need to be patched to look correct with Gamecube textures. This is one of the things the Gamecube Project mod does.

Menus, fonts and branding

The Gamecube version uses the same subtitle font as the Dreamcast version (though it draws a bit differently), while the PC version switches to a different font:

Top: Dreamcast, middle: Gamecube, Bottom: PC

The Pause menu has a controller configuration section on PC, which the Gamecube version doesn’t have. The quit confirmation prompt only responds to the A button on the Gamecube, while on PC both A and Start buttons can be used.

The Gamecube version has Nintendo copyright text on the title screen and images of the Gamecube controller and buttons in menu screens, while the PC version has keyboard images. The save icon in the Options menu is also different, and the arrows have a bouncing animation on the Gamecube. The Gamecube Project mod restores the save icon animation, controller images and button prompts, as well as the copyright text (at 640×480 only). The fonts will be restored at some point in the future.

GamecubePC

Chao

The Gamecube version has GBA connectivity features that are disabled in the PC version (maybe we’ll try to restore that someday?). The model used by the Chao Transporter/Name Machine and its textures were changed in the PC version to remove references to Chao Adventure and GBA-related branding. The PC version also removes the Party Race option in Chao Race, so your Chao can only compete against CPU opponents and not against each other. This is something I’d like to tackle in the Gamecube Project mod and/or Dreamcast Conversion someday.

Sounds, music and voices

The Gamecube version uses ADX music and voices, while the PC version uses WMA music and voices, which are lower quality. This is no longer an issue because the Mod Loader implements ADX support through the BASS library, and you can simply use the ADX Audio mod to get the best quality music and voices.

For sound effects it’s a lot more complicated. The Gamecube version uses a sequenced sound system resembling that of the Dreamcast version. It uses similar data structures and can have DSP effects, although its capabilities are largely unknown at the moment. The PC version doesn’t have anything like that, and uses simple WAV sound effects packed into DAT archives. Although I’ve done some work on getting data out of Gamecube soundbanks, getting them to work in the PC version isn’t feasible at the moment. However, if we figure out enough about the format, we may be able to convert (or record) sequenced effects to regular WAV files and use them in the PC version, like the Sound Overhaul mod does.

Also, the Gamecube version uses Dolby Pro Logic II for 3D audio, while the PC version uses DirectSound3D (the original Dreamcast version used QSound, a binaural 3D effect). While we may not be able to make it identical to either version, 3D sound implemented in the Mod Loader using the BASS audio library is a good alternative.

Fog

The PC version uses Direct3D fog formulas, and all stages are set up to use linear fog. In many areas the fog starts too close to the camera so it washes out details, and the game looks better with fog disabled or adjusted to use longer distances.

The Gamecube version uses different fog modes (linear mode, two exponential modes and two “backwards” exponential modes). The most common fog formulas used by stages in the Gamecube version are linear and “backwards” exponential. Since the exponential formulas are different in Direct3D (and the game uses linear anyway), fog calculation is completely different. In addition, we haven’t checked yet whether fog distances are different between versions (they probably are).

There are several ways to address these differences. The most accurate would be to restore original fog data and use Gamecube fog formulas in the GC lighting mod’s shader. Or, like with Dreamcast Conversion, fog distances in the PC version could be tweaked to look similar.

Water effects

This is perhaps the most visible difference between versions. The Gamecube version has multiple water effects. The distortion is the most obvious effect, but there’s more. Let’s have a look at all of them.

First, the distortion of the whole screen when the camera goes underwater. The surface map used for this effect is the texture called ind_2d in the archive OBJ_REGULAR.

Texture used for 2D distortion

When the camera is above water, there is also distortion of things under (and sometimes above) the water level. This effect uses the ind_3d texture in the same archive.

Texture used for 3D distortion

Often the effect applies to stuff that isn’t underwater, which results in an awkward look:

In fact, when the camera is far enough away from the water, the distortion effect is disabled, likely to reduce the occurrence of this issue:

However, even without the distortion effect the water looks much nicer on the Gamecube compared to the PC version. This is because there’s another effect applied to the water surface that the PC version is missing. The salt_tev02 texture included in texture archives for levels that have water is used as a surface map (possibly bump map) to make the water surface lighter or darker.

Texture used as a water surface map

By replacing this texture with a solid white color we can compare what the water looks like with and without the effect. When we remove the effect, the water starts to resemble the PC version a little bit:

Gamecube with bump mappingGamecube without bump mappingPC + Gamecube textures (no fog)

Without the effect, the water texture is always bright, which can be problematic because the water uses additive blending. If the water covers other bright objects, it gets a “neon light” or “acid” look sometimes. Thanks to the bump mapping effect, these issues are less noticeable and the water blends much better in the Gamecube version.

There are other differences as well: the moving pattern of the water surface is a bit more complex on the Gamecube, and the UVs make the water surface texture appear larger than on the PC version. Also, fog makes the water much brighter on PC, so I disabled it for the sake of comparison.

It should be possible to restore the zoomed-in look and movement patterns in the PC version, and depending on how the surface map is done on GC, it may also be possible to apply it as a bump map to make a similar looking effect on PC. Maybe you’ll see that in the mod eventually. Also, the distortion effect could be replicated on PC via shaders, possibly even without the artifacts that can be seen with the Gamecube implementation.

That’s all for now. I’ll post more findings on Gamecube stuff when I get to work on it next time.

Various updates

GitHub has locked me out due to Microsoft’s forced 2FA policy which I don’t want to comply with. As a result, I can no longer log in to the website to make pull requests, participate in discussions etc. However, at the moment I can still push to repos (wow, so secure huh?), so I can still work on SA Tools, the Mod Loader and other projects. They may pull the plug in the future but at least for now I can contribute to projects that are still on GitHub.

After being locked out I was able to make the following updates:

SA Tools

I added more complete support for reading and writing NJ and GJ files from various games. The update needs some testing so it will be in a separate branch for now.

SA Tools / Texture Editor

1) Unmodified texture data is no longer re-encoded unless the archive format is changed. Adding (instead of importing) textures will now add them as-is if the texture format matches the archive format (e.g. you can add DDS to PAKs or GVRs to GVMs).

2) You can choose between DDS and PNG for textures in PAKs.

3) If you open a single PVR/GVR/XVR texture, it will auto-add all other textures located in the same folder.

4) You can open and edit non-indexed PAKs (SOC folder).

5) You can save individual textures in their original format using the “Save” button.

6) Support for YUV422, Bump, 4-bit Indexed + Mipmaps, Indexed 8-bit + Mipmaps and ARGB8888 indexed PVR pixel formats.

7) Code cleanup, various bugfixes with texture encoding and decoding.

SADX Mod Loader

The game can now load textures in Gamecube GVM files without conversion. This opens up new modding possibilities, particularly for a project I’ve been contemplating to do for a while. I’ll introduce it soon.

Huge thanks to Exant, who decompiled original GVM loading code in SA2 PC, and Kell, who fixed the issues with mipmaps and paletted textures.

Leaving GitHub

Microsoft, who acquired GitHub 5 years ago, are demonstrating their true intentions regarding the future of the site that used to be the largest hub of free and open source community projects.

I was a user of GitHub before Microsoft acquired it, and they have no moral right to impose their new rules and threaten to lock me out of my work if I don’t obey. You can debate the security, necessity and efficacy of 2FA in general or for GitHub in particular, but to sum up my thoughts on this measure:
– I’m not going to use any form of 2FA for my account on GitHub;
– I find forcing 2FA on long-term users, AND locking out those who don’t want it, unacceptable.

So, I have decided to leave GitHub permanently. I will not be coming back to GitHub even if they reverse the decision (though obviously they won’t).

Among other projects, the following SADX mods and tools have had their source code relocated to GitLab:
Dreamcast Conversion
Dreamcast DLC
Sound Overhaul
Debug Mode
SADX Style Water
Time of Day
SADX Mod Installer
SA1-DC-HD

As I am leaving GitHub, I will no longer be able to contribute to the following projects on the X-Hax organization:
HD GUI 2
SADX Mod Loader / Mod Loader Common
SA Tools and SA Tools Wiki
SA Tools (research)
SADX Modding Wiki
Decompilation projects
bass-vgmstream

I will also be losing the ability to contribute (at least directly) to the following projects:
Lantern Engine
Input Mod
SADX: Fixed Edition
Onion Blur

Depending on what kind of “restrictions” Microsoft put on my account, I may also become unable to report issues or participate in discussions in the above projects after October 6th, 2023.

Leaving is not easy, and losing touch with the community and projects I’ve put a lot of personal time into building and improving sure hurts. Still, I hope you understand and accept my decision.

Thank you for following my work all this time.