Author Topic: **da Files in Battle.lgp  (Read 15021 times)

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
**da Files in Battle.lgp
« on: 2001-12-21 14:23:00 »
Okay, I think I know what's written in the **da files from Battle.lgp:
I think they are simple .a files, but someone who knows the .a format properly (halkun, fice) could take a look at it.

I also think the **aa files are a kind of RSD file, **ab files sth like HRC files.

BTW: I can't see any other topics... is that my fault?

 - Alhexx

Sephiroth 3D

  • *
  • Posts: 1679
    • View Profile
    • ModCitizen 42
**da Files in Battle.lgp
« Reply #1 on: 2001-12-21 17:27:00 »
Alhexx... Great news about those files you discovered. I was thinking that they would be in there like that... (Wouldn't the .a files be compiled together? If not, where are the other animations?)

About the topics: Check your preferances, and change your default view to something greater than "Yesterday". I noticed this problem when I got on the board today too.

Sephiroth 3D

"I don't understand..." "You don't have to understand." - Final Fantasy: The Spirits Within

Sephiroth 3D.com
[email protected]

Darkness

  • *
  • Posts: 2181
    • View Profile
    • http://www.x0r.net
**da Files in Battle.lgp
« Reply #2 on: 2001-12-21 19:33:00 »
well, its much moe complicated then a normal HRC file, then. i opened up aaab in a hex editor, and couldnt even see a pattern.

edit: ok, i take that back: i see ** 01 00 00 repeated over and over.

** = some type of bone identifier in hex?

maybe this tells what parts the person/thing has.

i dont know, ive never attempted doing anything like this before.

edit2: 36 byte header + repeating ** 01 00 00 + 42 byte footer

for every different model, the repeating stuff is different, but so is what i thought was a footer. so screw that idea.


[edited] 249 2001-12-21 20:50

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
**da Files in Battle.lgp
« Reply #3 on: 2001-12-22 10:37:00 »
Darkness: I knwo that they're not HRC and RSD files - but I think that they have the same task. I'll take a closer look at those files later.

 - Alhexx

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
**da Files in Battle.lgp
« Reply #4 on: 2002-01-03 11:32:00 »
Heello, im back from my vacation, so how are you all doing ?

To the thread:
I dont think that there is any rsd file needed - there are no textures, except of eye&mouth texture, and that is allways on face.
But maybe im wrong, and there is some of this info in some unknown file.

I allways wanted to create some proggy, that would display all enemies from FF7, but im still lacking time. :(

And btw i was not working on FF for a long time, im doing something different every time i sit behind computer. :)
Dont know if i get myself to work on FF

phaeron

  • *
  • Posts: 30
    • View Profile
**da Files in Battle.lgp
« Reply #5 on: 2002-02-13 07:03:00 »
Forgive me for barging in.   :D

The **aa files are the battle skeleton and tell you which bones to connect together -- it is similar to the first entry in the .lzs files in the PSX version.  battle.lgp/rvaa matches the bone structure in earith.lzs (31 bones), except that the entries are 12 bytes per bone instead of 8, and either the bone length or geometry pointer (or possibly both) is missing.  Bone numbers in the PC version appear to be one less than the PSX version, so -1 is the root locator.

The **da file is also a mystery to me, but it is identical to 73 packets in the earith.lzs file, concatenated back-to-back.  It does not appear to be either LZSS or Deflate (GZIP) compressed, as are the PSX .lzs and .x files.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
**da Files in Battle.lgp
« Reply #6 on: 2002-02-13 12:06:00 »
You're forgiven ;)

And thanks for the information on the **aa files ... could be very useful when I finally get time to work on the Remake again.

Welcome to the board as well :)

Mental note: Must check out PSX files ... must check out PSX files...

phaeron

  • *
  • Posts: 30
    • View Profile
**da Files in Battle.lgp
« Reply #7 on: 2002-02-14 03:15:00 »
Before you tear apart the PSX files, double check your decompressor -- the last time I tried lzs.exe I got these discrepancies in earith.lzs:

00000048: 00 70
00000144: 00 70
00000404: 00 70
0000042E: 00 70
00000DF0: 00 70
00001082: 00 70
000011B0: 00 70
00001228: 00 70
00001238: 00 70

0x70 is the correct value for these locations.

Also, the pack structure is different from the PC's .lgp files -- the directory is just a dword count of records (N), followed by N+1 pointers.  No names.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
**da Files in Battle.lgp
« Reply #8 on: 2002-02-14 08:49:00 »
This could be important ;)

I've been told my LZS decompressor has bugs in it, and I've double-checked the code twice now. Never found any problems with it ... 'cept it sounds like there must be.

Do *you* have another LZS decompressor...? If so, where can I get it to compare it against mine?

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
**da Files in Battle.lgp
« Reply #9 on: 2002-02-14 11:22:00 »
welcome phareon, i hope you'll enjoy your stay.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
**da Files in Battle.lgp
« Reply #10 on: 2002-02-14 11:33:00 »
(Ahh ... finally someone who knows what (s)he's talkin' bout -> I like that!)

(I haven't been online for 2 days, that's why I haven't posted before)

Welcome to our board, phaeron! It seems like you could (or will) be a great help for us in hacking those damn file formats...

As for my hacking progress: As you probably all have already seen, all my projects are currently freezed. My theoretical driving license exam is on 2002-03-06, so I have to concentrate on that. After that, I'll continue hacking those files, and I'll release a new Version of Ultima.
Oh, and I'll finally start learning C++ :D

(Hm ... there could be a new 'problem' in future... it seems like I'll get a girlfriend the next time ... hehe ... ... or at least I hope so: my desired person seems to be interested in me too ... hm? Does this belong to the spam forum? I don't think so ... and I am called a moderator, heh? I think I'd better shut up now :D )

 - Alhexx

 - edit -
Had to correct some words
[edited] 169 2002-02-14 12:35

Darkness

  • *
  • Posts: 2181
    • View Profile
    • http://www.x0r.net
**da Files in Battle.lgp
« Reply #11 on: 2002-02-14 16:22:00 »
i started attempting to teach myself MFC, and the book is 1000 pages long!

Sephiroth 3D

  • *
  • Posts: 1679
    • View Profile
    • ModCitizen 42
**da Files in Battle.lgp
« Reply #12 on: 2002-02-14 18:46:00 »
My progress in learning VC++ has been going VERY slow. I've had almost no time to work on learning it. But I'm working on making a Half-life mod now, so I'm forcing myself to learn it so I can get the mod farther along with development before I need to spend time finding a real programmer to do my dirty work. ;)

Sephiroth 3D

"I don't understand..." "You don't have to understand." - Final Fantasy: The Spirits Within

Sephiroth 3D.com
[email protected]

phaeron

  • *
  • Posts: 30
    • View Profile
**da Files in Battle.lgp
« Reply #13 on: 2002-02-15 03:13:00 »
I think I'm also the one you told you before.   :wink:

The LZSS compression in FF7 is identical to the LZSS compression implemented by the program at:
 http://www.rpi.edu/~ernesm/info/archive.umich.edu/mac.bin/development/source/snippets/lzcompression
except that the buffer is initialized to nulls instead of spaces.

Also,  my decompressor, with test file.  (C++ -- sorry.)  I found out that LZS.EXE is actually making only one mistake; it decompresses this file incorrectly:

04 00 00 00 01 70 EC F0 > 70 00 00 00 (should be 70 00 00 70).

Hope this helps.

The **da files are indeed the battle animations -- Cloud's bone positions begin at offset 0x20 in rtda, starting with hip.  It looks like the bone positions per frame are four bytes each, with one byte each for X, Y, and Z rotations (8-bit binary fixed-point angle), but there are some discrepancies in what modifying various bytes does.  I'm thinking that some parts of that particular animation are getting modified or overridden by other partial animations.  Also weird is that translating or rotating Cloud doesn't affect the weapon (!).

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
**da Files in Battle.lgp
« Reply #14 on: 2002-02-15 10:21:00 »
It was indeed you (among others ... argggh!) who pointed out the LZSS compression before ... 'cept I never *could* find an error in my code.

That sample should help a *lot*. Domo arigato! ^_^

I'll work on it when I get back in tonight....

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
**da Files in Battle.lgp
« Reply #15 on: 2002-02-15 11:36:00 »
Btw, when talking about compressions, anybody has some Easy example code of flate(inflate)/deflate compression ? please?

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
**da Files in Battle.lgp
« Reply #16 on: 2002-02-15 16:46:00 »
Compressions? Whah! Since I had to decode that 'easy' compression for Oni Textures (thanx 'gain, Fice), I don't like compression any more.

phaeron: Hey, do you have a homepage?

Okay, I'm leavin' now - my mom's buggin' me...


 - Alhexx

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
**da Files in Battle.lgp
« Reply #17 on: 2002-02-15 17:55:00 »
He in fact has a rather popular homepage, due to the rather popular program he's written ;)

J*** H*******

  • Guest
**da Files in Battle.lgp
« Reply #18 on: 2002-02-15 20:08:00 »
Message.

PurpleSmurf

  • *
  • Posts: 763
    • View Profile
**da Files in Battle.lgp
« Reply #19 on: 2002-02-15 21:15:00 »
if you would be so kind: what is the url?

The SaiNt

  • *
  • Posts: 1300
    • View Profile
**da Files in Battle.lgp
« Reply #20 on: 2002-02-16 04:38:00 »
Virtualdub? Interesting...

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
**da Files in Battle.lgp
« Reply #21 on: 2002-02-16 15:52:00 »
VirtualDub? Phaeron, don' tell me you've written it...
Just let me take a look at the version I've got at home ...
WHOHOO ! Yep, I see a [email protected] mail address ... hm ... seems like we got someone really popular in here....

 - Alhexx

PurpleSmurf

  • *
  • Posts: 763
    • View Profile
**da Files in Battle.lgp
« Reply #22 on: 2002-02-17 05:45:00 »
not only popular but an amazing programmer. i just finished poking around his site. and he is GOOD!!! if he has the time i think phaeron could be a big help on the remake...................

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
**da Files in Battle.lgp
« Reply #23 on: 2002-02-17 22:19:00 »
Damn, I thought I recognized the name. Apart from the regular faces, it's really rare to encounter people who really know what they're talking about  ^_^ I'm really quite surprised people are still as fascinated with cracking the FF7 formats... Well the more the merrier, right? Good to see you here, anyway.

Sigh... I'm actually a bit saddened, I wish I had time to pursue every little shred of inspiration when it comes to these files. I like to stay on top of things ^_^

Hmm... if fice's LZS routine has bugs, what about mine? Fice, did you base yours on mine or rewrite it?
[edited] 2 2002-02-17 23:23

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
**da Files in Battle.lgp
« Reply #24 on: 2002-02-18 14:06:00 »
Yes, I based my code on yours, which means yours *probably* has the bug as well. It's a fairly rare condition, and when it does occur it usually only affects a few bytes at most ... but it can happen. The link Phaeron posted contains the file he was talking about, an 8? byte file that causes my compressor to exhibit the bug ;)

Damn, but it's nice when people not only report bugs but give me information enough to fix them ;)