Author Topic: File 3 in Kernel.bin  (Read 6305 times)

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
File 3 in Kernel.bin
« on: 2006-06-17 18:43:25 »
Well working on q-gears it seems that file 3 in Kernel.bin is *NOT* the inital savemap. (oops! my bad!)

However I can't figure out what it is.

Acoording to my memory dump, file 3 is copied into memory location 0x00082422 on the PSX. (Plus or minus, I don't know if my memdump has a header or not)

Like I said, there isn't really much around it in memory and appears to be a lookup table

Guessing wildy, it's for battle, but I might be on a controlled substanse too.

Is this copied into memory on the PC version? That would mean it's device-indenpendant data.

What can you guys come up with....

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Re: File 3 in Kernel.bin
« Reply #1 on: 2006-06-18 07:58:20 »
After decompression, it is copied byte-for-byte to 0x0099CE10 and is 0xF94 bytes long.

I am using Windows XP but I don’t know which version of Final Fantasy VII.


It was copied there before I entered a battle, though that should have little to do with whether it relates to battles or not.

Those “LOVEPARA CHR:%d, %d->%d” sequences (4 total, one for each character you can date) seem to be related to the date sequence, possibly related to debugging.
It’s been a long time since I looked at this but isn’t the 0x03 in front of those related to displaying a dialog box in the field script?
So it’s script data of some kind.

In fact, a lot of this looks familiar, from when I was hacking through monster attack data.
Quite frankly, this looks a lot like monster data, except that the monsters are the characters you can date.

I would almost say they are using “attacks” to trigger the date scenes, though the models used aren’t the battle models.


L. Spiro

Terence Fergusson

  • *
  • Posts: 262
    • View Profile
Re: File 3 in Kernel.bin
« Reply #2 on: 2006-06-19 18:51:42 »
From my old notes (and since I'm idle enough to post):

Code: [Select]
File003: Character Stat Growth, Growth Requirements, Basic AI Scripting

0x000: Cloud - Str Curve ID
0x001: Cloud - Vit Curve ID
0x002: Cloud - Mag Curve ID
0x003: Cloud - Spr Curve ID
0x004: Cloud - Dex Curve ID
0x005: Cloud - Lck Curve ID
0x006: Cloud - HP Curve ID
0x007: Cloud - MP Curve ID
0x008: Cloud - XP Curve ID
0x009: Cloud - FF (padding)
0x00A: Cloud - Starting Level
0x00B: Cloud - FF (padding)
0x00C: Cloud - Limit Command 1-1
0x00D: Cloud - Limit Command 1-2
0x00E: Cloud - Limit Command 1-3 (UNUSED)
0x00F: Cloud - Limit Command 2-1
0x010: Cloud - Limit Command 2-2
0x011: Cloud - Limit Command 2-3 (UNUSED)
0x012: Cloud - Limit Command 3-1
0x013: Cloud - Limit Command 3-2
0x014: Cloud - Limit Command 3-3 (UNUSED)
0x015: Cloud - Limit Command 4-1
0x016: Cloud - Limit Command 4-2 (UNUSED)
0x017: Cloud - Limit Command 4-3 (UNUSED)
0x018: Cloud - Kills required for Limit Level 2
0x01A: Cloud - Kills required for Limit Level 3
0x01C: Cloud - Uses required for Limit 1-2
0x01E: Cloud - Uses required for Limit 1-3 (UNUSED)
0x020: Cloud - Uses required for Limit 2-2
0x022: Cloud - Uses required for Limit 2-3 (UNUSED)
0x024: Cloud - Uses required for Limit 3-2
0x026: Cloud - Uses required for Limit 3-3 (UNUSED)
0x028: Cloud - HP Divisor for Limit Level 1
0x02C: Cloud - HP Divisor for Limit Level 2
0x030: Cloud - HP Divisor for Limit Level 3
0x034: Cloud - HP Divisor for Limit Level 4
0x038: Barret (as above)
0x070: Tifa (as above)
0x0A8: Aeris (as above)
0x0E0: Red XIII (as above)
0x118: Yuffie (as above)
0x150: Cait Sith (as above)
0x188: Vincent (as above)
0x1C0: Cid (as above)

0x1F8: Random Bonus to Primary Stats (12 records, 1 byte each)
0x204: Random Bonus% to HP (12 records, 1 byte each)
0x210: Random Bonus% to MP (12 records, 1 byte each)

0x21C: Primary Stat Curve  0 - L 2-11 Gradient
0x21D: Primary Stat Curve  0 - L 2-11 Baseline
0x21E: Primary Stat Curve  0 - L12-21 Gradient
0x21F: Primary Stat Curve  0 - L12-21 Baseline
0x220: Primary Stat Curve  0 - L22-31 Gradient
0x221: Primary Stat Curve  0 - L22-31 Baseline
0x222: Primary Stat Curve  0 - L32-41 Gradient
0x223: Primary Stat Curve  0 - L32-41 Baseline
0x224: Primary Stat Curve  0 - L42-51 Gradient
0x225: Primary Stat Curve  0 - L42-51 Baseline
0x226: Primary Stat Curve  0 - L52-61 Gradient
0x227: Primary Stat Curve  0 - L52-61 Baseline
0x228: Primary Stat Curve  0 - L62-81 Gradient
0x229: Primary Stat Curve  0 - L62-81 Baseline
0x22A: Primary Stat Curve  0 - L82-99 Gradient
0x22B: Primary Stat Curve  0 - L82-99 Baseline
0x22C: Primary Stat Curve  1
0x23C: Primary Stat Curve  2
0x24C: Primary Stat Curve  3
 .....................
0x44C: Primary Stat Curve 35
0x45C: Primary Stat Curve 36
0x46C: HP Stat Curve 37 (Base multiplied by 40)
 .....................
0x4EC: HP Stat Curve 45 (Base multiplied by 40)
0x4FC: MP Stat Curve 46 (Base multiplied by  2)
 .....................
0x57C: MP Stat Curve 54 (Base multiplied by  2)
0x58C: EXP Curve 55     (Gradient is quadratic, no Base)
 .....................
0x60C: EXP Curbe 63     (Gradient is quadratic, no Base)

0x61C: Character AI Data (12 Objects, see below)
0xC00: FF Padding
0xE1C: Random Number Lookup Table - 256 numbers from 00 to FF used by the RNG to return pseudo-random numbers
0xF1C: Scene.bin File Lookup Table - 64 bytes
       Each byte contains the ID of the first file in the specific 8192 byte block in Scene.bin
       For example, the first four bytes in this table are 00 0C 12 19
       This means that the first 8192 bytes in Scene.bin holds the compressed data for files 00 to 0B, while the next
          8192 holds the data for files 0C to 11 and so on
       Support is here for 64 blocks of 8192, and only 33 blocks are used, so there is a lot of empty space available

0xF5C: Spell Order in Inbattle Magic Menu - 56 bytes
       This is the ID order for the way spells are displayed in battle
          00-1F means Restore Magic
          20-3F means Attack Magic
          40-5F means Indirect Magic
          60-7F means Advanced Magic (always last)

*Regarding AI*
Cloud, Barret, Tifa, Aeris and Yuffie have AI Data regarding Battle Affection.  This adjusts a variable that starts at
   100 either up or down depending on what happens in battle.  This value is definitely not used in the date,
   and can probably be thought of as a working system whose effects have been dummied out.

Vincent's Limit AI data is stored here, but is only run when his AI Mode is turned on.
Sephiroth's AI data is stored here, and his AI Setup subroutine automatically turns on AI Mode at the start of every
   battle.
There's a 12th Object, but it is both unused and there is no hint as to who it might've been meant for.  Consider
   it padding.

NobodyImportant

  • *
  • Posts: 92
    • View Profile
Re: File 3 in Kernel.bin
« Reply #3 on: 2006-06-19 19:08:11 »
If that's what it is, then this might help you too, halkun.

Oh, and really nice work, Terence.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: File 3 in Kernel.bin
« Reply #4 on: 2006-06-19 21:59:11 »
Terence Fergusson  :-o

I thought you were gone for good!

Hey Q-gears needs your help. Want to donate some of your notes?


L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Re: File 3 in Kernel.bin
« Reply #5 on: 2006-06-20 06:27:44 »
If he gives you his notes, pass them along to me, won’t you?   :-P


L. Spiro

Izban

  • *
  • Posts: 432
    • View Profile
Re: File 3 in Kernel.bin
« Reply #6 on: 2006-06-20 15:52:11 »
0x00E: Cloud - Limit Command 1-3 (UNUSED) does the mean it may be possible to get more limits in game

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: File 3 in Kernel.bin
« Reply #7 on: 2006-06-20 18:41:00 »
0x00E: Cloud - Limit Command 1-3 (UNUSED) does the mean it may be possible to get more limits in game
At this point I would say NO.  However anything is possible if you modify the game itself.  It does indicate that they allowed for other limits but as such likely elected not to use them in the game. :D

Cyb