Author Topic: [FF7] SpeedHack (Alpha)  (Read 48539 times)

Kranmer

  • *
  • Posts: 766
    • View Profile
[FF7] SpeedHack (Alpha)
« on: 2010-04-04 22:29:22 »
This hack is no longer needed since Aali's Custom Driver (0.7.7b) now supports loading the DLL so the EXE no longer needs patching.
here is Aali's Custom Driver 0.7.7b with the speedhack.dll and enabled in the CFG
http://www.mediafire.com/?wz3mmyofnmg

-------------------------------
Hi guys, I was reading through the "Custom Driver" Thread yesterday and a few people have asked how to make the game go faster or just for higher FPS, So i decided to implement Dark Byte's Generic Speedhack (speedhack.dll) into FF7 so that a box will run along side the game allowing the user to change the speed that the game will play at.
Here are some screenshots
here the game boosted by a very little amount.

here it is boosted by a lot.


Anyway here is the patch
http://www.mediafire.com/?zzzugekamyf
THIS IS A ALPHA TEST AND WILL ONLY WORK ON A UNMODDIFIED FF7.EXE 1.02.
ALSO BACKUP YOUR FF7.EXE BEFORE APPLYING THE PATCH.
Any Feedback is welcome.

This patch is completely compatible with Aali's Driver and all patches that dont require ff7.exe being modifyed (like "custom textures" and "models" etc).

Known problems:-
1 - After exiting the game somtimes a error while appear (only happened once to me).
2 - If the speed is set too high (and i mean too high) the game may crash when entering a new area (for example 20speed is fine but 500speed isnt)

Thanks To:-
Dark Byte
« Last Edit: 2014-07-17 18:22:32 by Covarr »

Hellbringer616

  • *
  • Posts: 1913
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #1 on: 2010-04-05 00:50:23 »
Interesting, Is this just a hack that makes it run faster (sound plays double speed and everything is sped up) or is this a hack that makes it run smoother?

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [ALPHA Release] SpeedHack
« Reply #2 on: 2010-04-05 01:14:04 »
Interesting, Is this just a hack that makes it run faster (sound plays double speed and everything is sped up) or is this a hack that makes it run smoother?

I'm going to assume faster graphic motions. Making it smoother would mean increasing frame counts of all models by a factor of four. This would likely make all the sound effects go out of sync since they are executed by animation frames. Try summoning KoR and you'll see what I mean.

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #3 on: 2010-04-07 19:05:55 »
yes NFITC1 is correct, This is just a generic speed hack to make everything run faster, The audio does go out of sync on things like KoR but normal menu sounds and background music all seem in sync.
I also have noticed that if you use this in a part of the game that has a timer (like the first reactor) or even the battle with emerald weapon, the timer still runs at normal speed even if the game is running at 170+FPS,
Also V-sync limits this hack to 60fps so if your using this its best to disable it for higher fps (if you want higher then 60fps that is, if your happy with 60fps then leave v-sync on)

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #4 on: 2010-04-07 20:22:35 »
yes NFITC1 is correct, This is just a generic speed hack to make everything run faster, The audio does go out of sync on things like KoR but normal menu sounds and background music all seem in sync.
I also have noticed that if you use this in a part of the game that has a timer (like the first reactor) or even the battle with emerald weapon, the timer still runs at normal speed even if the game is running at 170+FPS,
Also V-sync limits this hack to 60fps so if your using this its best to disable it for higher fps (if you want higher then 60fps that is, if your happy with 60fps then leave v-sync on)

Yeah, the timer uses the system clock, and doesn't take framerates into account.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: [ALPHA Release] SpeedHack
« Reply #5 on: 2010-04-08 06:26:12 »
yes NFITC1 is correct, This is just a generic speed hack to make everything run faster, The audio does go out of sync on things like KoR but normal menu sounds and background music all seem in sync.
I also have noticed that if you use this in a part of the game that has a timer (like the first reactor) or even the battle with emerald weapon, the timer still runs at normal speed even if the game is running at 170+FPS,
Also V-sync limits this hack to 60fps so if your using this its best to disable it for higher fps (if you want higher then 60fps that is, if your happy with 60fps then leave v-sync on)

Yeah, the timer uses the system clock, and doesn't take framerates into account.

This is news to me...
I don't remember the PSX having a system clock... I think? I haven looked at mine in years, but I don't remember ever setting the time. I wonder how the original PSX did that...

Timber

  • *
  • Posts: 386
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #6 on: 2010-04-08 13:57:51 »
Cool thanks kranmer, works great.
I made a video example of it here, on speed 6:
http://www.youtube.com/watch?v=B4-PSALKtBg
(10 points to whoever can guess what FF game the battle music is from)

drfeelgud88

  • *
  • Posts: 1355
  • da DOC iz here!
    • View Profile
    • My YouTube
Re: [ALPHA Release] SpeedHack
« Reply #7 on: 2010-04-08 16:20:56 »
Cool thanks kranmer, works great.
I made a video example of it here, on speed 6:
http://www.youtube.com/watch?v=B4-PSALKtBg
(10 points to whoever can guess what FF game the battle music is from)
Wow that's cool! But isn't that serpent's 'Viper Breath' suppose to be blue? Which mod made it change?
And imagine if you could speed up the FMV's. DAMN! lol
Anyways, pretty nice hack you got there.  ;)

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #8 on: 2010-04-08 16:25:51 »
That would be my mod. I redid the flamethrower enemy skill. Did not realize it had a palette swap.

drfeelgud88

  • *
  • Posts: 1355
  • da DOC iz here!
    • View Profile
    • My YouTube
Re: [ALPHA Release] SpeedHack
« Reply #9 on: 2010-04-08 17:11:19 »
That would be my mod. I redid the flamethrower enemy skill. Did not realize it had a palette swap.
Aww. I kinda liked the blue-flamey thingy lol.

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #10 on: 2010-04-08 17:40:55 »
It can be fixed.

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #11 on: 2010-04-08 17:53:49 »
@titeguy3 - Thanks for that i wasnt sure why, i had no idea it took it from the system.

@Timber - Nice video, I have no idea on the music though.

@drfeelgud88 - i dont know how to get this to work with videos but you could always just reencode your videos at higher FPS to go with this.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #12 on: 2010-04-08 18:11:44 »
I'm not sure how it does it (AFAIK there's no system time function in C++), but I remember having a discussion about how the timer completely ignores the framerate, so if you speed up the game you'll have an easier time with the timed segments, and if your game lags, you'll have a harder time with the timed parts of the game.

Colonel Ramsay

  • *
  • Posts: 114
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #13 on: 2010-04-08 20:39:16 »
It prob just uses timegettime (the windows internal timer) and uses time based movement rather than frame based. I know that when I made a few games I often had to use Time based movements so that slower PC's would still run the game at the same speed.  It is something like this (forgive me I am rusty and I hate time based movement):

Timegettime displays current number of milliseconds that Windows has been operational.  It is independant of games and is always running in the background.  See Aali's driver, he has also allowed you to upgrade to a more accurate timer performanceQuerycounter which is basically the same idea. http://msdn.microsoft.com/en-us/library/dd757629%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/ms644904%28VS.85%29.aspx

below, lasttime, millisec and change are variables that I have made.

Lasttime=timegettime [lasttime becomes the current windows time]

millisec=millisec+change [the number of milliseconds elapsed since timer start is added from the change]

Display Number [formatted to show only when millisec clocks a second, doesnt have to be here in this loop]

change= timegettime-lasttime [The change in time is the current windows time minus the last windows time]



---------

That is bog standard and I hope I haven't made a mistake.  The problem with this if I have it right, is that if you were on an EXTREMELY slow computer, the timer would count down at the correct speed but the game would be so slow you would be at a massive disadvantage to complete bombing mission.  Not sure why they didn't use Frame based movement here.


I doubt it does this in the PSX version, I am guessing all of that will be frame based movement.
« Last Edit: 2010-04-09 00:30:03 by Colonel Ramsay »

Timber

  • *
  • Posts: 386
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #14 on: 2010-04-09 10:18:54 »
Also I think it is really worth mentioning that this speedhack can also be achieved using Cheat Engine 5.6
(since .exe mod patches don't like to play nice with eachother)
Link: http://www.cheatengine.org/

@Timber - Nice video, I have no idea on the music though.

Yeah I was being tricky, the music hasn't been released yet, but it's by Nobuo Uematsu.

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #15 on: 2010-04-09 10:49:43 »
Also I think it is really worth mentioning that this speedhack can also be achieved using Cheat Engine 5.6
(since .exe mod patches don't like to play nice with eachother)
Link: http://www.cheatengine.org/

@Timber - Nice video, I have no idea on the music though.

Yeah I was being tricky, the music hasn't been released yet, but it's by Nobuo Uematsu.

Basically cheatengine and this hack are very similar (we both use a speedhack.dll created by Dark Byte although we use different DLL versions) but my aim was to make it so that an external program wasn't needed, I basically just inject the speedhack.dll into FF7 everytime it runs.
I am trying to come up with a patch that will work with all FF7.EXE's but its hard since there are so damn many variations,
It may be easier to make different patches for different versions of the game by request then to make a universal patch that will work with every EXE.

AlbusJC

  • *
  • Posts: 120
  • If you really love something let it go
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #16 on: 2010-04-09 12:22:47 »
kranmer, there will be compatibility for other versions of FF7.exe (modded/unpatched/international) of this speedhack in the future?
and other question: this program supports fullscreen view or not?
thanks for your work!

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #17 on: 2010-04-09 13:57:15 »
kranmer, there will be compatibility for other versions of FF7.exe (modded/unpatched/international) of this speedhack in the future?
and other question: this program supports fullscreen view or not?
thanks for your work!

@AlbusJC - As i said in my last post it is hard to get it working with all EXE's since there are so many different ones but i am trying to work on it but it isnt going well,
But if you want to make a request i will make a patch just for your EXE (either post the info on your EXE here or PM me if you want to request a patch for your ff7.exe).
This works with fullscreen and window and all mods that dont require modding the EXE (like "Aali's Custom Driver" etc)


Aali

  • *
  • Posts: 1196
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #18 on: 2010-04-09 14:20:10 »
What does it patch? If I make it an option in the custom driver you'll have support for any 1.02-based exe for free.

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #19 on: 2010-04-09 14:52:07 »
all i really do is basically dynamically load (inject) the speedhack.DLL into FF7 when you start the game.
The speedhack.dll and source is here
http://forum.cheatengine.org/viewtopic.php?p=31178&sid=81985a80cf716600c447fbbf0f3907ff
And i use a little of the DLL inject code from here
http://www.edgeofnowhere.cc/viewtopic.php?p=2483118
« Last Edit: 2010-04-09 15:04:13 by kranmer »

Aali

  • *
  • Posts: 1196
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #20 on: 2010-04-09 15:32:35 »
Okay, 0.7.7b will have a config option called load_library that simply loads whichever .dll into the game.

It won't be in the default config file though, so people will have to add that line.
« Last Edit: 2010-04-09 15:34:32 by Aali »

Kranmer

  • *
  • Posts: 766
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #21 on: 2010-04-09 17:04:51 »
Okay, 0.7.7b will have a config option called load_library that simply loads whichever .dll into the game.

It won't be in the default config file though, so people will have to add that line.

Wow nice, Thanks alot Aali, That will be alot of help, I cant wait for 0.7.7b now.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [ALPHA Release] SpeedHack
« Reply #22 on: 2010-04-09 17:58:47 »
@titeguy3 - Thanks for that i wasnt sure why, i had no idea it took it from the system.

Ya know, now that I think about it I bet it just counts processor ticks. That would explain why the multi-core processors make the timer run slower.

This is my theory: The processor reports itself as running at ~34 Mhz (What the PSX runs at). So an internal timer counts out ~34Mil worth of ticks before incrementing the timer 1 second, right? This is the most reliable way to keep track of time when you are using a fast system than the one intended, don't have access to the system's clock, or you encounter lag that slows down graphics (so you can't count frames).
However, for multi-core processors, they'd report their speed at, say, 3Ghz. But each core reports that and it somehow gets translated as 6Ghz. Now the timer, which is running on only one core, is waiting for 6Bil ticks which takes 2 seconds rather than one. When you switch to a single-core affinity only one core reports its speed at 3Ghz so the timer waits for 3Bil ticks to pass and the timer counts down correctly.

titeguy3

  • *
  • Posts: 1283
  • A jack of all trades
    • View Profile
Re: [ALPHA Release] SpeedHack
« Reply #23 on: 2010-04-09 18:05:22 »
@titeguy3 - Thanks for that i wasnt sure why, i had no idea it took it from the system.

Ya know, now that I think about it I bet it just counts processor ticks. That would explain why the multi-core processors make the timer run slower.

This is my theory: The processor reports itself as running at ~34 Mhz (What the PSX runs at). So an internal timer counts out ~34Mil worth of ticks before incrementing the timer 1 second, right? This is the most reliable way to keep track of time when you are using a fast system than the one intended, don't have access to the system's clock, or you encounter lag that slows down graphics (so you can't count frames).
However, for multi-core processors, they'd report their speed at, say, 3Ghz. But each core reports that and it somehow gets translated as 6Ghz. Now the timer, which is running on only one core, is waiting for 6Bil ticks which takes 2 seconds rather than one. When you switch to a single-core affinity only one core reports its speed at 3Ghz so the timer waits for 3Bil ticks to pass and the timer counts down correctly.
That actually makes perfect sense. That also explains why the timer never counts in seconds exactly. As for how the multicore processor speeds get reported inaccurately, I have no clue. One could test this theory, however, by running the game on a quadcore and dual core machine and seeing if the timer takes more or less time with more cores.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [ALPHA Release] SpeedHack
« Reply #24 on: 2010-04-09 18:22:40 »
@titeguy3 - Thanks for that i wasnt sure why, i had no idea it took it from the system.

Ya know, now that I think about it I bet it just counts processor ticks. That would explain why the multi-core processors make the timer run slower.

This is my theory: The processor reports itself as running at ~34 Mhz (What the PSX runs at). So an internal timer counts out ~34Mil worth of ticks before incrementing the timer 1 second, right? This is the most reliable way to keep track of time when you are using a fast system than the one intended, don't have access to the system's clock, or you encounter lag that slows down graphics (so you can't count frames).
However, for multi-core processors, they'd report their speed at, say, 3Ghz. But each core reports that and it somehow gets translated as 6Ghz. Now the timer, which is running on only one core, is waiting for 6Bil ticks which takes 2 seconds rather than one. When you switch to a single-core affinity only one core reports its speed at 3Ghz so the timer waits for 3Bil ticks to pass and the timer counts down correctly.
That actually makes perfect sense. That also explains why the timer never counts in seconds exactly. As for how the multicore processor speeds get reported inaccurately, I have no clue. One could test this theory, however, by running the game on a quadcore and dual core machine and seeing if the timer takes more or less time with more cores.

If I were a casual betting man, I'd put money down right now saying that a quad-core timer would be about half as fast as the dual core's.