Qhimm.com Forums

Miscellaneous Forums => Archive => Topic started by: dziugo on 2006-05-13 22:54:49

Title: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-05-13 22:54:49
General purpose:

To fix an issue with FF7 crashing randomly when entering battles.

Addition info:

A crash may occur because FF7 is trying to use an outdated pointer in a function
Code: [Select]
Function:
   00673D26
Potential crash at:
   00673EDA   MOV DX, WORD PTR DS:[ECX]

History:

A problem and a working fix were discovered by Alhexx (info here (http://forums.qhimm.com/index.php?topic=4382.0)). My patch updates a pointer instead of NOP-ing the problematic opcode - so the battle-swirl still looks as it should.

Warning:

There is a reason why it's a beta version. It's possible that it doesn't help you with those crashes! That's why I need people to download and test it - I cannot fix bug in FF7 not knowing of it's existance. If it still crashes, send me debug.txt file (which was created while installing patch) and a full info about the error you encountered (instead of sending it to Microsoft, copy and send it to me :)). Thanks!

Download links:

BattleSwirl Patch link taken down, download MGP from the link below
YAMP+tutorial (http://forums.qhimm.com/index.php?topic=5124.0)

dziugo
Title: Re: [BETA] Battle-Swirl Fix
Post by: Wuz on 2006-05-14 01:45:09
hi dziugo,

Worked fine for me.
tested by alt-tabbing at disc change to induce a crash, game crashed before the patch was installed, was fine afterwards.
more fine work!  :-)

EDIT: don't know if its worth mentioning or not but this was used in conjunction with the 9999 Limit Patch, Tifa Limit Patch and Transparent Dialog Boxes patch.
took me a couple of clumsy attempts to get them all patched together but i realised it was my fault at the end (FF7 folder is a mess of exes  :evil:)

Wuz.
Title: Re: [BETA] Battle-Swirl Fix
Post by: EmperorSteele on 2006-05-14 05:06:04
Oh, shiat; I NOPed out that command myself; will this still be able to work?  Or are you banking on me finding that out, as, well, it's a beta? ;)

[EDIT]  WOAH... uhm, maybe it's just because i used YAMP incorrectly, but, uhm, now ff7 is 0k in size and doesn't use the ff7 icon.  Yeah, I.. I better start fresh, lol

[edit2] oh, oops, colors are still messed up, darnit, gotta repatch from scratch, hahaha

[edit 3] ok, got an un-effed version of ff7 and used that; everything's perfect now =)

I'll just have to do some massive running around to make sure it won't crash, and try some alt-tabbing... but later =)

EXCELLENT work as always, Dziugo =D
Title: Re: [BETA] Battle-Swirl Fix
Post by: Covarr on 2006-05-14 05:12:53
Keep in mind that the exe is easy enough to replace, so it's not a big deal if it breaks it.
Title: Re: [BETA] Battle-Swirl Fix
Post by: Chrisu on 2006-05-14 07:17:00
I dont think you're helping with my errors, because i think they're caused by the window patch of cetra.
But ill post my screenshots anyway:

http://christian59.ch.funpic.de/ff7error1.jpg
http://christian59.ch.funpic.de/ff7error2.jpg

Does anyone know what could help here?
Title: Re: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-05-14 07:21:10
Next step would be adding a frame-limiter and incorporating it into MGP (or maybe not... they will share the same code but it isn't actually a minigame), but I'll need to know if the solution works for everyone. If anyone still has problems with battle-swirl (after trying this patch of course :P) please reply/PM me.

Edit: Ok, I'll investigate your problem. Post your debug data and the actual error.

dziugo
Title: Re: [BETA] Battle-Swirl Fix
Post by: Chrisu on 2006-05-14 08:23:29
The game doesnt crash, i just get 4 of the MessageBoxes when it enteres a battel (instead of swirling) and the fmvs look like the picture.

Code: [Select]
Debug data
 
Applying patch: BattleSwirlFix
Program entry point. Size of patch: 0xD5
 5: jmp 0x8A eip:8F
61: search reg[0](0x0) 0x5
Raw: 0x273507 Offset: 0x273507
    found: 0x273507
F1: errore
41: mov reg[2](0x0) 0x7B
46: add reg[2](0x7B) reg[0](0x273507)
41: mov reg[FF](0x0) 0x7F
46: add reg[FF](0x7F) reg[0](0x273507)
D0: getbyte reg[FE](0x0) reg[FF](0x273586)
    value: 0xE8
12: cmp reg[FE](0xE8) 0xE8
F2: errorne
47: add reg[FF](0x273586) 0x1
D4: getdword reg[1](0x0) reg[FF](0x273587)
    value: 0xFFFEC3B5
47: add reg[1](0xFFFEC3B5) 0x74
A0: idword 0x23 reg[1](0xFFFEC429)
Inserted a new dword: 0xFFFEC429
47: add reg[0](0x273507) 0x7
76: write reg[0](0x27350E) 0x23
Wrote: 0x35 bytes at offset: 0x27350E
44: mov reg[FF](0x273587) 0x90909090
DA: putdword reg[2](0x273582) reg[FF](0x90909090)
47: add reg[2](0x273582) 0x4
DA: putdword reg[2](0x273586) reg[FF](0x90909090)
47: add reg[2](0x273586) 0x4
DA: putdword reg[2](0x27358A) reg[FF](0x90909090)
47: add reg[2](0x27358A) 0x4
DA: putdword reg[2](0x27358E) reg[FF](0x90909090)
 0: exit
Writing to output file
 
Title: Re: [BETA] Battle-Swirl Fix
Post by: EmperorSteele on 2006-05-14 16:14:15
Well, the second picture is because of ff7 running in a 32-bit envorment, such as the desktop or under Cosmo's 32-bit color option.  Turn this off, and your fmvs will work fine =)
Title: Re: [BETA] Battle-Swirl Fix
Post by: Chrisu on 2006-05-14 16:37:38
I know, but cant i play in 32-bit with good fmvs?
Title: Re: [BETA] Battle-Swirl Fix
Post by: Borde on 2006-05-14 19:27:30
Nop, you can't.
Title: Re: [BETA] Battle-Swirl Fix
Post by: EmperorSteele on 2006-05-15 02:08:18
Yeah, it's a problem with ff7's rendering engine.  Well, not so much a "problem" as a "We never thought a bunch of peopel would find a way to run the game windowed or in 32 bit color anyway, so why make compatable code?"

I'm sure someone like saint or Dziugo could figure it out if they wanted to.
Title: Re: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-05-15 07:35:16
Are the fmvs the only problem with using FF7 in 32bit mode?

dziugo
Title: Re: [BETA] Battle-Swirl Fix
Post by: zero88 on 2006-05-15 10:50:36
Are the fmvs the only problem with using FF7 in 32bit mode?

The coloring on the prerendered backgrounds is really goofy on mine, but that could be a problem on my end, not the patch's.

Other than that, though, I believe that is it.
Title: Re: [BETA] Battle-Swirl Fix
Post by: Chrisu on 2006-05-15 10:52:03
the colors are better in 32 bit for me, but the problems are the fmvs...
Title: Re: [BETA] Battle-Swirl Fix
Post by: happsai on 2006-05-16 01:29:00
Dziugo, your patch works brilliantly!   :-D
I recently took out the swirl effect because I alt-tab a lot.
Now I have the swirl effect in the game (no more rainbow wierdness) and I can multitask all I want.

I just wanted to say thank you and congratulations on making an excellent fix!
Title: Re: [BETA] Battle-Swirl Fix
Post by: EmperorSteele on 2006-05-16 05:02:36
Yeah, I just played for a good hour straight; no crashes yet =)

I'm still gonna run through the game in a few palces and see if it has any adverse effects, but i'm doubting it.
Title: Re: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-05-16 07:23:22
Thanks for trying it out! I don't have time to fully test those patches, so your help is greatly appreciated. Now, let's incorporate it into MGP along with a frame-limiter (anyone wants to be a private beta-tester?).

dziugo
Title: Re: [BETA] Battle-Swirl Fix
Post by: Wuz on 2006-05-16 14:34:56
i'll beta test
i'm unemployed and have nothing better to do :)
Title: Re: [BETA] Battle-Swirl Fix
Post by: EmperorSteele on 2006-05-17 05:30:59
Actually, i need to ask you something that's along the lines of a frame-limiter..

What Refresh rating does ff7 run at?  Because i've been getting like "phantom-trails" (particularily when the camera pans around the party when they win a battle) and other graphical quirks that're consistant with a low MhZ rating against a high frame rate, and i was wondering if there was a way to ramp the refresh rate to 85 (unless it copies the desktops refresh rating).

or would a frame-limiter fix this?

Anywy, I'll betatest =)
Title: Re: [BETA] Battle-Swirl Fix
Post by: Wuz on 2006-05-17 06:20:21
if you have an nvidia graphics card you should be able to force the refresh rate for 640 X 480 to 85Hz easily in your advanced display properties.
Not sure of the ATI equivalent.
Title: Re: [BETA] Battle-Swirl Fix
Post by: ChaosControl on 2006-05-17 07:06:03
Actually, i need to ask you something that's along the lines of a frame-limiter..

What Refresh rating does ff7 run at?  Because i've been getting like "phantom-trails" (particularily when the camera pans around the party when they win a battle) and other graphical quirks that're consistant with a low MhZ rating against a high frame rate, and i was wondering if there was a way to ramp the refresh rate to 85 (unless it copies the desktops refresh rating).

or would a frame-limiter fix this?

Anywy, I'll betatest =)
Didn't FF7 have Vsync?
Title: Re: [BETA] Battle-Swirl Fix
Post by: Relf on 2006-05-17 20:18:36
I just re-installed FF7, and was thinking of patching the hell out of it, sure I will start with MGP!
Title: Re: [BETA] Battle-Swirl Fix
Post by: Zengar Zombolt on 2006-07-13 16:34:29
The link seems to be down... Can someone please rehost the fix? Thank you! :D
Title: Re: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-07-13 19:10:47
Works fine for me...
Title: Re: [BETA] Battle-Swirl Fix
Post by: tekwiz99 on 2006-07-14 04:44:25
and what about running under Vista beta... no default DirectMedia will work anymore.
therefore, no fmv for me.
Title: Re: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-07-14 06:49:17
What it has to do with battle-swirl?
Title: Re: [BETA] Battle-Swirl Fix
Post by: chesterkit on 2006-08-07 18:35:10
Hello, I've been having a lot of trouble with this lately.. I'll copy what I said in another message board and paste it here..

Quote
Ok long story short.. I got the game off e-bay, installed it.. Then the videos wouldn't play, you know black screens.. So I reinstalled it, and installed the other required drivers/files for the game, the one that is for direct X I assume, no not direct X itself cause I have 9C. Anyway... I then got the upside down videos, fixed that.. And NOW, I try to play the game, and get into the very first battle.. Well guess what? Yep, it crashes. And asks me to debug or no, it doesn't matter what I pick it still closes the game.

Anyway, I got windows 2k and a GeForce 4 MX video card, I understand that 2k and FF7 don't like each other and all that, but is there no way around this? I have tried everything, tried that windows 98 Emulation stuff, messed with the drivers, the settings for the game, went to microsoft to see if they had any updates which would fix the problem... I don't know what else to do. Any help would be much appreciated.

Ok I got a responce to come to this thread and try out your patch, I tried it and...

Quote
You know what? I'm just gonna say **** it! I reinstalled the game like five times, I didin't get to check the patch out because when I got in game I tried to check out the menu and see if it worked, THAT didin't even work.. IT crashed to desktop without a second though, this is really driving me insane. I'm not going to sit here for a whole week trying to get this damned game to work, I might as well get it for play station one.

And...

Quote
Well I tried it again one last time, I got into a battle.. I pushed attack and clicked on the dude, but it closed right out. Also, no music this time around. Anyway... Anyone wanna play with my guinee pig of a game and try to fix the bugs? Obviously FF7 DOES have problems with 2000, maybe someone could tackle those so 2000 users don't have to suffer? Just a thought, as of now I haven't found any patches that seem to work.

Ok I think that's pretty much it.. I've only installed your patch, because NO other patch I've tried seems to work. And this one seems to be the closest to actually fixing my problem, seeing as I was able to click attack this time and the fact that the error message about debugging didin't come up, and the game just closed out. If you want I can mess with it a little, beta testing and stuff. I really want to play this game so let's get this problem where it hurts lol.
Title: Re: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-08-09 17:46:28
Sorry for not replying for... 2 days, I didn't have access to a PC (or I didn't want to have...).
Well I tried it again one last time, I got into a battle..
Actually, that's as far as this patch will get you to. It only fixes the battle-swirl bug.
(...)the error message about debugging didin't come up, and the game just closed out.
It would be better if I had something to start with. Are you sure there was no debug info? Memory address where the crash occured will do.
If you want I can mess with it a little, beta testing and stuff.
You can:
1) Try and get me Win2k + convince me to uninstall my Win2k3.
2) Send me your PC. Thanks if you do! :P
3) Install some new OS (ok, haven't said that)

I won't even try to fix it remotely. Check once again if it leaves you any error message. If you haven't yet tried it, check this link (http://www.joikkeli.org/janne/ff7.html). I know that there are still people with Win2k, and probably some with FF7 facing similar problems as you do. Just don't give up.

dziugo
Title: Re: [BETA] Battle-Swirl Fix
Post by: chesterkit on 2006-08-09 19:17:15
Hmmm.. Will this work? Hold on.. I got the message again.

Ok the "title" says
Quote
"DEFAULT: ff7.exe -Application Error

Then.. In the bulk of it..

Quote
"The instruction at "0x006ab186" rferenced memory at "0x01fd4a80". The memory could not be "read"

Click OK to terminate the program
Click CANCEL to debug the program.

And that's it.

Also I'm gonna try that page you gave me, it might just be what I need.
Title: Re: [BETA] Battle-Swirl Fix
Post by: dziugo on 2006-08-09 19:20:39
Hmmm.. Will this work? Hold on.. I got the message again.
Perfect.
Also I'm gonna try that page you gave me, it might just be what I need.
Give us a shout if it worked.

dziugo
Title: Re: [BETA] Battle-Swirl Fix
Post by: chesterkit on 2006-08-09 19:43:13
Well I tried it out, the same error came up. From what I saw it didin't make any difference.


Small edit: Btw, I still have no music after the opening cut scene, you know that upbeat music that comes into play when everyone juimps off the train.