Author Topic: Problems Remaining for FF7 PC (1998)  (Read 16537 times)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Problems Remaining for FF7 PC (1998)
« on: 2012-08-15 18:18:28 »
I sent this to Dziugo.  If he gets the time he will look into them.  These are the remaining issues with the current game.
If anyone else can help or has information regarding these issues, please let me know.

OK this is a save file and Kranmer.dll to help you should you decide to help with the issues :)

here: http://dl.dropbox.com/u/36889302/FF7/dziugo.zip

Game 4: Wallmarket
Problem: when you enter wallmarket, there is a visible skip at regular intervals during panning.
Not a code bug.  Solution by Dziugo.

Game 3:
Outside Submarine and Snowboard game.

1.  Submarine game uses timegettime for the actual clock.  This means that although gameplay
   is frame based, the timer will always countdown the same, giving people with slow computers a
   disadvantage.

2.  The same problem exists with the Snowboard game.
[I have fixed these]

I am not sure if anything can be done here to make these games use frame based timer
and not windows internal timer (or queryperformance... whatever is used).

=============================
FPS problem. Field not operating at full 30fps.

resulting in choppy gameplay.
Especially evident with fraps when recording, where it takes an even further dip.
This dip does not occur when setting game to 60fps and then using record in fraps limited to 30.
This problem does not occur at all in FF8 PC.

I have included Kranmer.dll  This will allow you to speed up the game to 60fps
To use, place in FF7.exe folder and add
load_library = "kranmer"
   to Aali's opengl config. (Press Alt + 3 in game to set to 60fps)

« Last Edit: 2013-10-22 00:00:46 by DLPB »

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: Problems Remaining
« Reply #1 on: 2012-08-16 02:34:32 »
You should probably caption this thread's title with something like [FF7 PC]. Just saying.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #2 on: 2012-08-16 03:11:09 »
Are you planning on comparing the scripts for these two or some such thing?
This seems more like Gameplay Mods too me.

FF8 PC was a direct port from the Ps1 production code (see halkun the keeper of lore regarding that). There is no comparison, I also seem to also recall the engine is much different than FF7's (the model formats etc are significantly more refined and almost use PS1 PsyQ formats directly instead of a mostly custom format like FF7).

Good fortune in any case.

Cyb

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #3 on: 2012-08-16 03:42:41 »
I may compare how both games are calculating frame rate, but I do not know what could cause what I see happening.  Bad oversight maybe?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #4 on: 2012-09-22 02:23:02 »
I had a little look at the panning code.  From what I can gather, certain times each iteration is moving the camera and most other times it takes more loops to move it once.   This leads to a perception of jerky movement. 

The  function starts at 0x643D22

This may be related to the main camera movement or the frame calculations.  I tried running up and down the screen a few times and that didn't seem to have the same jerky motion as the panning... but you never know.

I am not sure if Aali fixed this.  I did mention it to him over 6 months ago so....
« Last Edit: 2012-09-22 08:18:00 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #5 on: 2012-09-22 18:47:47 »
Can someone check the new ff7 (2012) and see if

a.  The panning bug is fixed

b.  fps runs at 30 dead on and when recording with fraps too.

ajthedj747

  • *
  • Posts: 305
  • Looking Forward to 2017
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #6 on: 2012-09-23 18:22:07 »
Can someone check the new ff7 (2012) and see if

a.  The panning bug is fixed

b.  fps runs at 30 dead on and when recording with fraps too.
Sure, I would be more than happy to do that. I will do it when I get off work. Should I use FRAPS 99, or is there a better application out there than FRAPS? I wish there was an application that I could buy that could tell me real-time data on computer games.

I will begin soon. So far from what I have already experienced, the panning and the frame rates are smooth, yet that might be because of external settings that I have used with the AMD Catalyst Control Panel for the Sapphire ATI HD5670 video card.

The settings are as follows:

Code: [Select]
Anti-Aliasing Settings:

Morphological filtering Enabled

Level 8x

24x sampling

Edge detect filter Enabled


Anisotropoic filtering:

16x per pixel samples


Tessellation

64x


High Quality Filtering Quality

Surface Format Optimization Enabled


Vertical Refresh set to always on


Anti-Aliasing Mode set to Super-sample AA

Triple buffering  Enabled for the OpenGL Settings

Another thing to note is, no matter which Screen Resolution option you choose, it is only available for 60 Hz. Too bad they did not make it for 75 Hz or 120 Hz, because some people do have expensive televisions, or should I say Teles.
« Last Edit: 2012-09-23 18:24:06 by ajthedj747 »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #7 on: 2012-09-23 18:36:41 »
It's been confirmed that the problems I mentioned are still part of 2012 version.  Forgot to note it here.  Dziugo is looking into it.

ajthedj747

  • *
  • Posts: 305
  • Looking Forward to 2017
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #8 on: 2012-09-23 19:02:40 »
Is it possible to use "kranmer.dll" with the 2012 version?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #9 on: 2012-09-23 19:13:25 »
No, since you'd need to inject it and there is no aali config file to do that and even if you could the addresses are different.  It should be fairly simple to adapt it (just add C00 to all addresses) and I am creating my own loader but fact is no it wont without a new dll.  And I don't care about 2012 version tbh... just needed to see if the bug exists in it still which it does :)

Once I create my loader, kranmer may update his dll and then you may be able to.
« Last Edit: 2012-09-23 19:15:11 by DLPB »

ajthedj747

  • *
  • Posts: 305
  • Looking Forward to 2017
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #10 on: 2012-09-23 19:34:40 »
[quote author=DLPB link=topic=13431.msg191653#msg191653 date=1348427605]
Quote
No, since you'd need to inject it and there is no aali config file to do that and even if you could the addresses are different.  It should be fairly simple to adapt it (just add C00 to all addresses) and I am creating my own loader but fact is no it wont without a new dll.  And I don't care about 2012 version tbh... just needed to see if the bug exists in it still which it does :?:


Once I create my loader, kranmer may update his dll and then you may be able to.

Thanks, I appreciate it. So my world map looks cool because I am using my modded one from the 1998 version. It is hard to navigate though with the Highwind because of this. Yes, I am aware that the 2012 version does not use Aali's Open-Gl Driver, yet I was able to get many 3D models to work well with the battle.lgp, char.lgp and world_us.lgp without any problems. I love how the world map loads instantly on the 2012 version, while on the 1998 version, you have to wait patiently for a few seconds.

Congratulations to @dziugo for finding an error made by the mighty Square-Enix Holdings Limited Incorporated / Eidos. I appreciate the work you have done. I will fix the script for myself later.

I played the save file from the dropbox website and had my butt handed to me yet again by Emerald Weapon. I think Emerald Weapon is harder in the 2012 version than the 1998 version due to fact that there is yet to be a 9999 HP /MP patch for that version.

I like both versions, yet I am like @DLPB and prefer the 1998 version. It is far better written and has no restrictive baloney  sandwich like the Game Save Synchronizing Cloud.

Seems like both of you are getting close to solving these problems. Keep up the good work. :-)
« Last Edit: 2012-09-25 10:21:39 by ajthedj747 »

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: Problems Remaining for FF7 PC (1998)
« Reply #11 on: 2012-09-23 19:54:55 »
Ok, instead of PM-ing you, I'll post it here for reference. There is no bug in the code! Square made a mistake when creating the script. To fix it, open flevel.lgp with flevel editor (Makou Reactor is great!), go to file mrkt2, group "camera" (Id=3), Script1 and change:
Code: [Select]
Scroll to location (X=0, Y=-240, speed=470)Into:
Code: [Select]
Scroll to location (X=0, Y=-240, speed=480)The panning is from 240 to -240 which gives you 480 "pixels", but the length of the animation is set to 470. So it skips sometimes to end it at -240 when the timer hits 470. Changing it to 480 fixes it.

Here is the log from debugger (logging Y value):
Code: [Select]
00643F7A  LOG:  0F0 (240.)
00643F7A  LOG:  0EF (239.)
00643F7A  LOG:  0EE (238.)
00643F7A  LOG:  0ED (237.)
00643F7A  LOG:  0EC (236.)
00643F7A  LOG:  0EB (235.)
00643F7A  LOG:  0EA (234.)
00643F7A  LOG:  0E9 (233.)
00643F7A  LOG:  0E8 (232.)
00643F7A  LOG:  0E7 (231.)
00643F7A  LOG:  0E6 (230.)
00643F7A  LOG:  0E5 (229.)
00643F7A  LOG:  0E4 (228.)
00643F7A  LOG:  0E3 (227.)
00643F7A  LOG:  0E2 (226.)
00643F7A  LOG:  0E1 (225.)
00643F7A  LOG:  0E0 (224.)
00643F7A  LOG:  0DF (223.)
00643F7A  LOG:  0DE (222.)
00643F7A  LOG:  0DD (221.)
00643F7A  LOG:  0DC (220.)
00643F7A  LOG:  0DB (219.)
00643F7A  LOG:  0DA (218.)
00643F7A  LOG:  0D9 (217.)
00643F7A  LOG:  0D8 (216.)
00643F7A  LOG:  0D7 (215.)
00643F7A  LOG:  0D6 (214.)
00643F7A  LOG:  0D5 (213.)
00643F7A  LOG:  0D4 (212.)
00643F7A  LOG:  0D3 (211.)
00643F7A  LOG:  0D2 (210.)
00643F7A  LOG:  0D1 (209.)
00643F7A  LOG:  0D0 (208.)
00643F7A  LOG:  0CF (207.)
00643F7A  LOG:  0CE (206.)
00643F7A  LOG:  0CD (205.)
00643F7A  LOG:  0CC (204.)
00643F7A  LOG:  0CB (203.)
00643F7A  LOG:  0CA (202.)
00643F7A  LOG:  0C9 (201.)
00643F7A  LOG:  0C8 (200.)
00643F7A  LOG:  0C7 (199.)
00643F7A  LOG:  0C6 (198.)
00643F7A  LOG:  0C5 (197.)
00643F7A  LOG:  0C4 (196.)
00643F7A  LOG:  0C3 (195.)
00643F7A  LOG:  0C2 (194.)
---
00643F7A  LOG:  0C0 (192.)
00643F7A  LOG:  0BF (191.)
00643F7A  LOG:  0BE (190.)
00643F7A  LOG:  0BD (189.)
00643F7A  LOG:  0BC (188.)
00643F7A  LOG:  0BB (187.)
00643F7A  LOG:  0BA (186.)
00643F7A  LOG:  0B9 (185.)
00643F7A  LOG:  0B8 (184.)
00643F7A  LOG:  0B7 (183.)
00643F7A  LOG:  0B6 (182.)
00643F7A  LOG:  0B5 (181.)
00643F7A  LOG:  0B4 (180.)
00643F7A  LOG:  0B3 (179.)
00643F7A  LOG:  0B2 (178.)
00643F7A  LOG:  0B1 (177.)
00643F7A  LOG:  0B0 (176.)
00643F7A  LOG:  0AF (175.)
00643F7A  LOG:  0AE (174.)
00643F7A  LOG:  0AD (173.)
00643F7A  LOG:  0AC (172.)
00643F7A  LOG:  0AB (171.)
00643F7A  LOG:  0AA (170.)
00643F7A  LOG:  0A9 (169.)
00643F7A  LOG:  0A8 (168.)
00643F7A  LOG:  0A7 (167.)
00643F7A  LOG:  0A6 (166.)
00643F7A  LOG:  0A5 (165.)
00643F7A  LOG:  0A4 (164.)
00643F7A  LOG:  0A3 (163.)
00643F7A  LOG:  0A2 (162.)
00643F7A  LOG:  0A1 (161.)
00643F7A  LOG:  0A0 (160.)
00643F7A  LOG:  9F (159.)
00643F7A  LOG:  9E (158.)
00643F7A  LOG:  9D (157.)
00643F7A  LOG:  9C (156.)
00643F7A  LOG:  9B (155.)
00643F7A  LOG:  9A (154.)
00643F7A  LOG:  99 (153.)
00643F7A  LOG:  98 (152.)
00643F7A  LOG:  97 (151.)
00643F7A  LOG:  96 (150.)
00643F7A  LOG:  95 (149.)
00643F7A  LOG:  94 (148.)
00643F7A  LOG:  93 (147.)
00643F7A  LOG:  92 (146.)
---
00643F7A  LOG:  90 (144.)
00643F7A  LOG:  8F (143.)
00643F7A  LOG:  8E (142.)
00643F7A  LOG:  8D (141.)
00643F7A  LOG:  8C (140.)
00643F7A  LOG:  8B (139.)
00643F7A  LOG:  8A (138.)
00643F7A  LOG:  89 (137.)
00643F7A  LOG:  88 (136.)
00643F7A  LOG:  87 (135.)
00643F7A  LOG:  86 (134.)
00643F7A  LOG:  85 (133.)
00643F7A  LOG:  84 (132.)
00643F7A  LOG:  83 (131.)
00643F7A  LOG:  82 (130.)
00643F7A  LOG:  81 (129.)
00643F7A  LOG:  80 (128.)
00643F7A  LOG:  7F (127.)
00643F7A  LOG:  7E (126.)
00643F7A  LOG:  7D (125.)
00643F7A  LOG:  7C (124.)
00643F7A  LOG:  7B (123.)
00643F7A  LOG:  7A (122.)
00643F7A  LOG:  79 (121.)
00643F7A  LOG:  78 (120.)
00643F7A  LOG:  77 (119.)
00643F7A  LOG:  76 (118.)
00643F7A  LOG:  75 (117.)
00643F7A  LOG:  74 (116.)
00643F7A  LOG:  73 (115.)
00643F7A  LOG:  72 (114.)
00643F7A  LOG:  71 (113.)
00643F7A  LOG:  70 (112.)
00643F7A  LOG:  6F (111.)
00643F7A  LOG:  6E (110.)
00643F7A  LOG:  6D (109.)
00643F7A  LOG:  6C (108.)
00643F7A  LOG:  6B (107.)
00643F7A  LOG:  6A (106.)
00643F7A  LOG:  69 (105.)
00643F7A  LOG:  68 (104.)
00643F7A  LOG:  67 (103.)
00643F7A  LOG:  66 (102.)
00643F7A  LOG:  65 (101.)
00643F7A  LOG:  64 (100.)
00643F7A  LOG:  63 (99.)
00643F7A  LOG:  62 (98.)
---
00643F7A  LOG:  60 (96.)
00643F7A  LOG:  5F (95.)
00643F7A  LOG:  5E (94.)
00643F7A  LOG:  5D (93.)
00643F7A  LOG:  5C (92.)
00643F7A  LOG:  5B (91.)
00643F7A  LOG:  5A (90.)
00643F7A  LOG:  59 (89.)
00643F7A  LOG:  58 (88.)
00643F7A  LOG:  57 (87.)
00643F7A  LOG:  56 (86.)
00643F7A  LOG:  55 (85.)
00643F7A  LOG:  54 (84.)
00643F7A  LOG:  53 (83.)
00643F7A  LOG:  52 (82.)
00643F7A  LOG:  51 (81.)
00643F7A  LOG:  50 (80.)
00643F7A  LOG:  4F (79.)
00643F7A  LOG:  4E (78.)
00643F7A  LOG:  4D (77.)
00643F7A  LOG:  4C (76.)
00643F7A  LOG:  4B (75.)
00643F7A  LOG:  4A (74.)
00643F7A  LOG:  49 (73.)
00643F7A  LOG:  48 (72.)
00643F7A  LOG:  47 (71.)
00643F7A  LOG:  46 (70.)
00643F7A  LOG:  45 (69.)
00643F7A  LOG:  44 (68.)
00643F7A  LOG:  43 (67.)
00643F7A  LOG:  42 (66.)
00643F7A  LOG:  41 (65.)
00643F7A  LOG:  40 (64.)
00643F7A  LOG:  3F (63.)
00643F7A  LOG:  3E (62.)
00643F7A  LOG:  3D (61.)
00643F7A  LOG:  3C (60.)
00643F7A  LOG:  3B (59.)
00643F7A  LOG:  3A (58.)
00643F7A  LOG:  39 (57.)
00643F7A  LOG:  38 (56.)
00643F7A  LOG:  37 (55.)
00643F7A  LOG:  36 (54.)
00643F7A  LOG:  35 (53.)
00643F7A  LOG:  34 (52.)
00643F7A  LOG:  33 (51.)
00643F7A  LOG:  32 (50.)
---
00643F7A  LOG:  30 (48.)
00643F7A  LOG:  2F (47.)
00643F7A  LOG:  2E (46.)
00643F7A  LOG:  2D (45.)
00643F7A  LOG:  2C (44.)
00643F7A  LOG:  2B (43.)
00643F7A  LOG:  2A (42.)
00643F7A  LOG:  29 (41.)
00643F7A  LOG:  28 (40.)
00643F7A  LOG:  27 (39.)
00643F7A  LOG:  26 (38.)
00643F7A  LOG:  25 (37.)
00643F7A  LOG:  24 (36.)
00643F7A  LOG:  23 (35.)
00643F7A  LOG:  22 (34.)
00643F7A  LOG:  21 (33.)
00643F7A  LOG:  20 (32.)
00643F7A  LOG:  1F (31.)
00643F7A  LOG:  1E (30.)
00643F7A  LOG:  1D (29.)
00643F7A  LOG:  1C (28.)
00643F7A  LOG:  1B (27.)
00643F7A  LOG:  1A (26.)
00643F7A  LOG:  19 (25.)
00643F7A  LOG:  18 (24.)
00643F7A  LOG:  17 (23.)
00643F7A  LOG:  16 (22.)
00643F7A  LOG:  15 (21.)
00643F7A  LOG:  14 (20.)
00643F7A  LOG:  13 (19.)
00643F7A  LOG:  12 (18.)
00643F7A  LOG:  11 (17.)
00643F7A  LOG:  10 (16.)
00643F7A  LOG:  0F (15.)
00643F7A  LOG:  0E (14.)
00643F7A  LOG:  0D (13.)
00643F7A  LOG:  0C (12.)
00643F7A  LOG:  0B (11.)
00643F7A  LOG:  0A (10.)
00643F7A  LOG:  9
00643F7A  LOG:  8
00643F7A  LOG:  7
00643F7A  LOG:  6
00643F7A  LOG:  5
00643F7A  LOG:  4
00643F7A  LOG:  3
00643F7A  LOG:  2
---
00643F7A  LOG:  0
00643F7A  LOG:  FFFFFFFF (4294967295.)
00643F7A  LOG:  FFFFFFFE (4294967294.)
00643F7A  LOG:  FFFFFFFD (4294967293.)
00643F7A  LOG:  FFFFFFFC (4294967292.)
00643F7A  LOG:  FFFFFFFB (4294967291.)
00643F7A  LOG:  FFFFFFFA (4294967290.)
00643F7A  LOG:  FFFFFFF9 (4294967289.)
00643F7A  LOG:  FFFFFFF8 (4294967288.)
00643F7A  LOG:  FFFFFFF7 (4294967287.)
00643F7A  LOG:  FFFFFFF6 (4294967286.)
00643F7A  LOG:  FFFFFFF5 (4294967285.)
00643F7A  LOG:  FFFFFFF4 (4294967284.)
00643F7A  LOG:  FFFFFFF3 (4294967283.)
00643F7A  LOG:  FFFFFFF2 (4294967282.)
00643F7A  LOG:  FFFFFFF1 (4294967281.)
00643F7A  LOG:  FFFFFFF0 (4294967280.)
00643F7A  LOG:  FFFFFFEF (4294967279.)
00643F7A  LOG:  FFFFFFEE (4294967278.)
00643F7A  LOG:  FFFFFFED (4294967277.)
00643F7A  LOG:  FFFFFFEC (4294967276.)
00643F7A  LOG:  FFFFFFEB (4294967275.)
00643F7A  LOG:  FFFFFFEA (4294967274.)
00643F7A  LOG:  FFFFFFE9 (4294967273.)
00643F7A  LOG:  FFFFFFE8 (4294967272.)
00643F7A  LOG:  FFFFFFE7 (4294967271.)
00643F7A  LOG:  FFFFFFE6 (4294967270.)
00643F7A  LOG:  FFFFFFE5 (4294967269.)
00643F7A  LOG:  FFFFFFE4 (4294967268.)
00643F7A  LOG:  FFFFFFE3 (4294967267.)
00643F7A  LOG:  FFFFFFE2 (4294967266.)
00643F7A  LOG:  FFFFFFE1 (4294967265.)
00643F7A  LOG:  FFFFFFE0 (4294967264.)
00643F7A  LOG:  FFFFFFDF (4294967263.)
00643F7A  LOG:  FFFFFFDE (4294967262.)
00643F7A  LOG:  FFFFFFDD (4294967261.)
00643F7A  LOG:  FFFFFFDC (4294967260.)
00643F7A  LOG:  FFFFFFDB (4294967259.)
00643F7A  LOG:  FFFFFFDA (4294967258.)
00643F7A  LOG:  FFFFFFD9 (4294967257.)
00643F7A  LOG:  FFFFFFD8 (4294967256.)
00643F7A  LOG:  FFFFFFD7 (4294967255.)
00643F7A  LOG:  FFFFFFD6 (4294967254.)
00643F7A  LOG:  FFFFFFD5 (4294967253.)
00643F7A  LOG:  FFFFFFD4 (4294967252.)
00643F7A  LOG:  FFFFFFD3 (4294967251.)
00643F7A  LOG:  FFFFFFD2 (4294967250.)
---
00643F7A  LOG:  FFFFFFD0 (4294967248.)
00643F7A  LOG:  FFFFFFCF (4294967247.)
00643F7A  LOG:  FFFFFFCE (4294967246.)
00643F7A  LOG:  FFFFFFCD (4294967245.)
00643F7A  LOG:  FFFFFFCC (4294967244.)
00643F7A  LOG:  FFFFFFCB (4294967243.)
00643F7A  LOG:  FFFFFFCA (4294967242.)
00643F7A  LOG:  FFFFFFC9 (4294967241.)
00643F7A  LOG:  FFFFFFC8 (4294967240.)
00643F7A  LOG:  FFFFFFC7 (4294967239.)
00643F7A  LOG:  FFFFFFC6 (4294967238.)
00643F7A  LOG:  FFFFFFC5 (4294967237.)
00643F7A  LOG:  FFFFFFC4 (4294967236.)
00643F7A  LOG:  FFFFFFC3 (4294967235.)
00643F7A  LOG:  FFFFFFC2 (4294967234.)
00643F7A  LOG:  FFFFFFC1 (4294967233.)
00643F7A  LOG:  FFFFFFC0 (4294967232.)
00643F7A  LOG:  FFFFFFBF (4294967231.)
00643F7A  LOG:  FFFFFFBE (4294967230.)
00643F7A  LOG:  FFFFFFBD (4294967229.)
00643F7A  LOG:  FFFFFFBC (4294967228.)
00643F7A  LOG:  FFFFFFBB (4294967227.)
00643F7A  LOG:  FFFFFFBA (4294967226.)
00643F7A  LOG:  FFFFFFB9 (4294967225.)
00643F7A  LOG:  FFFFFFB8 (4294967224.)
00643F7A  LOG:  FFFFFFB7 (4294967223.)
00643F7A  LOG:  FFFFFFB6 (4294967222.)
00643F7A  LOG:  FFFFFFB5 (4294967221.)
00643F7A  LOG:  FFFFFFB4 (4294967220.)
00643F7A  LOG:  FFFFFFB3 (4294967219.)
00643F7A  LOG:  FFFFFFB2 (4294967218.)
00643F7A  LOG:  FFFFFFB1 (4294967217.)
00643F7A  LOG:  FFFFFFB0 (4294967216.)
00643F7A  LOG:  FFFFFFAF (4294967215.)
00643F7A  LOG:  FFFFFFAE (4294967214.)
00643F7A  LOG:  FFFFFFAD (4294967213.)
00643F7A  LOG:  FFFFFFAC (4294967212.)
00643F7A  LOG:  FFFFFFAB (4294967211.)
00643F7A  LOG:  FFFFFFAA (4294967210.)
00643F7A  LOG:  FFFFFFA9 (4294967209.)
00643F7A  LOG:  FFFFFFA8 (4294967208.)
00643F7A  LOG:  FFFFFFA7 (4294967207.)
00643F7A  LOG:  FFFFFFA6 (4294967206.)
00643F7A  LOG:  FFFFFFA5 (4294967205.)
00643F7A  LOG:  FFFFFFA4 (4294967204.)
00643F7A  LOG:  FFFFFFA3 (4294967203.)
00643F7A  LOG:  FFFFFFA2 (4294967202.)
---
00643F7A  LOG:  FFFFFFA0 (4294967200.)
00643F7A  LOG:  FFFFFF9F (4294967199.)
00643F7A  LOG:  FFFFFF9E (4294967198.)
00643F7A  LOG:  FFFFFF9D (4294967197.)
00643F7A  LOG:  FFFFFF9C (4294967196.)
00643F7A  LOG:  FFFFFF9B (4294967195.)
00643F7A  LOG:  FFFFFF9A (4294967194.)
00643F7A  LOG:  FFFFFF99 (4294967193.)
00643F7A  LOG:  FFFFFF98 (4294967192.)
00643F7A  LOG:  FFFFFF97 (4294967191.)
00643F7A  LOG:  FFFFFF96 (4294967190.)
00643F7A  LOG:  FFFFFF95 (4294967189.)
00643F7A  LOG:  FFFFFF94 (4294967188.)
00643F7A  LOG:  FFFFFF93 (4294967187.)
00643F7A  LOG:  FFFFFF92 (4294967186.)
00643F7A  LOG:  FFFFFF91 (4294967185.)
00643F7A  LOG:  FFFFFF90 (4294967184.)
00643F7A  LOG:  FFFFFF8F (4294967183.)
00643F7A  LOG:  FFFFFF8E (4294967182.)
00643F7A  LOG:  FFFFFF8D (4294967181.)
00643F7A  LOG:  FFFFFF8C (4294967180.)
00643F7A  LOG:  FFFFFF8B (4294967179.)
00643F7A  LOG:  FFFFFF8A (4294967178.)
00643F7A  LOG:  FFFFFF89 (4294967177.)
00643F7A  LOG:  FFFFFF88 (4294967176.)
00643F7A  LOG:  FFFFFF87 (4294967175.)
00643F7A  LOG:  FFFFFF86 (4294967174.)
00643F7A  LOG:  FFFFFF85 (4294967173.)
00643F7A  LOG:  FFFFFF84 (4294967172.)
00643F7A  LOG:  FFFFFF83 (4294967171.)
00643F7A  LOG:  FFFFFF82 (4294967170.)
00643F7A  LOG:  FFFFFF81 (4294967169.)
00643F7A  LOG:  FFFFFF80 (4294967168.)
00643F7A  LOG:  FFFFFF7F (4294967167.)
00643F7A  LOG:  FFFFFF7E (4294967166.)
00643F7A  LOG:  FFFFFF7D (4294967165.)
00643F7A  LOG:  FFFFFF7C (4294967164.)
00643F7A  LOG:  FFFFFF7B (4294967163.)
00643F7A  LOG:  FFFFFF7A (4294967162.)
00643F7A  LOG:  FFFFFF79 (4294967161.)
00643F7A  LOG:  FFFFFF78 (4294967160.)
00643F7A  LOG:  FFFFFF77 (4294967159.)
00643F7A  LOG:  FFFFFF76 (4294967158.)
00643F7A  LOG:  FFFFFF75 (4294967157.)
00643F7A  LOG:  FFFFFF74 (4294967156.)
00643F7A  LOG:  FFFFFF73 (4294967155.)
00643F7A  LOG:  FFFFFF72 (4294967154.)
---
00643F7A  LOG:  FFFFFF70 (4294967152.)
00643F7A  LOG:  FFFFFF6F (4294967151.)
00643F7A  LOG:  FFFFFF6E (4294967150.)
00643F7A  LOG:  FFFFFF6D (4294967149.)
00643F7A  LOG:  FFFFFF6C (4294967148.)
00643F7A  LOG:  FFFFFF6B (4294967147.)
00643F7A  LOG:  FFFFFF6A (4294967146.)
00643F7A  LOG:  FFFFFF69 (4294967145.)
00643F7A  LOG:  FFFFFF68 (4294967144.)
00643F7A  LOG:  FFFFFF67 (4294967143.)
00643F7A  LOG:  FFFFFF66 (4294967142.)
00643F7A  LOG:  FFFFFF65 (4294967141.)
00643F7A  LOG:  FFFFFF64 (4294967140.)
00643F7A  LOG:  FFFFFF63 (4294967139.)
00643F7A  LOG:  FFFFFF62 (4294967138.)
00643F7A  LOG:  FFFFFF61 (4294967137.)
00643F7A  LOG:  FFFFFF60 (4294967136.)
00643F7A  LOG:  FFFFFF5F (4294967135.)
00643F7A  LOG:  FFFFFF5E (4294967134.)
00643F7A  LOG:  FFFFFF5D (4294967133.)
00643F7A  LOG:  FFFFFF5C (4294967132.)
00643F7A  LOG:  FFFFFF5B (4294967131.)
00643F7A  LOG:  FFFFFF5A (4294967130.)
00643F7A  LOG:  FFFFFF59 (4294967129.)
00643F7A  LOG:  FFFFFF58 (4294967128.)
00643F7A  LOG:  FFFFFF57 (4294967127.)
00643F7A  LOG:  FFFFFF56 (4294967126.)
00643F7A  LOG:  FFFFFF55 (4294967125.)
00643F7A  LOG:  FFFFFF54 (4294967124.)
00643F7A  LOG:  FFFFFF53 (4294967123.)
00643F7A  LOG:  FFFFFF52 (4294967122.)
00643F7A  LOG:  FFFFFF51 (4294967121.)
00643F7A  LOG:  FFFFFF50 (4294967120.)
00643F7A  LOG:  FFFFFF4F (4294967119.)
00643F7A  LOG:  FFFFFF4E (4294967118.)
00643F7A  LOG:  FFFFFF4D (4294967117.)
00643F7A  LOG:  FFFFFF4C (4294967116.)
00643F7A  LOG:  FFFFFF4B (4294967115.)
00643F7A  LOG:  FFFFFF4A (4294967114.)
00643F7A  LOG:  FFFFFF49 (4294967113.)
00643F7A  LOG:  FFFFFF48 (4294967112.)
00643F7A  LOG:  FFFFFF47 (4294967111.)
00643F7A  LOG:  FFFFFF46 (4294967110.)
00643F7A  LOG:  FFFFFF45 (4294967109.)
00643F7A  LOG:  FFFFFF44 (4294967108.)
00643F7A  LOG:  FFFFFF43 (4294967107.)
00643F7A  LOG:  FFFFFF42 (4294967106.)
---
00643F7A  LOG:  FFFFFF40 (4294967104.)
00643F7A  LOG:  FFFFFF3F (4294967103.)
00643F7A  LOG:  FFFFFF3E (4294967102.)
00643F7A  LOG:  FFFFFF3D (4294967101.)
00643F7A  LOG:  FFFFFF3C (4294967100.)
00643F7A  LOG:  FFFFFF3B (4294967099.)
00643F7A  LOG:  FFFFFF3A (4294967098.)
00643F7A  LOG:  FFFFFF39 (4294967097.)
00643F7A  LOG:  FFFFFF38 (4294967096.)
00643F7A  LOG:  FFFFFF37 (4294967095.)
00643F7A  LOG:  FFFFFF36 (4294967094.)
00643F7A  LOG:  FFFFFF35 (4294967093.)
00643F7A  LOG:  FFFFFF34 (4294967092.)
00643F7A  LOG:  FFFFFF33 (4294967091.)
00643F7A  LOG:  FFFFFF32 (4294967090.)
00643F7A  LOG:  FFFFFF31 (4294967089.)
00643F7A  LOG:  FFFFFF30 (4294967088.)
00643F7A  LOG:  FFFFFF2F (4294967087.)
00643F7A  LOG:  FFFFFF2E (4294967086.)
00643F7A  LOG:  FFFFFF2D (4294967085.)
00643F7A  LOG:  FFFFFF2C (4294967084.)
00643F7A  LOG:  FFFFFF2B (4294967083.)
00643F7A  LOG:  FFFFFF2A (4294967082.)
00643F7A  LOG:  FFFFFF29 (4294967081.)
00643F7A  LOG:  FFFFFF28 (4294967080.)
00643F7A  LOG:  FFFFFF27 (4294967079.)
00643F7A  LOG:  FFFFFF26 (4294967078.)
00643F7A  LOG:  FFFFFF25 (4294967077.)
00643F7A  LOG:  FFFFFF24 (4294967076.)
00643F7A  LOG:  FFFFFF23 (4294967075.)
00643F7A  LOG:  FFFFFF22 (4294967074.)
00643F7A  LOG:  FFFFFF21 (4294967073.)
00643F7A  LOG:  FFFFFF20 (4294967072.)
00643F7A  LOG:  FFFFFF1F (4294967071.)
00643F7A  LOG:  FFFFFF1E (4294967070.)
00643F7A  LOG:  FFFFFF1D (4294967069.)
00643F7A  LOG:  FFFFFF1C (4294967068.)
00643F7A  LOG:  FFFFFF1B (4294967067.)
00643F7A  LOG:  FFFFFF1A (4294967066.)
00643F7A  LOG:  FFFFFF19 (4294967065.)
00643F7A  LOG:  FFFFFF18 (4294967064.)
00643F7A  LOG:  FFFFFF17 (4294967063.)
00643F7A  LOG:  FFFFFF16 (4294967062.)
00643F7A  LOG:  FFFFFF15 (4294967061.)
00643F7A  LOG:  FFFFFF14 (4294967060.)
00643F7A  LOG:  FFFFFF13 (4294967059.)
00643F7A  LOG:  FFFFFF12 (4294967058.)
---
00643F7A  LOG:  FFFFFF10 (4294967056.)
I've marked missing values with ---, that's where you see the skip. I've looked at the PSX version at YouTube and it's there too.

You can fix it without modifying flevel.lgp by hooking the opcode and correcting the steps value on the fly. Sorry, it was that simple. FPS bug is elsewhere.

As a side note, memory offsets in the 2012 release are the same as the 1998 one (1.02 ff7.exe), so anything that doesn't rely on the opengl thing should work if the patcher is not picky (again, the one working in the memory - to patch the file you'd either have to adaptively patch or make the static AF3DN linking to old exe described in the other thread).

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #12 on: 2012-09-23 20:08:47 »
Excellent work Dziugo!  I should have realised this could have been a script error... I looked at that area of script too and didn't put 2 and 2 together! I will get Luksy to add that as a fix.

Now, what of the drop in fps.  That's defo a problem in code of some sort.  ;D

Actually... I will put something here soon too that I don't get.
« Last Edit: 2012-09-23 20:20:51 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #13 on: 2012-09-23 21:29:58 »
1. Ok so main issue is that for some people the fps is 28-29 for field when it should be 30.  For me atm it is 29.

When dxtory or fraps are recording, the fps drops to 27-29 for everyone it seems.  It is definitely not performance related... my graphic card is fast enough so is CPU, tried 2 different systems and so have others I talked to.  When the game is forced to 60fps and then fraps does the limiting, the game records at 30.  No drop.   I don't understand it.  I have tried everything I can think of to get fraps to record to 30 without doing the fps trick noted above.  World map seems to work fine and does not have this issue.  FF8 does not have this issue either.  This issue exists on original game and with aali's driver.

2. The submarine game isnt reaching 30 for me and it uses the same fps code that field does. Isn't reaching it even when in normal play without recording.  It stays at 28.

3.  Assembly code I am also a little puzzled by (maybe unrelated to above):

FPS for Field
Remember to leave world map and enter field for the effect to take place.

007B7840 (this seems to change main fps.  30.0 being 40 3E 00 00 00 00 00 00 )

Starting 0x60e428

It is calculating the correct movement but what is this fsub qword ptr [007B7848] about?
What is it deducting and why (it is deducting 10000)?  There are a few values around the area 007B7840.  What is the relationship, how are they being used? I take it that 007B7820 for example is also part of the fps calculations?













« Last Edit: 2012-09-23 21:35:14 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #14 on: 2012-09-24 07:48:18 »
Note, panning is still skipping on mine but I think it is the fps being 29 this time.  See above.

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: Problems Remaining for FF7 PC (1998)
« Reply #15 on: 2012-09-24 09:50:45 »
Ok, I might know what's going on. First of all, this is how the original frame limiting (mostly) works: info about frame limiting. It's from old times, but should still be (mostly) valid.

Read it? Good. Now about the subtraction - look how (theoretically) a main loop could be constructed:
Code: [Select]
while (notEnd) {
   doStuff1();
   doStuff2 { // dynamic function, calling address changes depending on the module we're in
      startTheRDTSCTimer();                                 A
      doStuff2a(); // here the actual processing work
      idleUntilRDTSCReachesTheDesiredValue();               B
      doStuff2b(); // here some other work
   }
   doStuff3();
}
So, the game makes sure that the time between A and B is at least the time it calculated the frame processing should take... Wait a minute! What about the time it takes to get from B to A again? That's assumed to be exactly 10000 RDTSC ticks (for field).

This could affect the FPS slightly (now I see what you mean). One could correct it (slightly ;p) by moving the B just before A, or actually modding the limiter to take into account at least the last frame processing time (each additional frame will add precision, but with exponentially lowering results - something like 4-5 frames should be enough).

About the panning - make sure that the mod in flevel is done (you could enter some pretty low value and see if the speed increases) and check without FRAPS on vanilla FF7 (no opengl - close one eye if it hurts to see those graphics ;p).

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #16 on: 2012-09-24 10:02:37 »
Aye I understand the theory of fps limiting, I have created 1 or 2 games in delphi using frame based and time based limiting, I've never seen time intervals being corrected by guessing at how many ticks it will take though...

You could give me a few changes to try in assembly and I can see what effect they have maybe?

On makou... I will check.  i did save and load a few times but makou seems to have some serious bugs of late where updating is concerned.  So I will recheck.  Still, my fps is at 29 which doesn't help.  I take it ff8 does this limiting in a more efficient and logical way?  Since it doesn't have these issues.
« Last Edit: 2012-09-24 10:27:21 by DLPB »

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: Problems Remaining for FF7 PC (1998)
« Reply #17 on: 2012-09-24 10:54:12 »
Yeah, correcting the flevel will not correct the FPS thing.

I don't have anything you could try out. I'm thinking what the limiter should be replaced with and how it should be corrected. When I was adding a frame limiter to Highway minigame, I was considering replacing the (flawed) RDTSC with QPC/QPF, but after a little bit of reading I've came to conclusion the extra time needed to bind it into the exe will not be worth it (QPC is flawed too, it needs babysitting on some systems).

You don't actually need a high resolution timing since you never go above 100FPS. Even timeGetTime + timeBeginPeriod + Sleep will do the job, this will also reduce the impact on the CPU.

Just thinking out loud, weekend is over, so no time to do that anyway.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #18 on: 2012-09-24 10:59:38 »
I thought Aali's driver adds in QPC anyway from options?  Not that that is perfect as you say.

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: Problems Remaining for FF7 PC (1998)
« Reply #19 on: 2012-09-24 11:07:08 »
Yes it does, but the original framelimiting is flawed, it doesn't matter if it relies on RDTSC or QPC. QPC is imperfect only on specific hardware and only on heavy load.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #20 on: 2012-09-24 11:08:40 »
I see :)  Well let me know how it goes when you get time again (assuming anything can be done easily).  No rush and good work!  Until then I will just use the fraps trick to limit it if I am recording.
« Last Edit: 2012-09-24 11:26:56 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #21 on: 2012-09-24 12:46:17 »
Also perhaps a look at ff8 code will help with how they did the limiter.  I assume it was done differently and better.

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: Problems Remaining for FF7 PC (1998)
« Reply #22 on: 2012-09-24 13:11:39 »
Don't have FF8 for PC, but judging from the exe they used QPC.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #23 on: 2012-09-24 16:25:30 »
I thought submarine used same code as field fps but it doesnt.  Must be limited elsewhere and on mine it suffers more than anything else.  I cant get it above 28 even on normal play.

Aali's driver doesn't touch it so I will look for it.
« Last Edit: 2012-09-24 16:29:49 by DLPB »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Problems Remaining for FF7 PC (1998)
« Reply #24 on: 2012-09-24 16:37:41 »
Sub fps is 7b7F60 from 77f58a

Your strategy of using fmul by 0.95 gets my sub game to 30 on normal play at least!
« Last Edit: 2012-09-24 16:45:09 by DLPB »