Author Topic: [BETA] Battle-Swirl Fix  (Read 22828 times)

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
[BETA] Battle-Swirl Fix
« 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). 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

dziugo
« Last Edit: 2007-09-28 21:50:31 by dziugo »

Wuz

  • *
  • Posts: 85
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #1 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.
« Last Edit: 2006-05-14 02:02:25 by Wuz »

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #2 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
« Last Edit: 2006-05-14 05:32:28 by EmperorSteele »

Covarr

  • Covarr-Let
  • Administrator
  • *
  • Posts: 3941
  • Just Covarr. No "n".
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #3 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.

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: [BETA] Battle-Swirl Fix
« Reply #4 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?

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [BETA] Battle-Swirl Fix
« Reply #5 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
« Last Edit: 2006-05-14 07:22:51 by dziugo »

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: [BETA] Battle-Swirl Fix
« Reply #6 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
 

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #7 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 =)

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: [BETA] Battle-Swirl Fix
« Reply #8 on: 2006-05-14 16:37:38 »
I know, but cant i play in 32-bit with good fmvs?

Borde

  • *
  • Posts: 891
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #9 on: 2006-05-14 19:27:30 »
Nop, you can't.

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #10 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.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [BETA] Battle-Swirl Fix
« Reply #11 on: 2006-05-15 07:35:16 »
Are the fmvs the only problem with using FF7 in 32bit mode?

dziugo

zero88

  • *
  • Posts: 257
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #12 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.

Chrisu

  • *
  • Posts: 363
  • Simply there
    • View Profile
    • Christian's Programs
Re: [BETA] Battle-Swirl Fix
« Reply #13 on: 2006-05-15 10:52:03 »
the colors are better in 32 bit for me, but the problems are the fmvs...

happsai

  • *
  • Posts: 23
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #14 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!

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #15 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.

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [BETA] Battle-Swirl Fix
« Reply #16 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

Wuz

  • *
  • Posts: 85
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #17 on: 2006-05-16 14:34:56 »
i'll beta test
i'm unemployed and have nothing better to do :)

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #18 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 =)

Wuz

  • *
  • Posts: 85
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #19 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.

ChaosControl

  • *
  • Posts: 741
  • ยค
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #20 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?

Relf

  • *
  • Posts: 709
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #21 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!

Zengar Zombolt

  • Guest
Re: [BETA] Battle-Swirl Fix
« Reply #22 on: 2006-07-13 16:34:29 »
The link seems to be down... Can someone please rehost the fix? Thank you! :D

dziugo

  • *
  • Posts: 1470
    • View Profile
    • A new copy of FF7 thanks to Salk. Pack (zip/rar/etc) your saved game before sending it to me.
Re: [BETA] Battle-Swirl Fix
« Reply #23 on: 2006-07-13 19:10:47 »
Works fine for me...

tekwiz99

  • *
  • Posts: 29
    • View Profile
Re: [BETA] Battle-Swirl Fix
« Reply #24 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.