Saturn Patch: Sonic Into Dreams Remix

It’s Christmas NiGHTS season once again! In this edition, I’m describing a new patch / hack that I’ve made that alters the Sonic Into Dreams present for Christmas NiGHTS Into Dreams.

In this version of the game, Sonic takes the place of NiGHTS in the Ideya Palace. When Claris dualizes with him, he takes flight, and the two of them ultimately take on Gillwing in a fight to save Spring Valley. Here’s a video!

Below are the details about how I made this work. If you want to skip the hacking and just play, grab a patch from SegaXtreme!


One character at a time

In a previous Sonic into Dreams article, we had him flying alongside Claris or Elliot, but this time we’ll do some extra work to make him fly solo.

The unused game mode (number 08) described in that article has Sonic “fly along” with Elliot or Claris by specifying. If we want to fly as Sonic alone, we can use the standard gameplay modes 14 (Elliot-style) or 20 (Claris-style).

Left: Sonic and Claris with mode 08 set. Right: Sonic alone without mode 08 set.

The function at 06055670 sets the mode for the Sonic present. The patch for Claris is:

06055674 E020 # Set game mode to Claris's

And for Elliot:

06055674 E014 # Set game mode to Elliot's


One Sonic at a time

Using a single character has an unintended side effect: there’s now a copy of Sonic waiting for us in the Ideya Palace.

I notice many things that look alike

This happens because the game checks the “character index” parameter to see whether we’re Elliot, Claris, or Reala. If we’re not, it assumes we’re NiGHTS and hides the Ideya Palace character.

The check is a logical AND of the character index with 0x70, which is itself the logical OR of Elliot (10), Claris (20), and Reala (30). We can put Sonic (40) in the mix by extending the OR:

0602650a c8a0 # OR with 10 | 20 | 30 | 40

I’m not sure why Reala’s index is there! There’s never a situation in NiGHTS or Christmas NIGHTS in which you’re outside of the Ideya Palace with Reala.


Paraloop trails

Our earlier hack had us flying around without a paraloop trail. This is because the game only lets NiGHTS have one (indeed, in NiGHTS, Claris and Elliot don’t have one when they’re flying in Twin Seeds).

We can tell the game we’re NiGHTS (character 00) in the function at 0601b4a0, which implements the paraloop trail:

0601b630 e000 # Sonic is NiGHTS for paraloop purposes
0601ba48 e000 # Ditto

That gives us a star trail and the ability to loop enemies. But we can’t acquire blue chips or stars!

To make those work, we’ll have to alter the blue chip object handler functions:

06049f00 e000 # Sonic is NiGHTS for blue chip purposes
06049ed4 e000 # Ditto

Stars are handled in a different place:

0604a234 e000 # Sonic is NiGHTS for star purposes


Drill Spin dash

Sonic should be doing his signature spin attack rather than NiGHTS’s drill dash, right? I think so too.

The table at 0602e5b0 stores the data for the animations. Index 33 (at 0602e8e0) is used for the drill dash. A few doors down, index 35 (at 0602e900), is used for the “Sonic” acrobatic trick:

We can copy the latter’s data into the former’s animation slot (four words) to make Sonic spin when you press one of the action buttons:


Loading tweaks

For my patch, I made the game boot straight into the Sonic present. That was done by changing the title screen launcher code:

0604cc2e d207 # Load the present launcher's address into r2
0604cc30 422b # jmp there
0604cc32 e015 # The Sonic present is index 15
0604cc4c 0605553c # Point to the present launcher

The replay that you get after finishing the boss doesn’t quite work in standalone Sonic mode — after it finishes you get a corrupt version of this screen:

I made the game skip it with this patch:

060396d2 e010 # Go back to the Sonic Team logo


Outro

For previous articles on hacking NiGHTS and Christmas NiGHTS, see:

I have more Saturn Christmas presents in store for the rest of this year!

This post is syndicated from Rings of Saturn, Bo’s reverse engineering blog.

About the author

Be the first to comment

Leave a comment

Your email address will not be published.


*