Final Fantasy 7 > FF7 Tools

[FF7] Preliminary fix for ff7music delay problems [FF7 lessdebug]

(1/4) > >>

Aali:
I'm pretty sure this has bothered many (if not all) ff7music users, sometimes you get a rather long and annoying delay before the music actually kicks in.

This is because FF7 floods ff7music with useless debug info (ff7music intercepts this and uses it to determine what to play) instead of sending the 'important' stuff.

Originally, I was just going to release a patch that would nuke 2 of the things i saw clogging up ff7music on my system, but i realized that this could be handled in a much neater way. So here it is, ff7_lessdebug, a utility for disabling some of FF7's debug messages. For the "regular" user, i have included a config file that will stop the two most common ff7music hogs, but the possibilites are endless; this could also be used to get only the 'relevant' info to show in APP.LOG.

The actual program consists of two files, the patcher and the config file. When the patcher is run, it will read the config file and try to match every line with one or more debug messages. It doesnt have to be an exact match, for example "MIDI" will match any and all messages starting with "MIDI". Note that the config file should contain the messages you DON'T want to get. Also note that you can NOT patch the same file twice, you have to revert to the backup (saved as ff7.backup before patching) or another "clean" exe before you can patch again.

This patch *should* be compatible with pretty much anything you can throw at it, i know for sure it works with high-res + minigame fps patches.

That said, I can not in any way gaurantee you a safe ride, and i will not take any responsibility for anything that might happen to you, your neighbour, your neighbours dog or anything else.

(If this does not fix your ff7music problems out of the box, play the game up until the point where you get a delay, kill it with ALT-F4 and check the ff7music window, you should see a large number of the same (or similar) messages, copy&paste the lowest common denominator on a new line in lessdebug_cfg.txt, restore the backup and repatch)

Oh, and one more thing, lessdebug_cfg.txt MAY need an extra empty line after the last message, this is a yet-to-be-confirmed bug.

Download Here

Bane King:
Sweet Thanks!
I only had the lag problem when I used the FF10 music files.

I have the +9999 and Hi-Quality Cloud so I'll try it out and edit with results :)

LAST EDIT:

(x)  This program failed to start because the application configuration was incorrect.

zero88:
Huh...

I try to play with the Direct Sound plugin and it doesn't work. It seems to play, no delays, except for only a few seconds. After a small amount of time, FF7Music returns this error that says "Could not set cooperative level".

So I try the Wave output plugin. It does not fix the delay, almost seems like it makes it worse.

Any other solutions (or plugins to try)?

dziugo:

--- Quote from: zero88 on 2006-07-23 20:36:09 ---It does not fix the delay, almost seems like it makes it worse.
--- End quote ---
I don't see a reason why it would increase the delay. Also, make sure the plugin you're trying to use, is actually working (use unmodded ff7.exe, so you're sure it's not because of this fix).

@Aali:
After looking at your code - pair every "malloc" with "free" and calculate the length of the strings before that big search&destroy loop. And let me confirm the "bug" you mentioned.

dziugo

Aali:
dziugo, i dont think free is really neccesary in this case
there's nothing in there of substantial length that doesn't need the memory, freeing it before the program terminates is just a waste of cpu

except for the config buffer, possibly, but thats not even close to 1kb (unless you are insane) and wont make any difference anyways

i'm not sure what you mean by the "calculate the length of the strings..." though
if you mean the actual ff7.exe strings, i dont see why thats really neccesary   :|
i dont have the code in front of me right now, i'm on my laptop which may be the reason why i'm not following you there

Navigation

[0] Message Index

[#] Next page

Go to full version