|
koolaidman Member Level: 24 Posts: 82/108 EXP: 76992 For next: 1133 Since: 07-17-10 Since last post: 4.5 years Last activity: 2.3 years |
|
| Hey guys.
A few weeks a go I worked on a small patch that will allow Super Mario Sunshine to render double the amount of frames it normally outputs. By changing Dolphin's frame limit (either by use of the VBeam hack or the frame limiter set to 120), we can take advantage of the extra frames by forcing all 60 frames to display in 1 second, thus making the game run at 60fps. Watch a video here: http://www.youtube.com/watch?v=9uoBTZxC3Rs To use in Dolphin, just follow these steps (make sure you have the NTSC-U versions of SMS, GMSE01): 1.) Right click on the game in the game list and go to Properties 2.) Click the "Patches" tab and click "Add..." 3.) Give the patch a name, tick "dword", and set the Offset to 804167B8 and Value to 3F800000 4.) Click "OK", and make sure the patch is ticked. 5.) Click "Config" at the top of the main window, and under the "General" tab set "Framelimit:" to 120. OR - enable the Vbeam hack by right clicking the game in the games list, go to Properties, and put a checkmark next to the Vbeam hack. 6.) Click "OK" and play! The patch has some side effects though:
As far as I can tell, there are 3 functions that look at the value that I modified for the patch. "drawDVDErr", "SMSGetAnmFrameRate", and "SMSGetVSyncTimesPerSec". It seems that most of the game's other functions take advantage of SMSGetAnmFrameRate the most. The function itself is relatively simple: (NOTE: These addresses/function names come from the NTSC-U demo version of the game. For some reason, the developers decided to include the debug symbols only in the demo versions. The final retail versions don't have this. You can download the symbol mappings here, but if you want to look at the function in the NTSC-U final the function can be found at 0x802A7BD8)
The function basically looks at your current TV Render Mode and branches off to load what I assume is either the refresh rate or base framerate (in single precision floating point) for that particular render mode. After loading the value, the game loads a second value that pretty much serves as some kind of frame multiplier value that halves the base framerate by default. The patch I made modifies the value that gets multiplied into the base framerate so that instead of multiplying 60 by .5, it multiplies by 1. This patch could definitely be more refined to help fix the other issues. I believe this patch could work on hardware as well, but we would need to find a way to change the game's frame buffer to allow 60 frames to be displayed in 1 second. Since I kind of cheated by using a symbol list, I imagine that finding the values that affect the frame rate can be easily found in other games as well. Unfortunately, I spent many days trying to find something equivalent in Wind Waker but couldn't find anything that actually affects the frame rate. The symbol list in that game references the word 'framerate' a few times but they all seem to be related to the player actor's animations, not the game itself. The game seems to set the frame buffer somewhere during the "phase" functions, but I'm not sure how it works. The function names are difficult to understand and tracing calls the disassembly manually in IDA Pro alone is almost impossible unless you use Dolphin's debugger. I looked for data that could be modified in a similar way to the SMS patch (like 1.0/0.5/30.0/25.0 in floating point), but nothing seems to be relevant to the frame rate and affects entirely different functions. The game even seems to have it's own version of the GX NTSC rendering mode (g_ntscZeldaIntDf/g_ntscZeldaProg), for some reason. I'm less than an amateur when it comes to this stuff, so I would love if someone could figure out how to unlock the framerate in Wind Waker/Twilight Princess, or any other game for that matter now that Dolphin can allow overclocking. |









