Kernel.bin: With a Vengence!

  • Thread starter Thread starter halkun
  • Start date Start date
Status
Not open for further replies.
H

halkun

Guest
Hi guys.
I updated gears with muchly updated Kernel.bin info. I have the whole thing mapped except for section 1 (Command data) which I will provide a dump for.

There are still unknown holes, and I can't verify everything. I might be way off on some stuff too. Feel free to fill in the blanks.

It turns out I was right, Section 4 (Character data) is actually the initial character records for the savemap, along with the data right under it, all the way to the clock varible. It gets copied directly to the savemap.

Section 3 suprised me. It's almost an entire save image. I think this is the inital savemap state that gets copied into RAM when the game is initalized. Pretty cool.

As for section 1, here's the command data records all layed out and pretty

Code: [Select]
Code:
FF00 FFFF FFFF FFFF FF07 FFFF FFFF FFFF ;Command 1FF01 FFFF FFFF FFFF FF02 FFFF FFFF FFFF ;Command 2FF03 FFFF FFFF FFFF FF07 FFFF 00B8 00B9 ;Command 31F00 FFFF 00BC 00BD 170B FFFF 00C5 00C5 ;Command 40B05 FFFF 00C4 00C4 1F00 FFFF 00BE 00BF ;Command 51F00 FFFF 00C0 00C1 1F00 FFFF 00C2 00C3 ;Command 60000 FFFF FFFF FFFF FF04 FFFF FFFF FFFF ;Command 7FF00 FFFF FFFF FFFF FF00 FFFF FFFF FFFF ;Command 8FF00 FFFF FFFF FFFF FF07 FFFF FFFF 00B4 ;Command 90000 FFFF FFFF FFFF 0000 FFFF FFFF FFFF ;Command 10FF06 FFFF FFFF FFFF FF08 FFFF FFFF FFFF ;Command 11FF09 FFFF FFFF FFFF FF0A FFFF FFFF FFFF ;Command 121700 FFFF 00B4 00B4 FF07 FFFF 00B5 00B5 ;Command 131700 FFFF 00B7 00B7 9700 FFFF 00B6 00B6 ;Command 14FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF ;Command 15

It's pretty tiny, but I'm burnt out again.

Gears has passed 200 pages. Doing a quick overview of what is contained in there. I think we have enough information to re-create the bare bones of an engine, minus the world map. I'm not saying it's complete, but I'm pretty sure we could at least load startmap and place some inital values. Mind you we can't execute fieldscript yet, only parse it, but wow! This is really cool.

Anyway have fun. Happy Late Christmas present!

EDIT
Oops, I forgot to finish up the materia section, now it's exported with the correct version.
 
Having mapped out some of the more game-oriented field script commands and their implementations, I think I have enough basis to summarize the success of FF7 in two words: "pure luck". The scripting system consists of equal parts ingenious design and poor construction. It's like several different people wrote differents parts of the script and rarely talked to each other.

Still quite a ways to go on that, btw. I can reasonably quickly map out the syntax and semantics of the simpler commands without having to fully understand their implementation, but man oh man the more low-level commands... they're going to take a while to get done.
 
I think I got the formatting wrong on the command section. Does this make more sense?

Code: [Select]
Code:
FF00 FFFF FFFF FFFF ;Command 1FF07 FFFF FFFF FFFF ;Command 2FF01 FFFF FFFF FFFF ;Command 3FF02 FFFF FFFF FFFF ;Command 4FF03 FFFF FFFF FFFF ;Command 5FF07 FFFF 00B8 00B9 ;Command 61F00 FFFF 00BC 00BD ;Command 7170B FFFF 00C5 00C5 ;Command 80B05 FFFF 00C4 00C4 ;Command 91F00 FFFF 00BE 00BF ;Command 101F00 FFFF 00C0 00C1 ;Command 111F00 FFFF 00C2 00C3 ;Command 120000 FFFF FFFF FFFF ;Command 13FF04 FFFF FFFF FFFF ;Command 14FF00 FFFF FFFF FFFF ;Command 15FF00 FFFF FFFF FFFF ;Command 16FF00 FFFF FFFF FFFF ;Command 17FF07 FFFF FFFF 00B4 ;Command 180000 FFFF FFFF FFFF ;Command 190000 FFFF FFFF FFFF ;Command 20FF06 FFFF FFFF FFFF ;Command 21FF08 FFFF FFFF FFFF ;Command 22FF09 FFFF FFFF FFFF ;Command 23FF0A FFFF FFFF FFFF ;Command 241700 FFFF 00B4 00B4 ;Command 25FF07 FFFF 00B5 00B5 ;Command 261700 FFFF 00B7 00B7 ;Command 279700 FFFF 00B6 00B6 ;Command 28FFFF FFFF FFFF FFFF ;Command 29FFFF FFFF FFFF FFFF ;Command 30

Hmmm......
 
Having mapped out some of the more game-oriented field script commands and their implementations, I think I have enough basis to summarize the success of FF7 in two words: "pure luck". The scripting system consists of equal parts ingenious design and poor construction. It's like several different people wrote differents parts of the script and rarely talked to each other.
Umm. Have you worked in software engineering? Have you worked in videogame software engineering? I'm not surprised.
First of all, FF7 was made when the industry made the transition from SNES to PSX, a lot of programmers probably just started moving from Assembler to C at that point. And you don't believe what a difference in skill you have even in professional teams.
 
As I have posted before, the second byte of each command data set is the attack target which works in exactly the same way as the item target and spell target.

The names for the commands are:

Code: [Select]
Code:
01: Left02: Attack03: Magic04: Summon05: Item06: Steal07: Sense08: Coin09: Throw10: Morph11: D.blow12: Manip.13: Mime14: E.Skill15: All:16: 4x:17:18: Mug19: Change20: Defend21: Limit22: W-Magic23: W-Sum.24: W-Item25: Slash-All26: 2x-Cut27: Flash28: 4x-Cut29:30:


In RAM, the data for each command is exactly as shown in the files, so editing the data is very simple.
No need to change the file and then reboot the game; just change the data in RAM directly.

However, the only change in game play I have ever been able to muster is by setting the entire set of data to 0.
By doing this, my team could only attack themselves, even with limits and summons.
Even attacks that normally attack all of a team would only attack the single character who cast the attack.

I have tried to make every command the as every other command (I changed them all to Steal) and nothing happened.
So I don’t know the significance to the other bytes.


L. Spiro
 
That's why editing PSX save states rocks so much. I can so a rearch for this memory block on my hard drive, change, load, and execute. If it smashes, edit back, reload and execute ALL WITHOUT RESETTING THE GAME. ^_^

Emulation rocks

Code: [Select]
Code:
FF 00 FF FF FF FF FF FF ;LeftFF 07 FF FF FF FF FF FF ;AttackFF 01 FF FF FF FF FF FF ;MagicFF 02 FF FF FF FF FF FF ;SummonFF 03 FF FF FF FF FF FF ;ItemFF 07 FF FF 00 B8 00 B9 ;Steal1F 00 FF FF 00 BC 00 BD ;Sense17 0B FF FF 00 C5 00 C5 ;Coin0B 05 FF FF 00 C4 00 C4 ;Throw1F 00 FF FF 00 BE 00 BF ;Morph1F 00 FF FF 00 C0 00 C1 ;D.Blow1F 00 FF FF 00 C2 00 C3 ;Manip00 00 FF FF FF FF FF FF ;MimeFF 04 FF FF FF FF FF FF ;E.SkillFF 00 FF FF FF FF FF FF ;AllFF 00 FF FF FF FF FF FF ;4xFF 00 FF FF FF FF FF FF ;FF 07 FF FF FF FF 00 B4 ;Mug00 00 FF FF FF FF FF FF ;Change00 00 FF FF FF FF FF FF ;DefendFF 06 FF FF FF FF FF FF ;LimitFF 08 FF FF FF FF FF FF ;W-MagicFF 09 FF FF FF FF FF FF ;W-Summ.FF 0A FF FF FF FF FF FF ;W-Item17 00 FF FF 00 B4 00 B4 ;Slash-AllFF 07 FF FF 00 B5 00 B5 ;2x-Cut17 00 FF FF 00 B7 00 B7 ;Flash97 00 FF FF 00 B6 00 B6 ;4x-CutFF FF FF FF FF FF FF FF ;FF FF FF FF FF FF FF FF ;

That looks a little better
 
It looks like the 17th, 29th, and 30th memory addresses have no commands associated with them, based on the list shown in Halkan's post.  I can sort of understand why the 29th and 30th dont' have anything, but why is the 17th blank? -_-

That doesn't make any sense, at least to me.....
 
Status
Not open for further replies.
Back
Top