Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: PumpkinPieman on 2004-01-24 17:21:13

Title: FF7 Wrappers?
Post by: PumpkinPieman on 2004-01-24 17:21:13
I saw this topic a few months ago, so I shouldn't bother bumping it up. What was talked about is a little foggy, but someone was talking about creating a wrapper around FFVII so it could support many different display types\api's. This just came to me for a second, and I started wondering how someone would approach something like that. Wouldn't someone need the source of at least eidos's port to do something like that? How could someone reverse engineer a game like FFVII? *Not that I'm planning on doing it, I'm just interested by it*
Title: FF7 Wrappers?
Post by: ficedula on 2004-01-24 18:45:17
You don't really need the source code. If you had it, you could do *all* sorts of things ... but even without, plenty is possible.

In fact, the term "wrapper" implies that you don't have the source code; you're working without it. Generally speaking, a 'wrapper' pretends to be some sort of library ... say DirectX ... but instead of actually doing whatever the application tells it to, it translates those requests into something else ... say OpenGL instructions.

If you're writing a replacement for a DLL, all you do is write a DLL of your own that contains functions with identical names to those in the DLL you're replacing. Then when the app calls your functions ... you do something. Maybe emulate what it's asking for yourself. (A wrapper layer isn't much different from an emulation layer). That way you can make something run when the hardware/whatever it's looking for isn't present - you mimic its capabilities.

However, it's not necessarily easy. In the case of graphics engines, in particular: OpenGL and Direct3D are both pretty complex, so simply writing something that translated the calls would be time consuming, and DirectX in general is unusual in that it doesn't use simple libraries; it uses COM.

Still possible ... but hard. The FF8 Configurator could be one example of a wrapper; it 'wraps' DirectMusic, so all of FF8's requests to DirectMusic actually get sent to our program instead. In this case, the app actually passes them straight on to DirectMusic - but it means we get notified about everything music related FF8 does, so we can, for example, load soundfonts in, change the name of the file it's looking for, and so on.
Title: FF7 Wrappers?
Post by: Alhexx on 2004-01-24 19:48:02
Huh? What's this? A post? From ficedula???

Hey-ho! Welcome back! :D
It's quite long ago since I read a post from you...

 - Alhexx
Title: FF7 Wrappers?
Post by: ficedula on 2004-01-24 19:57:17
Heh, I've been posting on-and-off for a few months now. Don't have so much free time now I have a full time job, but I'm still around...
Title: FF7 Wrappers?
Post by: Cyberman on 2004-01-24 20:08:50
Quote from: ficedula
You don't really need the source code. If you had it, you could do *all* sorts of things ... but even without, plenty is possible.

In fact, the term "wrapper" implies that you don't have the source code; you're working without it. Generally speaking, a 'wrapper' pretends to be some sort of library ... say DirectX ... but instead of actually doing whatever the application tells it to, it translates those requests into something else ... say OpenGL instructions.

If you're writing a replacement for a DLL, all you do is write a DLL of your own that contains functions with identical names to those in the DLL you're replacing. Then when the app calls your functions ... you do something. Maybe emulate what it's asking for yourself. (A wrapper layer isn't much different from an emulation layer). That way you can make something run when the hardware/whatever it's looking for isn't present - you mimic its capabilities.

However, it's not necessarily easy. In the case of graphics engines, in particular: OpenGL and Direct3D are both pretty complex, so simply writing something that translated the calls would be time consuming, and DirectX in general is unusual in that it doesn't use simple libraries; it uses COM.

Still possible ... but hard. The FF8 Configurator could be one example of a wrapper; it 'wraps' DirectMusic, so all of FF8's requests to DirectMusic actually get sent to our program instead. In this case, the app actually passes them straight on to DirectMusic - but it means we get notified about everything music related FF8 does, so we can, for example, load soundfonts in, change the name of the file it's looking for, and so on.


STRANGER! Oh wait..

Yes that sounds about right, some as the wrappers for 3dfx games that are out there that convert 3dfx library calls to something your machine can use.

As for FF7 it uses DX6 right?

Agreed that DX is hardly a simple API (understatement of the melenium).

Anyone look at EGL Yet? :)
Ahem anyhow :) I suppose once I get my battle model reading crap done I can worry about other things (like scene model script information things like that).

Cyb
Title: FF7 Wrappers?
Post by: EmperorSteele on 2004-01-25 02:30:19
Actually, it comes with 5.1... I've heard the platinum re-release (which i think is just nothing more than a shiney box) used Dx6 though.
Title: FF7 Wrappers?
Post by: sfx1999 on 2004-01-25 04:01:05
Wine is a wrapper! Unfortunately, FF7 does not work with Wine. Well, it wouldn't install, so I have know way of knowing, but I doubt it does.
Title: FF7 Wrappers?
Post by: Sephiroth 3D on 2004-01-25 07:00:14
I've always had the thought that, once we figure out everything, we should write a new, unsupported EXE that does stuff like high-rez, 32-bit, and other speed/graphics/sound improvements we've been wanting for quite a while now...

But no one seems willing to try... And that's what's depressing me. (I'd try it, but I'd need a VC++ manual as comprehensive as the manual on php.net)
Title: FF7 Wrappers?
Post by: PumpkinPieman on 2004-01-25 15:06:54
Quote from: Sephiroth 3D
(I'd try it, but I'd need a VC++ manual as comprehensive as the manual on php.net)
Well MSDN has next to everything on it, it's just a little hard to find something. :)
Title: FF7 Wrappers?
Post by: ficedula on 2004-01-25 15:11:19
You'd also need to first fully decode everything about FF7. Noone has, and I doubt anyone ever will. I won't say it's impossible, but the amount of work involved would be gigantic; it'd be quicker to write your own game from scratch.
Title: FF7 Wrappers?
Post by: DeadLajik on 2004-01-25 19:54:19
Here is an article, which is kinda dated, which describes the process of writing a wrapper for wsock32.dll (Winsock). They use the wrapper to decode what calls the Netscape browser is making to wsock32.dll.

Even though the document is kinda old (it discusses Windows 95, Netscape 4, and uses Visual C++ 4.0) I believe the techniques he uses can still be applied today.

Anyways here is the article:

http://www.vijaymukhi.com/vmis/foolsnet.htm
Title: FF7 Wrappers?
Post by: Cyberman on 2004-01-25 20:56:04
Quote from: ficedula
You'd also need to first fully decode everything about FF7. Noone has, and I doubt anyone ever will. I won't say it's impossible, but the amount of work involved would be gigantic; it'd be quicker to write your own game from scratch.


Basically that's the whole thing in a nutshell.. a lot of work.

Although I suppose one could 'convert' FF7 to a 'newer' cooler engine and stuff you are just as well off starting new.  This is the reason likely the FF7 PS2 version project was scraped by Square.  Even if it's still there most popular game LOL.

Cyb
Title: FF7 Wrappers?
Post by: Caddberry on 2004-01-25 22:09:03
Quote from: Cyberman
Although I suppose one could 'convert' FF7 to a 'newer' cooler engine and stuff you are just as well off starting new.  This is the reason likely the FF7 PS2 version project was scraped by Square.  Even if it's still there most popular game LOL.

Cyb


Geez i just heard about the re-release of FF7 for ps2.. I heard it was coming out around the time of FF7: AC's release.. So they ditched it huh?

Edit.. Damn quote tags..
Title: FF7 Wrappers?
Post by: The Skillster on 2004-01-26 01:24:36
btw folks
anyone ever seen an directx to opengl or Glide wrapper by any chance...
Title: FF7 Wrappers?
Post by: DeadLajik on 2004-01-26 02:25:33
There are many wrappers for Glide at this website:

http://www.zophar.net/utilities/glidewrapper.html

I havn't tried any of them but good luck with them.
Title: FF7 Wrappers?
Post by: The Skillster on 2004-01-26 10:29:24
no i mean DirectX wrapper to convert to openGL or GliDE
Title: FF7 Wrappers?
Post by: Cool Newbie on 2004-01-31 00:33:58
Quote from: sfx1999
Wine is a wrapper! Unfortunately, FF7 does not work with Wine. Well, it wouldn't install, so I have know way of knowing, but I doubt it does.


winex from transgaming.com supports many directx games (even recent ones like max payne 2) it has final fantasy 7 and 8 in the support in the list list, ff8 runs with some glitchs but final fantasy 7, installs but has problem accessing the cd's (probably the copy protection) and midi.
Title: FF7 Wrappers?
Post by: PumpkinPieman on 2004-02-01 02:42:23
I could see Winex being a wrapper, so when it see's dx function calls it calls it's own dx structure that would handle the same processes. So if you knew how DX6 worked you could use a DX9 wrapper around the DX6 functions that are called, right? o.0
Title: FF7 Wrappers?
Post by: Cool Newbie on 2004-02-01 20:41:03
i'm pretty sure that winex is capable to running final fantasy 7 it just needs a little work, cos it has to be specific to the final fantasy 7 game it may not happen any time soon, i think its just the registry, copy protection and midi that will need fixing in winex for final fantasy 7 to work on it. as for the dx wrapper winex has a very good ability to run it. considering it already runs dx9 games like max payne 2 and other games like warcraft 3.

and also specifically i know from a very reliable source that doom 3 already runs on winex (or at least a leaked version of it does)

which shows that winex is very capable to running the game just needs the attention from ppl who know about how the ff7 port to pc works.
Title: FF7 Wrappers?
Post by: Cyberman on 2004-02-02 00:39:51
Quote from: The Skillster
no i mean DirectX wrapper to convert to openGL or GliDE

Koolsmokey released some 3dfx drivers that did quite well I think you can get them from 3dhq.

It supported OGL1.2 and DX8 unfortunately 3dhq died because the guy would had the patents on them starting up again .. got terminal cancer.. it was a rather depressing thing to see happen, all his dreams then WHAM..

3dhq is dead now so you will have to look around for koolsmokey's stuff somewhere.

Anyhow :)
Title: FF7 Wrappers?
Post by: Sephiroth 3D on 2004-02-02 08:14:03
Quote from: Caddberry
Geez i just heard about the re-release of FF7 for ps2.. I heard it was coming out around the time of FF7: AC's release.. So they ditched it huh?

I was told once that AC was being released side-by-side with a PS2 Edition of FF7, by someone who works at a GameStop store...

If so, then they are on silent running about the new version... (No hype, no nothing...)

But I doubt they're making it...
Title: dx wrapper
Post by: Marco on 2004-02-24 14:42:35
http://sourceforge.net/projects/dxglwrap

Don't know what'll you'll use it for, but have fun.