[FF7PC-98/Steam] Smoother 60FPS Battles (v0.95)

  • Thread starter Thread starter obesebear
  • Start date Start date
Status
Not open for further replies.
I thought I'd found something great to dupe the frames (my current way works 100% but its a hack job and i dont like that).

Unfortunately, turned out it wasn't anything.  I do know that it is possible to reduce the effect / anim speeds and thereby make it work at 60fps.. but I don't know how.


The search continues.
 
I thought I'd found something great to dupe the frames (my current way works 100% but its a hack job and i dont like that).

Unfortunately, turned out it wasn't anything.  I do know that it is possible to reduce the effect / anim speeds and thereby make it work at 60fps.. but I don't know how.


The search continues.
Thats duping the frames so the 2d elements work at the right speed? Or are you trying to make my silky smooth FF7 a dream? :P
 
The SFX call time needs to be quadrupled.

I was just testing the Aero Combatant fixes, and his main attack is a 3 hit move and the SFX gets called for each hit.  Usually bam .... bam .... bam.   But since they are being called for the same frame as the original it's, bambambam long before his animation finishes.

I'm not positive, but I think pushing them all to call 4x later should completely fix the sound problem.
 
I'm not positive, but I think pushing them all to call 4x later should completely fix the sound problem.
The answer to this one is in the animation scripts. Aero Combatant's anim script for Propeler is the fourth one in buab. In that script there is a segment
Code: [Select]
Code:
07 BE(01) BE(05) BE(0B) C2(0B) 08
Which roughly translates to:
Play anim 7
Set sound delay 1 frame(s)
Set sound delay 5 frame(s)
Set sound delay 11 frame(s)
Set hold camera for 11 frame(s)
Play anim 8

Setting the delays and hold cameras for four times their current amount made the delay between sounds four times slower and the camera stayed on the target for four times longer. Set sound delay 1 should probably remain at that value. This snippet is at 0x10E in buab or 0x32DCC1 in battle.lgp

This can either be solved by changing EVERY BEh CALL IN EVERY ANIMATION FILE (indicated NOT preferable) or I can squeeze some asm action into the animation handlers like I did for the camera scripts and handle it there. This indicates that at least the values provided to BE and C2 would need to be quadrupled.

EDIT:
To make this change in the ASM, make the following changes starting at 0x021A1E:

FromCode: [Select]
Code:
89 0A0F BF 45 0869 C0 EC 1A 00 008A 88 B4 11 BE 0080 C1 010F BF 55 0869 D2 EC 1A 00 0088 8A B4 11 BE 00
ToCode: [Select]
Code:
6B C9 0489 0A0F BF 45 0869 C0 EC 1A 00 008A 88 B4 11 BE 0080 C1 0188 88 B4 11 BE 0090 90 90 90 90 90 90
The C2 change is nearly identical, but starting at 0x0217CE

FromCode: [Select]
Code:
89 100F BF 4D 0869 C9 EC 1A 00 008A 91 B4 11 BE 0080 C2 010F BF 45 0869 C0 EC 1A 00 0088 90 B4 11 BE 00
ToCode: [Select]
Code:
6B D2 0489 100F BF 4D 0869 C9 EC 1A 00 008A 91 B4 11 BE 0080 C2 0188 91 B4 11 BE 0090 90 90 90 90 90 90
 
Last edited:
I've been looking at how the game pauses... since the pause var can literally stop everything on screen (apart from the menu).

Seeing what accesses the pause var can tell us which parts are being frozen and thus give us the correct locations of the animation advancement code.

Unfortunately.. it isn't that simple.  Magic is not just one counter.  A lot of magics use a different counter for their specific animations... and that's before we get on to Summons and everything else.

I suppose NFITC1 may be able to trace all this back to a function that controls them all? And then we may get some luck with it.  But if not, you guys will need to interpolate the magic too (are you doing this?  Can this even be done?).

5C042B, 5D4464,  5D46B2

These addresses control just a tiny portion of animations I found.  I forget which is which, but one is "Cure".

Certain model animation is advanced from  00424E5F

You have already found the counter for action times.

I've confused myself with all this to be honest.  Anyway, good luck with this project, it's way more involved than my pause hack job (which will work 100% but will never be as smooth as this one hopes to be).
 
Last edited:
Getting Joker and Death Dealer to have their cards rotate smoothly is going to be a very VERY hacked job.  The animation will look a little bit different (the cards won't turn on angles and whatnot)  but it's the only way I can get it to work.  Otherwise it just looks ridiculous.  EDIT: Unfortunately Joker and Death Dealer animations are not interchangeable.  Joker took about 3 hours to fix.  It will be a long LONG time until I fix Death Dealer.  If someone else would like to take up the task, let me know.

I've been looking at how the game pauses... since the pause var can literally stop everything on screen (apart from the menu, which uses the global pause var).

Seeing what accesses the pause var can tell us which parts are being frozen and thus give us the correct locations of the animation advancement code.

Unfortunately.. it isn't that simple.  Magic is not just one counter.  A lot of magics use a different counter for their specific animations... and that's before we get on to Summons and everything else.

I suppose NFITC1 may be able to trace all this back to a function that controls them all? And then we may get some luck with it.  But if not, you guys will need to interpolate the magic too (are you doing this?  Can this even be done?).

5C042B, 5D4464,  5D46B2

These addresses control just a tiny portion of animations I found.  I forget which is which, but one is "Cure".

Certain model animation is advanced from  00424E5F

You have already found the counter for action times.

I've confused myself with all this to be honest.  Anyway, good luck with this project, it's way more involved than my pause hack job (which will work 100% but will never be as smooth as this one hopes to be).
Nothing wrong with hacks.   To get things to work, and I assume the magic, like textures, will likely need to have frames duplicated since their animation files aren't in magic.lgp.

Summons, however, are easily interpolated.  So no problem there.
 
Last edited:
If anyone ever figures out the spell effects I had played around with some image morphing software that did a pretty good job of interpolating them. Assuming you can add more spell effect frames that is.
 
Currently we have about 130 of the battle models error free and ready for beta testing in game.

What I need now is for someone to make a quick demo showcasing 15fps w/ no mods vs. 60fps heavily modded with all of our best models and graphic interfaces and all of the other cool shit we have around here.   Your capture card will obviously need to be able to record smoothly at 60fps.

Anyone who is interested and capable please reply below and we'll get you set up with everything you'll need to use this mod.
 
Why would you use a capture card? Would fraps or something like that not work?
 
There's been a problem with my mod.

Seems that there is a bug in the original game that causes certain things to not be paused properly...

when you pause game during knights of round for example...  the knights disappear.  Meaning using my method... they will disappear 3 in 4 frames.

Either a fix for this behaviour has to be found, or a new way will have to be devised of making this work.

Things just get better and better  ;D
 
Why would you use a capture card? Would fraps or something like that not work?
Last I remember (from years ago) there was always some kind of problem keeping a steady frame rate using FRAPS with FF7.  But that might not be a problem anymore.
 
Last I remember (from years ago) there was always some kind of problem keeping a steady frame rate using FRAPS with FF7.  But that might not be a problem anymore.
It certainly is still a problem (and I'll be discussing this with NFITC1.  Dziugo was in the process of fixing the frame limiter code), but as I just explained to Covarr, there is a way around it.

Get Ochu (or any trainer that can change fps), or change fps any other way to, let's say, 120.
[to do this using Hextlaunch, the hext file should have a line reading: 7C0B00 = 00 00 00 00 00 00 5E 40 ]

So the game will run at 120 fps (you'll need to disable vsync in aalis driver).  It doesn't matter if it runs less than 120.., as long as it's a fair bit over 60.

Next, use fraps or Dxtory and set it to do the limiting.  Set it to 60.  The game will now record properly and at 60, because fraps/dxtory will do the limiting instead.  It's unknown what causes this issue at the current time.

The issue affects battle and field... and possibly menu.  But not world map.

@NFITC1  What could cause a 2-4fps drop when recording?  It has happened to me on 3 different computers.  As I said, it can't be due to slow computer because setting to a higher fps and letting the capture program do the limiting works fine.

I think what dziugo said is right... the frame limiter is broken.  I have no idea why this issue does not affect world map.
 
Last edited:
Currently we have about 130 of the battle models error free and ready for beta testing in game.

What I need now is for someone to make a quick demo showcasing 15fps w/ no mods vs. 60fps heavily modded with all of our best models and graphic interfaces and all of the other cool shit we have around here.   Your capture card will obviously need to be able to record smoothly at 60fps.

Anyone who is interested and capable please reply below and we'll get you set up with everything you'll need to use this mod.
dammit I have a great capture card but my hdmi port just broke :(
 
Currently we have about 130 of the battle models error free and ready for beta testing in game.

What I need now is for someone to make a quick demo showcasing 15fps w/ no mods vs. 60fps heavily modded with all of our best models and graphic interfaces and all of the other cool sh*t we have around here.   Your capture card will obviously need to be able to record smoothly at 60fps.

Anyone who is interested and capable please reply below and we'll get you set up with everything you'll need to use this mod.
Maybe I can help? I have an elgato HD Capture card and also have X spilt which displays frames you record at? I get 11 frames fully modded out not sure about fully unmodded though can easily find out for you
 
171 more animations to go. I'd say nice work so far everyone, than of course bug fixes and 2d effect fixes, Was camera and SFX sorted out yet?
 
The value I provided that fixes menu should also fix the camera for use with this mod.
 
SFX does seem to be fixed. The camera is also working from what I can tell with the exception of the victory poses where it ends too early
 
...What could cause a 2-4fps drop when recording?  It has happened to me on 3 different computers.  As I said, it can't be due to slow computer because setting to a higher fps and letting the capture program do the limiting works fine.

I think what dziugo said is right... the frame limiter is broken.  I have no idea why this issue does not affect world map.
The only thing I can figure is the frame limiter was designed with PSX in mind. Every time I've fraps'd ff7 it's always given me 12 fps in battle too. The PC port was never designed to work with other applications that want video memory. There's calls to enter critical sections all over the place (critical sections can only be accessed by one process at a time) so it's possible that the direct video capture software is leap-frogging those requests with ff7. That's a layman's guess so it could be WAY off. I'm not sure there's anything we can do about it.
Come to think about it, when I make traces it slows down the fps too. I'm not sure why that is either. I know that not all applications do that.

...I suppose NFITC1 may be able to trace all this back to a function that controls them all? And then we may get some luck with it.  But if not, you guys will need to interpolate the magic too (are you doing this?  Can this even be done?).

5C042B, 5D4464,  5D46B2

These addresses control just a tiny portion of animations I found.  I forget which is which, but one is "Cure".
No such luck. These are three separate functions.

0x5C042B: Can only be evoked by animation scripts. Only A4, A5, E6 and E0 call this. Haven't dug into conditions that must be met.

0x5D4464: Called by mostly item animations. XPotion, Potion (Also Cure), Ether, TurboEther, HiPotion, PhoenixDown, Regen, and Enemy Action Animation Loader 5E (Howling, Toxic Powder, and Curses)

0x5D46B2: Called FROM the method where 0x5D4464 is executed, but Elixer and Antidote can call it without calling the above.
 
Last edited:
What on earth are different magics doing using different functions, especially for the main counter?  Surely this code should just be shared?
 
60 left.  Then checking fixes needed for Kaldarasha and Hellbringer.    Then the summons and we'll be ready for a beta   ;D

Unfortunately still can't do anything with the limit breaks
 
Last edited:
Status
Not open for further replies.
Back
Top