Loading...

Sonic R 004801d9 error hack

32,117 views

Loading...

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on May 10, 2009

Patched file released (by a visitor) (LINK TAKEN DOWN - sorry, please don't use cyberlockers if you don't want this to happen)
IDA Pro Freeware version: http://www.hex-rays.com/products/ida/...
I'm no longer supporting this hack at this time, and have re-opened comments to be posted immediately. If you can work out a better way, please discuss it.
See bottom of description for a possible patch:
If you try running Sonic R on a high end PC, you might get the error "The program encountered a problem at address 004801d9 and cannot continue"
People have proposed different methods of fixing the problem:
Set Windows 95 or 98/Me compatibility mode.
Find sonicr.exe in explorer and keep hitting enter until it runs.
Copy files manually to the hard drive and try running sonicr.exe.
None of these methods worked for my computer. I even tried running Sonic R in a Windows 98 virtual machine, and the same error came up.
Turns out at 004801d9 is the opcode "idiv ecx" and at addresses 00480184 and 004801a0 are calls to timeGetTime() which gets the system time in milliseconds.
The function here makes multiple calls to timeGetTime(), with delay loops in between, and uses the average of the results to calculate CPU speed.
If the results of the timeGetTime() calls subtracts to zero, such as will be caused by a 2.86 GHz Core 2 Quad Q9550, the code will try dividing by said result (zero) and throw an exception.
By setting a breakpoint at the second timeGetTime() call (at address 00480184) a delay is artificially produced which allows the game to run without error.

Patch (IDA Pro DIF format) Cut and paste below:
This difference file is created by The Interactive Disassembler

sonicr.exe
00070584: 2E B8
00070585: FF 31
00070586: 15 00
00070587: 8C 00
00070588: 05 00
00070589: 95 90
0007058A: 00 90
000705A0: 2E B8
000705A1: FF 01
000705A2: 15 00
000705A3: 8C 00
000705A4: 05 00
000705A5: 95 90
000705A6: 00 90

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...