Author Topic: CPU load  (Read 6367 times)

stormmedia

  • *
  • Posts: 503
    • View Profile
CPU load
« on: 2006-06-01 19:20:53 »
I noticed that ff7 is using 70% or so of my cpu even if I have a 3ghz.  This game load the CPU a lot.  I think this is because that the game has a loop for the keypress,  I mean that it's looping until u press a key and when you press the key it's doing the action.  This kind of programation was in the time of the Microsft Dos I think and the problem with this is that more your CPU is fast more this loop is fast so the CPU is always loaded even if you have a pretty fast computer.  Would it be a way to kill this loop so it's doing nothing until you press a key it would help me a little with my soundfont project and... well it's not normal that a old game as ff7 take more CPU than Heroes of Might an Magic V...

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: CPU load
« Reply #1 on: 2006-06-01 19:44:43 »
That's how frame-limiting works in FF7 - it loops until it's time to process another frame. Without using Sleep! I'm surpised that it doesn't eat 100% of your CPU. Oh, and you can just give the lower priority to your FF7 process - it should do the trick.

dziugo

rmco2003

  • Guest
Re: CPU load
« Reply #2 on: 2006-06-01 19:48:03 »
Does it do this no matter what graphics mode you are using? Accelerated versus Software Rendered? I managed to fix my slow loading problem by switching to Software Rendering but I'm not sure if that applies to your situation... It might just be down to inefficient code, I know on my setup I can handle Tomb Raider Legends perfectly with antialiasing applied (no advanced graphics though) and yet I still get a short freeze in FF7 (about half a second) whilst that knights summon is loading, which is pretty annoying...

stormmedia

  • *
  • Posts: 503
    • View Profile
Re: CPU load
« Reply #3 on: 2006-06-01 20:43:18 »
rmco2003 no matter the graphic mode that I use it doesn't matter it's just the way the code is bult.  and dziugo if it doesn't eat 100% of my CPU it might be because of the hyper threading.  And I've already tried to lower the prority and it's doesn't do anything... as usual.... it didn't changed anything every time I tried to lower a application priority.... well... there is no way to make ff7 to eat a little less of the CPU ??
« Last Edit: 2006-06-01 20:49:18 by stormmedia »

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: CPU load
« Reply #4 on: 2006-06-01 21:36:32 »
Of course there is. Replace Square's frame-limiter(s) with the one that makes proper use of Sleep command. New version of MGP has that kind of frame-limiter, but:
a) To replace it, I need some time (let's just say, that it's not a high-priority case right now :P)
b) The new code isn't fully tested (only few people applied to beta-tests)

dziugo

stormmedia

  • *
  • Posts: 503
    • View Profile
Re: CPU load
« Reply #5 on: 2006-06-01 21:45:08 »
Actualy I didn't heard about MGP what is it ??  I could make some test if you want.

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: CPU load
« Reply #6 on: 2006-06-01 21:52:28 »
Some info here. What's your OS if I may ask?

dziugo

stormmedia

  • *
  • Posts: 503
    • View Profile
Re: CPU load
« Reply #7 on: 2006-06-01 22:54:38 »
I have Windows XP and I had hear about the mini game patcher... I just didn't think that MGP was this patch.  So do you think you could tell me what code to modify in the ff7.exe to get rid of this looping??  Oh and I'll be glade to help you testing your beta version it's just that for now I don't have much time to test or do much thing about ff7... the only thing I'm working on these time is my soundfont and the NPC RC. 

Well see you.

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: CPU load
« Reply #8 on: 2006-06-02 09:58:13 »
I have Windows XP and I had hear about the mini game patcher... I just didn't think that MGP was this patch.
IjmaoeIsow. (I just make abbreviations of everything I see or write :P).
So do you think you could tell me what code to modify in the ff7.exe to get rid of this looping??  Oh and I'll be glade to help you testing your beta version (...)
Beta tester familiar with assembler? That's so cool :)

dziugo

stormmedia

  • *
  • Posts: 503
    • View Profile
Re: CPU load
« Reply #9 on: 2006-06-02 15:01:17 »
haha... well... familiar is a big word.... I just know the basic I wouldn't be able to do much unless you tell me how  :-P.

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Re: CPU load
« Reply #10 on: 2006-06-02 23:33:11 »
Mm, no offense, D, but my cpu usage stayed between 97 and 99 % with your patch applied =/

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: CPU load
« Reply #11 on: 2006-06-03 00:05:38 »
That's because nothing has been replaced so far.

dziugo

EmperorSteele

  • *
  • Posts: 933
    • View Profile
Re: CPU load
« Reply #12 on: 2006-06-03 04:42:17 »
oh, *smacks self* i read your posts wrong then.. gawd i'm dense

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: CPU load
« Reply #13 on: 2006-06-03 07:46:16 »
Heh, sometimes even I don't know for sure what I wanted to say :P

stormmedia

  • *
  • Posts: 503
    • View Profile
Re: CPU load
« Reply #14 on: 2006-06-08 18:17:32 »
Hey dziugo could you give my the code I have to modify to fix CPU load please (well if it's ready) because I would like to make some test ingame with my soundfont but I can't because I have some problem of overheat on my CPU these time so if I run my soundfont at the same time of the game if I play some time my CPU overheat and my computer freaze with the fantastic blue screen telling that my cumputer will reboot to protect my cumputer.

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: CPU load
« Reply #15 on: 2006-06-08 18:50:00 »
Nope sorry. I looked into the schedule, and next dziugo's free time would be July if I'm lucky (and probably sooner, because I always look for opportunity to waste my time when I should be studying :P).

dziugo

stormmedia

  • *
  • Posts: 503
    • View Profile
Re: CPU load
« Reply #16 on: 2006-06-08 21:33:03 »
Well thanks anyways  :wink:

Please let me know when you have it I'd appreciate it greatly.