Actions

Sonic R/Technical information/Windows PC

From Sonic Retro

Revision as of 17:26, 11 July 2013 by Alexrdias (talk | contribs) (Additional info)
Sonicretro-round.svg This short article is in need of work. You can help Sonic Retro by adding to it.

This is the Sonic Community Hacking Guide for the PC Version of Sonic R.

Fixing Startup Crash

Sonic R's startup code attempts to divide a value by the time elapsed for a given function. On reasonably fast computers (basically anything with a CPU newer than Pentium 4), this results in a division by zero. This can be fixed with a simple binary edit.
Sonic Retro
[source]

(Note: This hack assumes you're using the original executable without network support. The network version doesn't seem to work on NT-based Windows systems to begin with.)

In a hex editor, go to offset 0x70584. Replace these bytes: 00070584: 2e ff 15 8c 05 95 00 call cs:[0x95058c]

with these bytes: 00070584: b8 31 00 00 00 mov eax, 0x31 00070589: 90 nop 0007058A: 90 nop

Next, go to offset 0x705A0. Replace these bytes: 000705A0: 2e ff 15 8c 05 95 00 call cs:[0x95058c]

with these bytes: 000705A0: b8 01 00 00 00 mov eax, 0x01 000705A5: 90 nop 000705A6: 90 nop

What this does is it disables the function calls to get the system time and replaces them with known values that are guaranteed to work on modern systems.

Save Files

These files can be found in the .\save directory with filenames in the format r##.sav
This is an incomplete listing of the locations inside these files:

Offset Type Description
4 Byte Resort Island Unlocked (def. 1)
  • 0 - Locked
  • 1 - Unlocked
  • 2 - 1st Place
8 Byte Radical City Unlocked (def. 1)
C Byte Reactive Factory Unlocked (def. 1)
10 Byte Regal Ruin Unlocked (def. 1)
14 Byte Radiant Emerald Unlocked (def. 0)
18 Byte Sonic Unlocked (def. 2)
  • 0 - Hidden
  • 1 - Locked
  • 2 - Unlocked
1C Byte Tails Unlocked (def. 2)
20 Byte Knuckles Unlocked (def. 2)
24 Byte Amy Unlocked (def. 2)
28 Byte Robotnik Unlocked (def. 1)
2C Byte Metal Sonic Unlocked (def. 0)
30 Byte Tails Doll Unlocked (def. 0)
34 Byte Metal Knuckles Unlocked (def. 0)
38 Byte Eggrobo Unlocked (def. 0)
3C Byte Super Sonic Unlocked (def. 0)
40 Byte Blue Emerald Collected
  • 0 - Not Collected
  • 2 - Collected
44 Byte Green Emerald Collected
48 Byte Purple Emerald Collected
4C Byte Yellow Emerald Collected
50 Byte Orange Emerald Collected
54 Byte Red Emerald Collected
58 Byte White Emerald Collected

sonicr.inf

This file, located in the main folder, stores various settings. Note that despite the extension inf, it is not an actual inf file, and should NOT be opened with Notepad.

Offset Type Description
0 Byte Difficulty
  • 00 - Easy
  • 01 - Normal
  • 02 - Hard
4 Byte Ghost Toggle
  • 00 - Off
  • 01 - On
8 Byte Weather
  • 00 - Random
  • 01 - Clear
  • 02 - Rain
  • 03 - Snow
C Byte Catch Up Toggle
  • 00 - Off
  • 01 - On
10 Byte Guide Toggle
  • 00 - Off
  • 01 - On
14 Byte Map Toggle
  • 00 - Off
  • 01 - On
28 Byte Color
  • 08 - 8-bit
  • 10 - 16-bit
18 Byte 2P Split
  • 00 - Horizontal
  • 01 - Vertical
2C Byte Alpha Blending
  • 00 - Off
  • 01 - On
34 Byte Interlace
  • 00 - Off
  • 01 - On
3C Byte Draw Distance
  • 00 - Very Near
  • 01 - Near
  • 02 - Medium
  • 03 - Far
  • 04 - Very Far
  • 10 - Max. Draw Distance
40 Byte Screen Size
  • 00 - Very Small
  • 01 - Small
  • 02 - Medium
  • 03 - Large
  • 04 - Full Screen
44 Byte Track Shading
  • 00 - Off
  • 01 - On
50 Byte Stereo Toggle
  • 00 - Off
  • 01 - On
54 Byte Vocals Toggle
  • 00 - Off
  • 01 - On
58 Byte SFX Volume (00-08)
5C Byte Music Toggle
  • 00 - Off
  • 01 - On
Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information