Author Topic: Battle Animation Guide (Updated 5/4/10)  (Read 338 times)

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 17
    • View Profile
Battle Animation Guide (Updated 5/4/10)
« on: March 12, 2010, 11:57:45 AM »
[EDIT]Updated to 0.7, with several more magic animations.  More notes below.

[EDIT]I've just updated the guide to 0.6.  No new work has been done on the magic animations.  However, the guide now includes weapon animation information, researched by request of Jorgur.  Also, the Master Tables have been added to the main guide.  Therefore, I've removed that file.

****

The Animation Guide is the main file, and contains a relatively complete rundown of what I have so far.  With it, basic changes in magic animation (and magic in general) should be possible.  If there are any changes or clarifications that you feel should be made, please let me know.  Note that I don't know everything about the system yet; some aspects have been a little elusive.  I will continue to update this file as I learn more.  The current version is 0.5.

The second file is a list of Animation Routines which I use as a reference for testing.  This is very rough, contains no explanations or clarifications, and basically is just a dump file so I don't have to keep referring to the ROM during testing.

As I said, I do intend to continue updating the guide with more information.  Any updates will be posted in this thread, and I'll edit this post to point them out.
« Last Edit: May 04, 2010, 09:19:27 PM by LightPhoenix »

Jorgur

  • Moderator
  • *
  • Posts: 119
  • Gender: Male
    • View Profile
Re: Magic Animation Guide
« Reply #1 on: March 12, 2010, 05:32:01 PM »
This is impressive, to say the least. I did not really expect so much information already in the first version. As usual, I do have some comments though.
As I open the main document, the first thing I notice is that the amount of text is rather large. I like reading guides containing figures and examples, as opposed to having to read through blocks of text to understand something. Therefore I find it a little tedious to read in the beginning.

After that point, however, the lists start appearing. These are lightweight and informative, and seem to be well organized. "Routine Command List" and "Routine Commands" are particularly interesting. Like you say, the information is not quite complete enough yet to fully edit spells, but with some work here the guide would be a powerful asset indeed.

I see you refer to the animations as "routines". This can cause confusion. To me, the word "routine" only refers to machine code (but I don't know if that's just me). Maybe "script" is more appropriate?

I have not read through the guide in detail, seeing as how in-depth the animation data goes. Later, when I decide to move onto graphical editing I will probably be able to deliver more specific feedback.
« Last Edit: March 12, 2010, 07:43:27 PM by Jorgur »

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 17
    • View Profile
Re: Magic Animation Guide
« Reply #2 on: March 20, 2010, 08:04:38 AM »
Jorgur, thanks for the feedback!  Personally, I like a little explanation to go along with the lists.  Looking over the guide, it is a little long-winded and light on examples.  Specifically, at this point I'm going to have to include the master table in it as well.

I wanted a break from deciphering the animation scripts, and since you asked about weapon animations, I decided to look into that.  As it turns out, those are included in the Master Table as well.  I haven't figured it all out yet, but I'll give you what I have since I know you're interested.  I located a series of scripts that corresponded to weapons; the table referencing these is at D9/9E34.  This table is loaded at C1/A12B, where X is obtained from $F586. $F586 is set from the Master Table.  I was looking at the basic Staff attack, which used row 1F8 from the Master Table (ie, D8/38EE,X, where X = 1F8).

The weapon script is run separately from the magic scripts; there's different code for parsing, and it looks like the commands might be different.  I'll know more as I look into it more.
« Last Edit: March 27, 2010, 12:47:28 PM by LightPhoenix »

Jorgur

  • Moderator
  • *
  • Posts: 119
  • Gender: Male
    • View Profile
Re: Battle Animation Guide (Updated 3/27/10)
« Reply #3 on: March 29, 2010, 09:43:11 AM »
Quote
$F586 is set from the Master Table.  I was looking at the basic Staff attack, which used row 1F8 from the Master Table (ie, D8/38EE,X, where X = 1F8).
Haha, I tried finding the data with that scribbled info without any luck.

Okay, checking the new file now...

This is great! Exactly what I needed. I should be able to add new weapons to v0.6 now.
The guide has improved a bit from last version, but I still think it needs more work. The document is clearly dominated by ROM data rips. They are nice to use as examples to look at, but mostly I can use the hex editor to view ROM data.

LightPhoenix

  • FF5 Hacker
  • *
  • Posts: 17
    • View Profile
Re: Battle Animation Guide (Updated 5/4/10)
« Reply #4 on: May 04, 2010, 09:35:54 PM »
It's been a month, and I apologize for not updating sooner.  Chaotic times and all that.  I may be moving in the next month or two, so that may impact updates.

I've got a pretty good chunk of the animation commands done.  At this point, a lot of it is involving looking at the assembly to figure out what's going on.  An excellent example would be the "Priority" commands; basically they control the Z-stack, but the only reason I figured it out was because it altered the SNES VRAM stuff.  I wouldn't have been able to figure it out without Anomie's excellent doc.

As suspected, Byte 4 of the Master Table contains data that certain animation commands use.  I don't have it entirely figured out yet.  I'm beginning to suspect the third byte of the routine header also contains information on sprite processing.

I've done a lot of work on understanding how sprites are accessed.  I'm not prepared in the least to write it up.  To tell the truth, I don't understand a lot of it yet.  I think it was already known that magic sprites are stored starting at D9/0000 in 3BPP format.  Byte 1 of the Master Table is converted in a convoluted manner to get a starting position added to D9/0000.  It's not a simple formula at all.  The sprite is copied to 7F/D000, where it is presumably processed and drawn to the screen.  While the formula is complex, the potential to add new battle sprites seems very possible and dare I say easy on this end.  In theory, you could simply redirect D9/0000 (this is directly referenced) to a new E-bank or F-bank even.

Now, the actual frame commands (ie, 10 11 12 13 in Fire) in the routines are a little trickier.  It looks like those are actually commands as well.  It looks like they determine how frames are processed.  I'm really not sure what's going on here, and the assembly isn't really helping either.  Somehow this must indicate how to draw the sprites, but I'm really at a loss how.  I'll be pursuing this a bit more as I try to finish up the animation commands.

Jorgur

  • Moderator
  • *
  • Posts: 119
  • Gender: Male
    • View Profile
Re: Battle Animation Guide (Updated 5/4/10)
« Reply #5 on: June 30, 2010, 11:37:48 PM »
Do you think the document is completed enough to be submitted to the main site?