Sonic and Sega Retro Message Board: Sonic R Hacking - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 18 Pages +
  • ◄ First
  • 15
  • 16
  • 17
  • 18
    Locked
    Locked Forum

Sonic R Hacking Because somebody should.

#241 User is offline InvisibleUp 

Posted 24 November 2017 - 11:53 PM

  • Posts: 103
  • Joined: 10-November 12
  • Gender:Not Telling
  • Project:Sonic Redux (Sonic R hack)
@Strife
I can't seem to find where that is in the 2004 version, but in the 1998 version there's a table at 0x4828AC that controls which character (excluding Sonic) gets which "engine" sound effect. (It can be one of "Null", "Tails", "Amy" or "Robot".) I modified that part of the code in Redux to make Silver make noises when he hovers and to make Tails not be so obnoxious by changing the pitch of his tails and not making them make noise when he ran.

#242 User is offline MainMemory 

Posted 27 November 2017 - 12:49 AM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4140
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Sonic R Mod Loader is now at v3. Added icon to manager program, fixed sound effect replacement, added widescreen support, fixed "practice mode" code, added initial PNG/GIF/BMP texture support.

#243 User is offline Conzuh 

Posted 27 November 2017 - 11:34 AM

  • help
  • Posts: 69
  • Joined: 19-March 12
  • Gender:Male
  • Project:Redbubble memery
Just wanted to say that the work you guys have put into this is absolutely amazing. For years I've been coming back to Sonic R and been frustrated with how difficult it was to get working on modern machines. To be able to play it now with ease in widescreen HD plus mods is more than I could have hoped for. Excited to see where the community takes it next!

Just wondering if there's a way to have the title screen and menus render 4:3 and the courses 16:9?

#244 User is offline BlazeHedgehog 

Posted 28 November 2017 - 03:49 AM

  • A "Community Enigma"?
  • Posts: 1424
  • Joined: 23-January 05
  • Gender:Male
  • Wiki edits:51
If you're like me, the ring sound in Sonic R for PC drives you crazy. It clips like hell, which makes this game a nightmare to listen to using headphones. When I had Sonic R installed back on Windows XP it was just a simple matter of replacing the ring1.wav, but since we have a mod loader now, I'll just make that a mod formally

So here's that!

https://gamebanana.com/sounds/39571

I just took the ring chime from Sonic 2 and ran it through a couple of FL Studio plugins to make sure it doesn't clip or sound too annoying.

#245 User is offline ICEknight 

Posted 28 November 2017 - 06:26 AM

  • Posts: 10792
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
That ring sound seems to make an additional noise at the end. Here's a clean sound rip from Sonic 1, taken from Mr Lange's Sonic Sounds Ripping Project .
This post has been edited by ICEknight: 28 November 2017 - 10:10 AM

#246 User is offline BlazeHedgehog 

Posted 28 November 2017 - 08:12 PM

  • A "Community Enigma"?
  • Posts: 1424
  • Joined: 23-January 05
  • Gender:Male
  • Wiki edits:51
I used the Sonic 2 ring sound from Lange's pack, actually. It's probably just an artifact of the filter/compressors I used, or the process of downsampling from 44100 to 22050

Your ears are too good, ICEKnight :colbert:

#247 User is offline CheatFreak 

Posted 28 November 2017 - 08:28 PM

  • Everything or Nothing.
  • Posts: 54
  • Joined: 22-May 13
  • Gender:Male
  • Location:Michigan
  • Project:BetterSADX Patch

View PostBlazeHedgehog, on 28 November 2017 - 08:12 PM, said:

I used the Sonic 2 ring sound from Lange's pack, actually. It's probably just an artifact of the filter/compressors I used, or the process of downsampling from 44100 to 22050

Your ears are too good, ICEKnight :colbert:/>


Trying it myself, it seems like maybe you overcompensated for the possibility of clipping a bit, I'm actually working on a mod called "Classic SFX Pack" which aims to replace the majority of the games sounds with ones from the classics now, and as is mine sounds just as loud as the original sound effect but without horrible clipping going on and that alone was enough.

#248 User is offline Covarr 

Posted 28 November 2017 - 08:42 PM

  • Sentient Cash Register
  • Posts: 4135
  • Joined: 05-February 07
  • Gender:Male
  • Location:The desert of nowhere, USA
  • Wiki edits:1
The noise at the end is because of this sudden stop:

Posted Image

It's easy enough to fix by chopping the file there and adding a fade out. Here's what a quick and dirty fade looks like in Adobe Audition, but any audio software should be able to do this:

Posted Image

Here's the file it produces.

As a general rule, a jump like that from sound to no sound should be avoided. It's all but guaranteed to sound wrong in virtually any scenario.
This post has been edited by Covarr: 28 November 2017 - 08:43 PM

#249 User is offline InvisibleUp 

Posted 29 November 2017 - 02:01 AM

  • Posts: 103
  • Joined: 10-November 12
  • Gender:Not Telling
  • Project:Sonic Redux (Sonic R hack)
I was messing around with the vertex shading and I think I got a little bit of a lead.

So, normally the game looks like this:

Posted Image

However, there's this variable at 0075349C that I'm calling RenderMode. In the 1998 version, this signaled whether the game was running in DirectDraw or Direct3D mode, and let the graphics routines do different things accordingly. Even though there is no DirectDraw mode in the 2004 version, changing it (where 1 = Direct3D, 0 = DirectDraw) still does things.

Posted Image

First off, the background scrolling is completely broken, going way too fast and wrapping improperly. The camera angle is different too, for some reason. (Switching back and forth has the camera move back and forth between the two spots.) But, more importantly, the vertex colors are darker.

As it turns out, when loading the level, if the RenderMode is set to Direct3D, 96 is added to the vertex colors, bringing them to a range from 96 to 255.

I wanted to see if I could recreate the DirectDraw rendering in Blender. So I imported the track into Blender (using a slightly modified version of my Blender importer) and set the blend mode to Multiply. Sure enough, the output looked just like the game with RenderMode = DirectDraw.

Posted Image

However, none of the other blend modes were even remotely close. So I then turned the textures off, took a screenshot, and did the same with the vertex colors. I then imported the textures-only and colors-only images into Krita. Layering the colors over the textures and playing with the blend modes got me results pretty consistent with what Blender was giving me. I think I found the right blend mode: "Grain Merge".

Posted Image

And for comparison's sake, DirectDraw from the 1998 version

Posted Image

According to the Krita docs, Grain Merge is where "Similar to addition, the colors of the upper layer [colors] are added to the colors [textures], and then 50% grey is subtracted." That seems really doable. I just need to figure out how to implement it now.

#250 User is offline CheatFreak 

Posted 29 November 2017 - 03:56 AM

  • Everything or Nothing.
  • Posts: 54
  • Joined: 22-May 13
  • Gender:Male
  • Location:Michigan
  • Project:BetterSADX Patch

View PostInvisibleUp, on 29 November 2017 - 02:01 AM, said:

The camera angle is different too, for some reason. (Switching back and forth has the camera move back and forth between the two spots.)


Used the cheat engine debugger to tinker around with that address you posted.

Looks like there's some code at 00405345 onward is responsible for changing the camera angle if the value at that Render Mode address you posted is set to 1, which always run in the 2004 port because there's no setting for render mode, obviously.

If you change the condition so that it's looking for 0 instead, it'll always be using the saturn/directdraw sort of camera angle, which is pretty cool, I prefer the more "behind the back" sort of camera to be honest. Only annoying part is that the floor map seems to just disappear while you're walking on it... kind of annoying, but still, super cool that this is something that you can change now.

The "easy" addresses you can use to change this is 00405359 and 004053B7, by setting it to 0 instead of 1.

Edit: Off topic, I also posted a sound effects mod of my own that fixes the ring sound clipping problem and improves quality of several other sound effects, but without making the sounds any quieter. More work needs done on this for sure, but until then, this will do.

https://gamebanana.com/sounds/39581
This post has been edited by CheatFreak: 29 November 2017 - 06:34 PM

#251 User is offline MainMemory 

Posted 29 November 2017 - 02:44 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 4140
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Actually, it seems that the true software rendering mode from the 1998 version is with 0075349C = 2, but in order for it to not simply show an error dialog with a message "unsupported", you also have to set 007C2470 (bits per pixel) = 15 or 16. In the true "software rendering" mode, the game displays the logo screens as pure white, the "R" on the title screen is completely black, the models on the menus use the different lighting, and when you go to race, you're presented with a black screen, there's no voice for the countdown, and I'm not sure but I think the track is loaded incorrectly, because there are times when I think I should be hitting water but I don't.

#252 User is offline E-122-Psi 

Posted 02 December 2017 - 09:03 AM

  • Posts: 1739
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41
One thing I've always wondered, is it possible to assign the stipulations for Time Attack's Reverse Mode onto VS or Grand Prix mode?

It seemed odd the developers didn't add that option since they already had half the programming through Time Attack and it would have at least semi-compensated for the game's lack of tracks.

Grand Prix would likely involve programming new AI but VS could possibly just work on Time Attack's coordinating.
This post has been edited by E-122-Psi: 02 December 2017 - 09:03 AM

#253 User is offline SteveBlockhead 

Posted 02 December 2017 - 06:09 PM

  • Posts: 6
  • Joined: 29-November 17
  • Gender:Male
  • Location:New Zealand

View PostE-122-Psi, on 02 December 2017 - 09:03 AM, said:

One thing I've always wondered, is it possible to assign the stipulations for Time Attack's Reverse Mode onto VS or Grand Prix mode?

It seemed odd the developers didn't add that option since they already had half the programming through Time Attack and it would have at least semi-compensated for the game's lack of tracks.

Grand Prix would likely involve programming new AI but VS could possibly just work on Time Attack's coordinating.


I'd imagine it would need new AI. Sounds like a pretty cool idea. Definitely something I'd like to see.

#254 User is offline qwertysonic 

Posted 02 December 2017 - 10:35 PM

  • Posts: 262
  • Joined: 29-April 11
  • Gender:Male
  • Project:creating the biggest sonic collection
Thanks for the Sonic R Updater. This definitely beats using dxwnd or some other work-around to play Sonic R on modern PCs. It's nice to see Sonic R get some hacking love after all these years.

#255 User is offline InvisibleUp 

Posted 02 December 2017 - 11:44 PM

  • Posts: 103
  • Joined: 10-November 12
  • Gender:Not Telling
  • Project:Sonic Redux (Sonic R hack)

View PostSteveBlockhead, on 02 December 2017 - 06:09 PM, said:

View PostE-122-Psi, on 02 December 2017 - 09:03 AM, said:

One thing I've always wondered, is it possible to assign the stipulations for Time Attack's Reverse Mode onto VS or Grand Prix mode?

It seemed odd the developers didn't add that option since they already had half the programming through Time Attack and it would have at least semi-compensated for the game's lack of tracks.

Grand Prix would likely involve programming new AI but VS could possibly just work on Time Attack's coordinating.


I'd imagine it would need new AI. Sounds like a pretty cool idea. Definitely something I'd like to see.


Actually, in the Tag 4 mode the AI is perfectly capable of running the course backwards. It might not be THAT horrible difficult to implement.

Of course, the AI is hideously dumb and barely competitive, but that's another matter entirely.

  • 18 Pages +
  • ◄ First
  • 15
  • 16
  • 17
  • 18
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users