Author Topic: Information on FF7.exe  (Read 68389 times)

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Information on FF7.exe
« Reply #50 on: 2001-01-30 15:08:00 »
Unfortunately, the .P files aren't simple combinations of the PLY/MAT/GRP files. PLY/MAT/GRP are text file formats. .P files, while we all agree they hold the same data, are most definitely binary files. So don't assume they'll contain the same sort of headers, or even have the data in the same order.

That said, give it a go!


The SaiNt

  • *
  • Posts: 1300
    • View Profile
Information on FF7.exe
« Reply #51 on: 2001-01-30 19:11:00 »
Okay, after looking at the AAAC.P file for a while, i have come to a conclusion that they are definitely not compressed.
This is cause there are many repeated strings of information that can easily be compressed.
Something i would like to add,
I have colour coded the AAAC.P file for easier viewing, and I suggest some of you take a look so you know what I'm talking about.
It's at  http://pwp.maxis.net.my/zhenjock/images/scan1.jpg" TARGET=_blank>http://pwp.maxis.net.my/zhenjock/images/scan1.jpg  http://pwp.maxis.net.my/zhenjock/images/scan2.jpg" TARGET=_blank>http://pwp.maxis.net.my/zhenjock/images/scan2.jpg
So far, I assume that the '00's are spaces
and '0000' means next line?
I also noticed that the data in the file can be divided into 3 main parts, divided by three repetitive patterns
7749 61FF and 7CDA 7701
You might also notice that the top most portion consist of many different hex values which i think most likely are text.
The centre portion is made up of very small hex values; usually with at 0 in front like 01 02 03 etc....
The last section is erratic again like the first section so it could be text?
I need to go to sleep now, so if anyone would like to help me out here, feel free to do so. I'll probably check the board again tomorrow morning.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Information on FF7.exe
« Reply #52 on: 2001-01-30 19:31:00 »
Yep, the files aren't compressed.

Maybe I'll take a look when *I* get back to my home PC...


Information on FF7.exe
« Reply #53 on: 2001-02-01 00:19:00 »
The Skillster: Thanks. Now I'm a freak here, just like I am in real life.  :)

I believe the temp files in FF7 are simply direct copies of .P files, perhaps directly extracted from the .LGPs by the game. Just a guess but maybe when a scene is loaded, the game pre-caches all the character models it needs.

Ficedula:
Re: creating virtual files: Is there anyway I or someone else could prove or disprove whether the game does or doesn't create them?

The SaiNt: Thanks for all the info.


ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Information on FF7.exe
« Reply #54 on: 2001-02-01 16:00:00 »
Proving the Virtual File theory? Well, if you could show that a file referenced in the EXE like VINCENT.DAT was definitely the limit break - and textures/models used in the limit break came from other files, which you could show to us -that'd be pretty conclusive proof.
However, I'm willing to believe it now - it seems probable enough. Just saying, we don't *know* yet, so don't assume anything. Maybe they are actual files that have been compiled into the EXE.

The SaiNt

  • *
  • Posts: 1300
    • View Profile
Information on FF7.exe
« Reply #55 on: 2001-02-01 18:47:00 »
Here's what I can finalize from my 2nd time going through the .P files
This time my example will be aaae.p
You can get it at http://pwp.maxis.net.my/zhenjock/images/scan3.jpg" TARGET=_blank>http://pwp.maxis.net.my/zhenjock/images/scan3.jpg  http://pwp.maxis.net.my/zhenjock/images/scan4.jpg" TARGET=_blank>http://pwp.maxis.net.my/zhenjock/images/scan4.jpg  http://pwp.maxis.net.my/zhenjock/images/scan5.jpg" TARGET=_blank>http://pwp.maxis.net.my/zhenjock/images/scan5.jpg  http://pwp.maxis.net.my/zhenjock/images/scan6.jpg" TARGET=_blank>http://pwp.maxis.net.my/zhenjock/images/scan6.jpg  http://pwp.maxis.net.my/zhenjock/images/scan7.jpg" TARGET=_blank>http://pwp.maxis.net.my/zhenjock/images/scan7.jpg

Here's what I have noticed:-

1. The top part of the file (00000000 - 00000030) has the same format as the end (00000EF0 - 00000FE0).
2. The hex value C0 seems to appear in a someone arranged order in scan3.jpg
3. The values '5FEF 1040 65FC B33F C959 90BF' appear twice in the same order in scan3.jpg
4. From (000004D0 - 000006B0), a certain order appears. Some of the characters here seem to appear in the aaac.P (refer to last post for details)
5. Data from 000006C0 - 00000E30 seems to have a proper arrangement. It's as if the '00' areas are shelves to keep arrays of data.
6. In between this array of data, '50DA 7701' appears in a regular order (Is this an indicator to divide the data?)
7. This has led me to believe that the whole file can divided into several sections:-
a) The Header (00000000 - 00000030)
b) The Alphanumeric section (00000040 - 000004D0)
c) The file divider? (000004E0 - 000006B0)
d) Numerical section (000006C0 - 00000E30)
e) ?????? Section (00000E40 - 00000ED0)
f) 2nd Alphanumeric section (00000EE0 - 00000EF0)
g) The Footer (00000F00 - 00000FE0)

That's all for now. And yes I know that you can view all of this through the "open as" command in Adobe Photoshop in RAW format. I just prefer the manual colouring way cause I can cut out things which I think are irrelevant cause the PC is somewhat stupid in the sense it can't see certain patterns, it just colours everything.
I really someone like ficedula, Qhimm or Halkun decides to shed some light here. I think I really need some help.

ficedula : My current belief is that the .DAT files are in fact compiled within the EXE itself


Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
Information on FF7.exe
« Reply #56 on: 2001-02-01 20:10:00 »
All right, I can't stand just sitting here while you people whine trying to figure out the .p format...  :wink:

Here's the source code for a 3DSMAX(R3) plugin designed to import the FF7 models straight from the data files. It can't handle textures or bone rotation data, but the vertices, polygons and colors are all correctly read, so just examine the source and you should pick up a few helpful pointers.

http://qhimm.3dstream.net/ff7_3d.zip" TARGET=_blank>http://qhimm.3dstream.net/ff7_3d.zip


Information on FF7.exe
« Reply #57 on: 2001-02-01 21:29:00 »
The SaiNt: Thanks for the continued info. I wish I could do more than comment...

Qhimm: This is cool. Hmmm, maybe when I learn a bit more, I can use this code to make a similar plugin for Milkshape...


The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Information on FF7.exe
« Reply #58 on: 2001-02-02 02:20:00 »
well loads of info here, but werent we discussing the ff7.exe? and what other skeletons (code) is hiding in qhimms cudboard?

Information on FF7.exe
« Reply #59 on: 2001-02-02 02:25:00 »
You mean closet, don't you?   :wink: And yeah, I thought it was the .exe as well, but I'm not complaining about this new breakthrough.   :D Actually, it is sort of related to the .exe because of the .DAT files, right? Well, mostly it's probably your questions about the game creating virtual files. I'm inclined to agree that they must be in the .exe as it's the only current option I see that makes much sense.

[This message has been edited by Srethron Askvelhtnod (edited February 01, 2001).]


Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
Information on FF7.exe
« Reply #60 on: 2001-02-02 11:46:00 »
My thoughts on the temp .p files: They're debug memory dumps the programmers forgot to take out. The dumps would be of unstable areas where they experienced problems, and wouldn't necessarily contain any useful info.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Information on FF7.exe
« Reply #61 on: 2001-02-02 11:59:00 »
the reason i called them temp files qhimm maybe because ff8 has them too, if you alt-tab out of ff8 and then check its directory u WILL see the same name files (not the same size i might add), but they get deleted by the program when you quit ff8, not so for ff7.

The SaiNt

  • *
  • Posts: 1300
    • View Profile
Information on FF7.exe
« Reply #62 on: 2001-02-02 16:50:00 »
Sigh.........................
I can't really read your source files, Qhimm.
You see, I'm taking a matriculation in IT currently and one of my core subjects is C programming. I've only started for about 3 weeks or so. That itself, with my interest in programming, I am currently reading ahead of my college lectures. I'm currently at page 110+ of my book which happens to be like 900+ pages long. It's "Deitel & Deitel's C : How to program" if you want to know. Looks like I'll have to spend this weekend catching up on more C before I can really understand your source. I'm progressing quite quickly cause I have done some Java (not Javascript!) and some BASIC in a "see and learn" by looking at sources.
Looks like I have to get back to my books.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Information on FF7.exe
« Reply #63 on: 2001-02-03 17:05:00 »
Yeah ... C isn't the easiest to learn (though yes, I will admit it's good when you do). BTW I've written my own FF73d viewer based on Qhimm's source but the colours are messed up ... anybody have hints?

Information on FF7.exe
« Reply #64 on: 2001-02-03 20:36:00 »
I'm afraid I don't understand most of the source, either.

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Information on FF7.exe
« Reply #65 on: 2001-02-04 03:00:00 »
fice: prehapes something wrong with the guroud shading / lighting instructions?

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Information on FF7.exe
« Reply #66 on: 2001-02-04 03:19:00 »
hmm, heres something else for the saint to look for...
where are the monster stats stored?
unlike ff8 where monsters level up as u do, ff7 monsters (maybe not bosses) donot level up, so where is their initial (and final) stats info stored?
ill look into the exe myself tonight, but if anyone has a good guess then let me know.
PS; looking at the exe, does anyone know where the random fight monster formation/ party picking thingy is? (i mean the bit of code/file that sets up the next random fight before it happens, ie; the next random fight after 2 steps is against a gaurd and a ghost, monster ids; 001 and 029 etc)

The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Information on FF7.exe
« Reply #67 on: 2001-02-04 03:51:00 »
some info, after searchin the exe for 'weapon' (as in diamond weapon) i came to a list that matches up the HRC files to their enemy/object equivelents, here it is:
well i was going to, but neither ultra edit nor wordpad like to copy paste big amounts of data  :(
well i did it the long way and after 5 mins here it is;
/aja.hrc    tybrco  /dva.hrc    buggy   /aba.hrc    barrier /aaa.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    canon   /aia.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind    /cgd.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    canon   /aia.hrc    tail    /dkc.hrc    barrier /aaa.hrc    diaweapon   /bna.hrc    warship /eke.hrc    canon   /aia.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind    /cgd.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    canon   /aia.hrc    tail    /dkc.hrc    barrier /aaa.hrc    diaweapon   /bna.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind    /cgd.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    midgulcanon /cmb.hrc    tail    /dkc.hrc    barrier /aaa.hrc    diaweapon   /bna.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind02  /cid.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    canon   /aia.hrc    tail    /dkc.hrc    barrier /aaa.hrc    diaweapon   /bna.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind02  /cid.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    midgulcanon /cmb.hrc    tail    /dkc.hrc    barrier /aaa.hrc    diaweapon   /bna.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind    /cgd.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    midgulcanon /cmb.hrc    tail    /dkc.hrc    barrier /aaa.hrc    ultima  /dyb.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind02  /cid.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    midgulcanon /cmb.hrc    tail    /dkc.hrc    barrier /aaa.hrc    ultima  /dyb.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind    /cgd.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    midgulcanon /cmb.hrc    tail    /dkc.hrc    ruby    /cqc.hrc    rock    /cnb.hrc    choko   /aja.hrc    choko   /aja.hrc    highwind02  /cid.hrc    sbmrn   /ddd.hrc    condor  /bkd.hrc    rocket  /coc.hrc    rocketbase  /cpc.hrc    goldsaucer  /cfc.hrc    midgulcanon /cmb.hrc    tail    /dkc.hrc    ruby    /cqc.hrc    rock    /cnb.hrc    sbmrn   /ddd.hrc    gernika /cec.hrc    underseemk  /eje.hrc    coralkey    /ble.hrc    seeobject   /dic.hrc    sbmrn2  /dga.hrc    emerald /bud.hrc    snowpole    /djc.hrc    snowpole    /djc.hrc    snowpole    /djc.hrc    cloud   /bbe.hrc    tifa    /dlb.hrc    cid /ata.hrc    choko

excuse the formatting  :D


The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Information on FF7.exe
« Reply #68 on: 2001-02-04 03:55:00 »
well above, where it shows stuff like 'canon' 'rocket' it means the 3d mini towns that appear when youre out on the world map.
[edit] damn! just released that these are for ONLY the 3d objects on the world map  :(

[This message has been edited by The Skillster (edited February 03, 2001).]


Information on FF7.exe
« Reply #69 on: 2001-02-05 00:22:00 »
Whoa! Even if this info isn't what you wanted, it's still useful. This could mean that the World Map models are stored in the .EXE.

And do you *know* that the game selects which enemy group will be encountered next, or are you speculating?


dagsverre

  • *
  • Posts: 323
    • View Profile
    • http://ffsf.cjb.net
Information on FF7.exe
« Reply #70 on: 2001-02-05 02:42:00 »
OK, OK, I can't resist. You want to get hold of the world data?

Write a DirectX inbetween layer (surprise!) and plot down the vertices as they are added. Soon you'll have extracted all the models in the game.

Anyway, I guess perhaps writing the data is your intention here...and also I would say your way is less work. It was just an idea that popped into my mind as I read this...


The Skillster

  • *
  • Posts: 2284
  • Loving every Final Fantasy
    • View Profile
Information on FF7.exe
« Reply #71 on: 2001-02-05 03:29:00 »
SORRY, TO DISAPPOINT u, but i was looking for monster stat info/battle info, not tyring to find 3d data.
the 3d data shown above is refrences, to show the games which damn rsd file from the char/world.lgp file goes with which object class (most likley) the 3d data is NOT stored in the exe, and i think converting the 3d models in the way that qhimm has is simplar than writing a dX layer Dags/Jari...
So any idea of where the fight info is stored (srehtron Qhimm mailed me about the random monster formation picking thingy, a LOONG time ago, when i was searching memory addresses to see if i could pin point it - no such luck, unless i know which 'area; inside the momery allocated to ff7 the values are in)?

The SaiNt

  • *
  • Posts: 1300
    • View Profile
Information on FF7.exe
« Reply #72 on: 2001-02-05 11:59:00 »
Ficedula, since I can't really read Qhimm's source code, I can't help you figure out whats your problem. If you wouldnt mind mailing me your rough description on the .P files structure according to Qhimm's source, I "could " help you fill in the gaps.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Information on FF7.exe
« Reply #73 on: 2001-02-05 16:16:00 »
I've fixed that problem, now I have a different one. I can display each .P file correctly. However, there are multiple .P files for each model (remember the HRC skeleton; one for head, upper-left-arm, lower-left-arm, etc....). I can't get the parts "lined up" properly. Then again, I haven't been working on it that long, so...

The SaiNt

  • *
  • Posts: 1300
    • View Profile
Information on FF7.exe
« Reply #74 on: 2001-02-05 17:47:00 »
Ficedula, anyway, I really really wanna know what Qhimm's source code says so could you please explain it to me???