Author Topic: Kernel.bin (or update Gears [halkun])  (Read 7004 times)

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Kernel.bin (or update Gears [halkun])
« on: 2004-10-19 17:28:00 »
This isn’t in Gears and is in fact listed as “Unknown”.

I don’t know how recent this is or how accurate, so I am just going to throw this on the table and if it’s new, it’s new, and if it is old, it’s old.



The text files inside Kernel.bin are already known to be just text so I won’t touch them.

The first 9 files are listed as unknown, so here is what they are.

1: Command data.
2: Attack data.
3: Unknown.
4: Character starting stats.
5: Item data.
6: Weapon data.
7: Armor data.
8: Accessory data.
9: Materia data.


I am not positive that number 1 is command data, but I believe it is.

Of course, we have already decoded the attacks, characters, items, weapons, armors, accessories, and Materia, but not yet the command data to my knowledge.


It seems pretty straight-forward but I can not be arsed with it.
I’m already too busy on the battle animations and the field files (the rendered images).


Anyway, I kept it short in case this is already known information, but in either case, you can update Gears with this information, halkun.


L. Spiro

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Kernel.bin (or update Gears [halkun])
« Reply #1 on: 2004-10-20 04:55:55 »
I am making a note. I apologize that Gears is suspended. School and work is a full-time thing.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Kernel.bin (or update Gears [halkun])
« Reply #2 on: 2004-12-05 09:23:52 »
*DOUBLE POST*, but it's been a few months.....

I've updated Gears, but I was wondering if you woudn't be able to shed some more light into the individual formats? I think we decompiled them before, right?

Is there any logical groupings to the text? 10-27?

Also, I bet dollars to donuts that #3 is the shop inventory listings, as it's the only thing that's missing. ^_^

(WOW! I forgot how much fun it was to work on Gears!)

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Kernel.bin (or update Gears [halkun])
« Reply #3 on: 2004-12-05 13:48:22 »
I have all the old file format listings for characters, magic, items, weapons, armors, accessories, and Materia.

Just give me somewhere to send them.


The first file IS definitely 100% command data.
I’ve only messed around with it a little but I have found already that if you set the entire file to a bunch of 0’s that every single attack, command, item, everything you can do in battle will target the character who is casting the attack.  Even summons.  And not only that, they will ONLY attack that character.  Megalixir will only heal one character (the character using it), etc.
I managed to kill Red XIII 13 times over by having him cast Knights of Round on himself.

The first byte of command data is the targeter.  It is the same way as the targeters for items and magic.  0x00 = Target Self (And Only Self).

That is all I have really decoded from them.  It is all that really matters, at least for now.



1: Command Data
2: Magic Data
3: Shops?
4: Character Data
5: Item Data
6: Weapon Data
7: Armor Data
8: Accessory Data
9: Materia Data
10: Command Decriptions
11: Magic Decriptions
12: Item Decriptions
13: Weapon Decriptions
14: Armor Decriptions
15: Accessory Decriptions
16: Materia Decriptions
17: Key Item Decriptions
18: Command Names
19: Magic Names
20: Item Names
21: Weapon Names
22: Armor Names
23: Accessory Names
24: Materia Names
25: Key Item Names
26: Battle and Battle-Screen Text
27: Summon Special Names (shown at the top of the screen when you cast a summon [Diamond Dust, Ultimate End, etc.])


Files 10-27 are LZS-compressed while 1-9 are not.
If you uncompress 10-25, stack them into one large file, and then LZS-compress it, you will have Kernel2.bin.

I do not know why, when they were so concerned with space, they needed two copies of every item name and description.


L. Spiro

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Kernel.bin (or update Gears [halkun])
« Reply #4 on: 2004-12-05 13:52:45 »
send it to halkun2002 at yahoo dot com

Quote

Files 10-27 are LZS-compressed while 1-9 are not.
If you uncompress 10-25, stack them into one large file, and then LZS-compress it, you will have Kernel2.bin.


Wow, that's amusing....

sfx1999

  • *
  • Posts: 1142
    • View Profile
Kernel.bin (or update Gears [halkun])
« Reply #5 on: 2004-12-05 17:52:54 »
Just curious, what does LZS stand for?

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Kernel.bin (or update Gears [halkun])
« Reply #6 on: 2004-12-05 20:22:50 »
LZS == Lempel-Ziv-Stac

It's a funny acronym until you realize it's the last names of the devopers.

Abraham Lempel Works a HP now.
http://www.hpl.hp.com/about/bios/abraham_lempel.html

Jacob Ziv is a professor at the Israel Institute of Technology
http://www.marconifoundation.org/pages/dynamic/fellows/fellow_details.php?roster_id=23

Stac Electronics did the last bit. They made a hard drive compression program called "Stacker" which, it would seem, was stolen by Microsoft (Doublespace). On going a google search, it would seem I wound up in Microsoft's dirty laundry. Stac sued MS for patent infrigment on the stac algo.

http://www.vaxxine.com/lawyers/articles/stac.html

Intresting....


++++ EDIT +++++

Oops, It's actually "Lempel-Ziv-Shannon-Fano, Satisitcal plus Arthimitic " (LZSS+A) compression. The Stac algo is still patented.

Claude E. Shannon was a mathematician for bell labs. Won the nobel prize.
http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Shannon.html

The LZSS+A algo was devoped by Professor Haruhiko Okumura
http://oku.edu.mie-u.ac.jp/~okumura/index-e.html

He actaully works on the Linux Kernel too. Go him! He speaks english as well.

I wonder if I should put this into Gears?

lasyan3

  • *
  • Posts: 76
    • View Profile
Kernel.bin (or update Gears [halkun])
« Reply #7 on: 2004-12-06 06:58:22 »
Well, since psx dat files (and perhaps others files) are compressed using lzss, I thinnk it should be interesting to explain this compression, but this is not the most important part of Gears.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Kernel.bin (or update Gears [halkun])
« Reply #8 on: 2004-12-07 04:27:35 »
If you add the explanation about this compression to gears, well, I uh-

Okay ficedula is a nice guy but his format descriptions are the hardest things to read on Earth.

If you need this description in Gears I could rewrite it.


L. Spiro

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Kernel.bin (or update Gears [halkun])
« Reply #9 on: 2004-12-07 11:04:36 »
One of the more amusing things about Gears is you can tell It's written bu lota people from all over the planet.

Go ahead and rewrite. I very much would like corrections. In the end, I would like it all to liik the Terrence's Battle Mechanics doc I have in there.

Speaking of which, wasn't he working on the Battle scripting system?

Speaking of scripting systems, I wonder how far along Qhimm is on the Field script?

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Kernel.bin (or update Gears [halkun])
« Reply #10 on: 2004-12-07 11:33:42 »
Quote from: halkun
LZS == Lempel-Ziv-Stac
Oh this reminded me of LZW archive type (like RAR or ZIP), in this case LZW stands for Lempel - Ziv - Welch iirc ( I dont know why do I remember such a noninportant information ;) ... so looks like competitive alogrithm

Cyberman

  • *
  • Posts: 1572
    • View Profile
Kernel.bin (or update Gears [halkun])
« Reply #11 on: 2004-12-07 18:30:56 »
Quote from: mirex
Quote from: halkun
LZS == Lempel-Ziv-Stac
Oh this reminded me of LZW archive type (like RAR or ZIP), in this case LZW stands for Lempel - Ziv - Welch iirc ( I dont know why do I remember such a noninportant information ;) ... so looks like competitive alogrithm
LZW is a different algorythm. It forces a token size say 9 bits with an escape token for dictionary enlargement (in this case all 1's in the bitstream).  The data is packed in a bit stream. Patterns are compressed by reading the stream and issuing a new token for repeated data.  The algorythm doesn't require the dictionary to be stored because the packed data is used to regenerate the data.
To keep the dictionary size smaller they limited the token count.  I think ZIP originally used 12 bit tokens and newer versions added up to 16.  This of course takes much longer to compress. Hence they put 'fast' and 'best' compression settings. These just change the maximum token size before the dictionary is FLUSHED and restarted :)

ZIP used Shannon - Fano bit compression to further reduce the size of the data. It's like Hoffman compression only it seems to do a better job on more random data.  These are BITWISE compression algorythms so.. it gets weirder from that point.

Cyb

sfx1999

  • *
  • Posts: 1142
    • View Profile
Kernel.bin (or update Gears [halkun])
« Reply #12 on: 2004-12-08 03:30:53 »
On another note:

Quote
Unisys U.S. LZW Patent No. 4,558,302 expired on June 20, 2003, the counterpart patents in the United Kingdom, France, Germany and Italy expired on June 18, 2004, the Japanese counterpart patents expired on June 20, 2004 and the counterpart Canadian patent expired on July 7, 2004.


http://www.unisys.com/about__unisys/lzw

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Kernel.bin (or update Gears [halkun])
« Reply #13 on: 2004-12-11 13:24:01 »
Updated some more stuff on Kernel.bin. (Funny how finals are coming up and all of the sudden small Gears updates happen.... I wonder if that is somehow connected? )