Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: ficedula on 2001-07-20 21:47:00

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-20 21:47:00
I was working on something pretty unrelated for the remake when I came across something useful in FF7 ... thought I'd work on it for a bit, and one day on, here I am.

What am I talking about? FF7 in 32-bit colour, MWAHAHAHAAH! MWAHAHAHA! BWAHAHA . Ahem.

Anyhoo, I got FF7 running in 32-bit colour on *my* PC (and spewing out tons of debug messages, but that's not *quite* as impressive). So: Can people try and get it working on *their* PC's now? Download the patches from my website.

Title: Uber-FF7 is here...
Post by: J*** H******* on 2001-07-20 23:08:00
Message.
Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-20 23:29:00
Well, that's semi-encouraging  :D That's the worst part of any program - it works on my PC, but will it work at ALL on other people's?

The main place I notice the change is the shaded boxes - you could see the colour banding on large boxes in 16-bit depth; 32-bit solves that.

Title: Uber-FF7 is here...
Post by: Skillster/RedSarg99 on 2001-07-21 02:32:00
hmm
i got ff7 V1.00, it patches ok for the 32-bit one
but trying to run it and it goes black and exts to the desktop! even if i set the screen to 32-bit and 640*480 res
Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-21 03:06:00
Get v1.02 then   :wink:

Seriously, since I have to run 1.02 any patches I make are gonna be far more likely to actually RUN on v1.02 than any other version...

Like I said in the readme; if you've got a card that doesn't need the v1.02 patch, so what? Get it anyway and don't enable the NVidia fixes.

Update: I've got FF7 running in a window now. I'll post the .cetra patch for that tomorrow once it's tested a bit more.

[This message has been edited by ficedula (edited July 20, 2001).]

Title: Uber-FF7 is here...
Post by: Skillster/RedSarg99 on 2001-07-21 03:39:00
yep
upgrading to v1.02 works
i might post that on my webspace if ppl have problems getting it, i did. haad to go to eidos ftp site.
i see no more banding, but i get bigger borders top&bottom of my screen (not to worry, must b the monitor) but no swirly thing.
havent tested movies yet (i did the CD hack thing cos i cant b bothered to get the CD),

ff7 in a window ? interesting,
cos i ask u something, when u apply the patch it says "applying registry hack" what does it change in the EXE and the registry? if u dont mind sharing ur discoveries with us?

thanks

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-21 03:52:00
Right.

When FF7 starts it looks for a binary value in the registry called SSI_DEBUG. If it's there, and contains the right data, debug messages are enabled.

The first thing my debugmode patch does is create a value in the registry with that name, of the right type, and the right size. That's what it does in the registry.

The *next* thing it does is change the EXE code. I did that by examining it in assembler ... nasty but useful. Rather than hack all the different parts of the program that check the registry, I let FF7 check that the SSI_DEBUG value is present, of the right data type, and of the right size. Then, when it checks to see whether the data is valid, it sets a variable to 0 is the data's invalid. The program then tests: Is that 0? If so, skip the debug enable. I just edit the assembler code from the JZ (Jump on Zero) CPU instruction to JNZ (Jump on Not Zero). Then, debug is on when the data ISN'T valid. Which is always, of course, since Square haven't told us what the key for debug mode on is.

I could have skipped the registry edit altogether by editing the assembler that checks, Is the data present? Is it of the correct size? etc., but it was quicker just to hack the code that checked the contents, and satisfy the *other* conditions by creating a registry key of the right type. It was easy to tell by looking at the source code what size and name the registry value had to be; I *couldn't* tell what data it should contain, so I hacked that part.

Title: Uber-FF7 is here...
Post by: Skillster/RedSarg99 on 2001-07-21 11:08:00
what about in the 32-bit patch? howd u do that>?
Title: Uber-FF7 is here...
Post by: Zophixan on 2001-07-21 12:52:00
what is the url of your site?
Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-21 14:26:00
URL of my site is in my profile
 http://ficedula.cjb.net


32 bit patch: Much easier. I just found the part where it calls the SetDisplayMode function and changed it so instead of passing in the result of a function it calls to pick a colour depth, it passes in 32 all the time.

Title: Uber-FF7 is here...
Post by: Sir Canealot on 2001-07-21 18:42:00
You know a long while ago.
I decided to saty away from FFVII for a while cause it was getting boring. But I just gotta try this. Thanks Fice you are the F-ing man.

Edit: No luck. It go's into the game then imideatly crashed back to the desktop. Works with ou the 32 bit patch.
Thats with the 650 dets of corse...hmmn.

Nor is your music patch working Fice. Its giving me this in information:

WinMM layer NOT located. Check NEWMM.DLL is in correct location.

FF7 NOT located. Is FF7MUSIC patch installed in correct location?

This blows. The damn DLL is in the right place amd I have patched the EXE. I'm sure I fixed this before but I just cant remember!

[This message has been edited by Sir

Canealot (edited July 21, 2001).]

[This message has been edited by Sir Canealot (edited July 21, 2001).]

Title: Uber-FF7 is here...
Post by: Ant on 2001-07-21 19:36:00
Su-wheet

Ever going to release the code?

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-21 21:35:00
If the 32-bit or debugmode patches aren't working make sure you've got version 1.02 of FF7. That worked for Skillster...

Music patch? Is the setup EXE program in a folder called FICEDULA located inside the FF7 folder? It expects to be...

The code? All the code there is, you can see inside the patch files. Don't expect to understand it though; it's in raw hex. You'd need to understand assembler to alter or make patches yourself...

Title: Uber-FF7 is here...
Post by: Sir Canealot on 2001-07-21 22:30:00
I have 1.02 of FFVII and it is still doing this....I cant think of any thing I am doing wrong.
And I got the music patch to stop producing those errors but now it still wont play Mp3s. It keep on dumping the IDs. But the IDs it dumps are the same IDs that are in the Ini file. I dont get it.
I am 99.9% sure I have the program set up alright...

Perhaps this be "Ficedula bad day" or something...I should try cosmo for a laugh. If that dosent work then the gods have cursed me not to be able to run any of oyur stuff or something. Damn gods.

[This message has been edited by Sir Canealot (edited July 21, 2001).]

Title: Uber-FF7 is here...
Post by: Skillster/RedSarg99 on 2001-07-22 00:38:00
hmm in 32bit the movies have big black streaks coming down the screen
Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-22 00:53:00
Yeah, running FF7 in 32-bit isn't perfect; the game wasn't designed to do it, after all.

However: I DO have a sort-of-fix. When you run FF7 in a window it has to use the same colour depth as your desktop, of course. So if your desktop is in 32-bit, running FF7 in a window forces FF7 to be 32-bit - and it doesn't corrupt the movies like the first method does.

I'll upload a FF7-window mode patch tonight or tomorrow; I'm just testing it at the moment.

Title: Uber-FF7 is here...
Post by: Qhimm on 2001-07-22 16:46:00
Hmm... wouldn't it be easier to check *which* value should be there? Where's the function located, I could take a look at it...?
Title: Uber-FF7 is here...
Post by: Qhimm on 2001-07-22 05:06:00
Hmm, I did a bit of checking, and from the looks of it the EXE debug patch is really unnecessary.  :)

To enable debugging messages without patching the EXE, create a new string value in the "HKEY_LOCAL_MACHINESoftwareSquare Soft, Inc.Final Fantasy VII" key, and call it SSI_DEBUG. Enter "SHOWMETHEAPPLOG" as the value. FF7 should now output all of its hidden debug messages. (Mind you, I haven't tested any of this. Anyone care to try?)

On a side note, while studying the asm listing of FF7, I've found that the debug message functions also include file I/O, suggesting you can set FF7 to create a rather detailed log of its session (APP.LOG perhaps?). I'll know for sure later on.

Title: Uber-FF7 is here...
Post by: Anonymous on 2001-07-22 06:40:00
isnt 1.02 one of those patches for computers that are 'different'?
Title: Uber-FF7 is here...
Post by: Skillster/RedSarg99 on 2001-07-22 12:00:00
its a bug fix version, especially for Riva128/tnt cards
Title: Uber-FF7 is here...
Post by: halkun on 2001-07-22 12:17:00
I make the SHOWMETHEAPPLOG entry and what it did was write a file called app.log, but didn't write anything into it. Looks like the patch is needed
Title: Uber-FF7 is here...
Post by: The SaiNt on 2001-07-22 17:40:00
I have yet to try the patch although I've downloaded it already.

BTW, since it's probable to get everyone's attention in this thread, do you think that FF7 stores some of the info for the field files bitwise? What I really mean is they can choose to use 3 bits to store certain information instead of the usual minimum of 1 byte(8 bits). That *could* be an explaination for the irregularities in the section 7 of the field files.

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-22 17:43:00
Qhimm: You'd have thought so ... but I couldn't get it outputting debug messages that way. So I just hacked the exe ^_^

If you enable debug messages with my patch, you'll find out FF7 does both output debug messages via the system debugger, and logs them to APP.LOG.

FF7 v1.02 includes support for the Riva 128 and TNT. You don't *have* to enable it though.

Title: Uber-FF7 is here...
Post by: The SaiNt on 2001-07-22 17:49:00
Update.
I just tried Qhimm's registry hack and it does work. Note though that I'm loading it through the original FF7.exe not version 1.02. I have 1.02 but I haven't tried it yet.

Just in case you guys wanna know, APP.LOG is created everytime you run FF7.exe, the only difference is without the correct registry hack, nothing is written to it.

fice : My question above?

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-22 18:26:00
Well, I guess it *could* be that way. I can't say for certain, of course.

Update: I uploaded that windowed-mode patch I was talking about before.

[This message has been edited by ficedula (edited July 22, 2001).]

Title: Uber-FF7 is here...
Post by: The SaiNt on 2001-07-22 19:44:00
Hmmm....
looking in more detail through the debug Output window, I found that the VC++ one is more detailed though it's sometimes more technical. One thing i noticed is that the battle scenes are ID'ed ^^.

I wish I could get more info on how the memory is modified though.

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-22 21:44:00
...the VC++ one?
Title: Uber-FF7 is here...
Post by: Sir Canealot on 2001-07-22 22:15:00
Right your 32 bit window thing gives me this error on start up:
DD Error
Error:88760091 The pixel format was invalid as specified in FILE c:libsrcgraphicsdirectx.cpp LINE 2079

Weird one that is...

Mp3s still arent working. Although does the ini file canealot do any thing? My config was in there and I had to copy it out of there and copy it into the ffmusic.ini to get it to show up in the program. Still no luck. But I am going to fiddle about a bit first.

Nope no luck with the mp3s. Log file isnt putting any thing out this time..nothing at all. I supose that is normal though.
Maybe I am just cursed.

[This message has been edited by Sir Canealot (edited July 22, 2001).]

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-23 03:12:00
You sure you've got v1.02? According to my v1.02 source line 2079 isn't tested for errors ... you can't get an error on that line!

Hmmm.

I've posted some help on installing the latest version of my music patch in the other thread.

Title: Uber-FF7 is here...
Post by: Sir Canealot on 2001-07-23 06:10:00
Well the config file has 1.02 in it..the only way is if I had mixed the 1.02 config with the 1.00 exe. Which is unlikely. I will double check that tomorow...2am now..need to be up at 8:30  :(
Title: Uber-FF7 is here...
Post by: The SaiNt on 2001-07-23 19:31:00
Yeah, the 32 bit patch works for me.
For AVI's I get the same problem as Jari and the battle swirl doesn't work either.
In 32 bit mode, the gradient looks better. Obviously the textures don't look any better but if you look closely, the gradient on the 3D models is improved too.
Haven't tried the rest yet.

[This message has been edited by The SaiNt (edited July 23, 2001).]

Title: Uber-FF7 is here...
Post by: Reznor007 on 2001-07-24 07:40:00
I'm not sure why the videos don't work, but the battle swirl might not work because the program might be expecting a 16bit framebuffer readback to do the effect, and with a 32bit framebuffer it might not work.
Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-24 14:04:00
Probably, yes.
Title: Uber-FF7 is here...
Post by: The SaiNt on 2001-07-25 14:19:00
Incidentally, the stripe of video that appears in the videos are in the exact position as the infamous "Nvidia" or was it "DirectX" problem?

Anyone tried using a PSX emulator before?
IIRC, on certain ones, if you look closely, there is a thin line of misallignent during FMV's on the right hand side.

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-25 23:56:00
Makes sense; after all, the patch does mess around with the DirectDraw commands to force 32-bit.

Of course, you *should* be able to get 32-bit colour and avoid video corruption by using the window-mode patch.

Title: Uber-FF7 is here...
Post by: Sir Canealot on 2001-07-26 03:18:00
Hey Ficedula did you get my email with the zipped ini?
Just wonbdering if you got it..I understand if you dont have time to help me with it and all.

Thanks  :)

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-26 23:12:00
I did, yes. I haven't found any problems which is bugging me ... maybe I'll have to do a new release of the patch with MORE debugging information.
Title: Uber-FF7 is here...
Post by: Sir Canealot on 2001-07-27 03:33:00
Great...
Well there is some good news!!
I did get both of your 32 bit patches working: The windowed one and the full screen one. The problem with the movies and battle swirl was aprent in both patches though....

Oh I got it working buy enambleing 8 but pattled texture support via a tweak program. I took the tick out of the TNT box and run the game in D3d with my Geforce 2! I will post about this tweak program in a minute. This might be handy for people having probs getting FFVII runnin gI bet....

Title: Uber-FF7 is here...
Post by: ficedula on 2001-07-27 03:38:00
Um. That IS good ... but it works for me with the NVidia patches on!

Well, at least it works SOMEhow.

Title: Uber-FF7 is here...
Post by: Anonymous on 2001-07-27 05:20:00
Message.
Title: Uber-FF7 is here...
Post by: Sir Canealot on 2001-07-27 19:37:00
Naw naw naw. I tryed running it with ou the TNT patch and I got a pass on 8bit but it wouldent let me select D3d only software. So I still need the D3d patch  :(

Title: Uber-FF7 is here...
Post by: Ged on 2001-08-18 13:01:00
About the Geforce2 unticking.

Bad idea. I did, and it often hangs in battles. It always did it when I fought Jenova*Birth..