Miscellaneous Forums > Scripting and Reverse Engineering

[FF7 PC] Full source code reversing project?

<< < (2/19) > >>

ficedula:
It's not that bad an idea; in a sense, it's how Ultrasound and some other mods work (replace just this function - to change/add sound effects - leave the rest of the game intact).

Not sure I'd count on ever rewriting the whole thing that way, though.

paul:

--- Quote from: Shard on 2015-12-13 02:53:28 ---Honestly, you're better off writing your own engine in 2016 rather than decompiling code from 1995-1996. Take advantage of new technology. This is what QGears is aiming to do, except it's not very active right now.

--- End quote ---

This would be the best base for something like QGears though. For example when the world map functions are fully reversed then you can replace/extend it in any way you'd like. And you have a full working game. Otherwise everything has to be 100% re-implemented from day 1 to have a fully working game.

Also I'd assume by this point many people already know what a lot of functions in the exe do from all of the previous reversing work?

ergonomy_joe:
Funny, decompiling Final Fantasy VII is what I have been doing for some times now.
The PC version I mean, and the patch version 1.02.
I succeeded in reversing most of the minigames (except condor) and most of the main systems (except battle) so far.
It's not easily readable (I use their addresses to name the functions and the global so far, and do not plan to rename them until all is done), but you can get a lot of information from it.
Since it's the most comprehensible of the lot I wanted to post the code to the roller-coaster mini game, but I guess I won't be allowed to do it here right ?
(though I don't understand why posting reversed data is less infringing than posting reversed code)

paul:
RE: (though I don't understand why posting reversed data is less infringing than posting reversed code).

I don't know why either since reversed data is a 1:1 copy of the copyrighted data, yet the reversed code is an interpretation of machine code back to something that's more human readable. I.e asm -> c, the c you've come up with can't be covered by copyright.

What format is your data in? I assume you have real or pesudo C code of the reversed functions? My plan was to do something like the RC2 project where we patch the EXE to load a DLL. Then this DLL replaces all of the known functions with a reimplementation. Since the graphics output uses a "driver" system thats probably the easiest part. Perhaps you've already reversed this and the functions for loading resources?

If you ever use IRC you could join the qhimm channel to discuss further?

ergonomy_joe:
I'll try to clarify a little how I do:
.I translate from disassembled code to C code by hand, function after function (they are easy to spot in the ASM code)
.I then use --what I believe is-- the compiler originaly used, Visual C++ 5.0, to create an object file
.I then use an original tool to compare this object file to FF7.EXE to spot any translation error

Here is sample, the UPDATE callback to the Coast shooting mini-game:

--- Code: ---//coaster[UPDATE][callback]
void C_005E8E7E(struct t_aa0 *bp08) {
C_005E8D03(0, 0, 0, 1.0f);//coaster:clear buffers
//%%% check ending condition? %%%
if(D_00C3F75C * 4  > D_00C3F894 - 0x10 || D_00C3F774 == 1) {//else 005E8ECB
C_005E988B();//sound related(6)
C_005E8E0B(bp08);//to mainDispatcher for coaster
return;
}
//%%% %%%
C_005E8F9B(bp08);//coaster:next frame
C_0041A21E(bp08);//Refresh input driver?
if(C_00660EC0(0, bp08)) {//G_DRV_88:BeginScene
C_00666DA3(bp08);//calls "instance:reset"
C_00666DC0(bp08);//calls "dx_sfx:reset heaps(1)"
C_00666DDD(bp08);//reset "deferred heap"
//-- refresh without display --
while(D_00C3F6EC + 1.0f < D_00C3F6E8) {
D_009014A8 = 0;
C_005E9051(bp08);//coaster.refresh
D_00C3F6EC += 1.0f;
}
//-- refresh with display --
D_009014A8 = 1;
C_005E9051(bp08);//coaster.refresh
D_00C3F6EC += 1.0f;
//-- --
C_00660EEB(bp08);//G_DRV_8C:EndScene
}
C_005E8E06();//<empty>
}
--- End code ---

You can find others amples on my (not very good) blog concerning decompilation: http://magnetiktank.blogspot.jp/

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version