Temprarily stopping the video output from updating?

Started by biolizard89, May 22, 2011, 10:33:04 PM

Previous topic - Next topic

biolizard89

If I'm hacking a 60fps game, and I want to prevent half of its frames from displaying (so that it's 30fps but still the same speed), any idea how I would do that?  Is there some easy way to find the routine that writes a picture to the video output so that I could patch it to only run every nth time?

Thanks.

James0x57

So that you have more time to operate between frames?


If there was some variable to run at 60fps, I would assume that it's one of these two:
1-
A timeCounter (float number of seconds- updated on own thread) and a flushwhenreached variable (that's probably equal to 1/60).
3C888889 = 0.016666667535901 (~1/60)

2-
a timeCounter (milliseconds int- updated on own thread) and a flushwhenreached variable (that would equal 1/60th of a second in milliseconds).


Sooo search for 3C888889 and poke it to something stupid like 3F000000 and see if you get 2fps.
Or figure out the 1/60th of a second in milliseconds and search for that int, poke, and see what happens.



I could be completely wrong about how a game would want to handle hitting a benchmark for fps... but these were the 2 things that came to mind as possibilities.

Find a static variable, then you find the ASM, then you can potentially have a universal hack (for anyone using a similar gfx engine) to force 30fps.


biolizard89

Quote from: James0x57 on May 23, 2011, 02:50:28 PM
So that you have more time to operate between frames?


If there was some variable to run at 60fps, I would assume that it's one of these two:
1-
A timeCounter (float number of seconds- updated on own thread) and a flushwhenreached variable (that's probably equal to 1/60).
3C888889 = 0.016666667535901 (~1/60)

2-
a timeCounter (milliseconds int- updated on own thread) and a flushwhenreached variable (that would equal 1/60th of a second in milliseconds).


Sooo search for 3C888889 and poke it to something stupid like 3F000000 and see if you get 2fps.
Or figure out the 1/60th of a second in milliseconds and search for that int, poke, and see what happens.



I could be completely wrong about how a game would want to handle hitting a benchmark for fps... but these were the 2 things that came to mind as possibilities.

Find a static variable, then you find the ASM, then you can potentially have a universal hack (for anyone using a similar gfx engine) to force 30fps.
Thanks James, that's a good idea... I'll play around with it and see if I can make any progress.  However, I worry that using that method will reduce the rate at which pad reading, collision detection, etc. occur as well as the framerate; I want everything to still run 60 times per second except for actually displaying a frame to the video output.

That said, I may have found a simpler solution to my eventual goal with this hack, so if I can't stop a video frame from outputting I'll just go with my other method.  (Any fun stuff which I might hack will be released in this forum, naturally.)

James0x57

Neato. I'll be interested to see what comes! =)