Users browsing this thread: 1 Guest(s)
Magic Control Code

#1
Posts: 48
Threads: 10
Thanks Received: 3
Thanks Given: 4
Joined: May 2015
Reputation: 2
Status
None
If I make a dump of all the spell's control code would anyone be interested in trying to parse through it with me? I've found it's pretty easy to tell (for the most part) how many bytes a command takes up, but actually telling what they do is much harder. I think comparing them against each other will make it easier.
  Find
Quote  

#2
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
You mean dumping spell command code or dumping all 256 spell list effect code? i must say that i'd be very interested in the second option, still i'm afraid i can't help here Sad


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#3
Posts: 48
Threads: 10
Thanks Received: 3
Thanks Given: 4
Joined: May 2015
Reputation: 2
Status
None
I'm still working out the details, but I meant the second thing. Basically dumping spell control code (like the event code). Unfortunately, I'm realizing that it jumps around a fair bit (I know EB is a conditional jump based on which subframe you're on and FA is a jump) so I think I'm going to have to figure out at least how to follow the code before I can dump it. You never know, maybe those are the only two jump commands.
  Find
Quote  

#4
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Although it wasn't exactly dealing with the spells, I sort of delved into this stuff before once a while back trying to just replace the katana graphic to another sword for the sword tech animations which can be seen in this thread here if you are interested: http://slickproductions.org/forum/index....pic=1958.0

I managed to document and pretty much figure out the ones for sword tech at least, and then thanks to Drakkhen's help got the intended changed sword graphic for them, but only some work correctly, with the sword in the correct position and animated correctly. So there's something in those codes that needs to be altered in some way for certain animations, but I was never able to figure it out...

So anyway yeah I for one would definitely be interested in learning more about these control codes for sure, picking them apart and whatnot. Documenting them all like that sounds like a good way to start.


We are born, live, die and then do the same thing over again.
Quote  

#5
Posts: 48
Threads: 10
Thanks Received: 3
Thanks Given: 4
Joined: May 2015
Reputation: 2
Status
None
Alright great. There's 128 commands, I have like 10 figured out so this isn't going to be easy to figure out, however I'm pretty sure I've got the command byte length figured out so I should be able to put together a dump of some sort. The way I figured out the length was pretty simple and probably will be useful for figuring out what at least some of the commands do. Basically I made the fire spell (since it has easy to recognize frames) into a loop and just tries out the commands to see which frames showed up

Here's the code for that (the fire spell start on 0x105f4d in a US 1.0 headered rom)


Code:
F0 00 EB 56 5D 56 5D 57 5D FF 89 FF XX 00 01 02 8A FF


Breaking it down

Code:
F0 00 - the first two bytes set the spell's framerate (and possibly something else) so this just slows things down

EB 56 5D 56 5D 57 5D- branches based on the current subsprite (copy of the effect), fire has 3. So to avoid confusion I made the first two brach to nothing

FF - this is the end command, the first two subsprites end up here

89 FF - this is where the 3rd subsprite code picks up, it starts a loop and run it 255 times

XX - This is just whatever command you want to test

00 01 02 - These display the first three frames of the fire spell, if you only see two you know you're dealing with a 2 byte command

8A - end of the loop

FF - finish

So yeah, hopefully I can get a dump together, and hopefully we can start figuring out these things and editing spells.
  Find
Quote  

#6
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Quote:EB 56 5D 56 5D 57 - branches based on the current subsprite (copy of the effect), fire has 3. So to avoid confusion I made the first two brach to nothing

After 5F there's a 5D before FF, and you didn't mention it... what is it?


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#7
Posts: 48
Threads: 10
Thanks Received: 3
Thanks Given: 4
Joined: May 2015
Reputation: 2
Status
None
Oops, that's the last byte of the EB branches (edited the post). The way EB works it that it's followed by two byte pointer (relative to 0x100200) based on the number of subsprites. So an effect that has 3 subsprites, like fire does, will have 6 bytes following EB. Drain has 6 subsprites, so any EB calls in drain will have 12 bytes following it.
  Find
Quote  

#8
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Uhm... what if i change spell animation before? Will spell's code change automatically and eventually become longer/shorter if i add/remove subsprites?


PS. post #1000! Kungfu!


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#9
Posts: 48
Threads: 10
Thanks Received: 3
Thanks Given: 4
Joined: May 2015
Reputation: 2
Status
None
I don't know how the game tells how many subsprites a spell has at the moment (I've just been counting them and hardcoding it) so I couldn't really tell you. If you've changed it and the game recognizes that then I assume the EB command will know as well so you'd have to add / remove pointers as well. If you have changed it and want to share how, that'd help me a lot.

As far as I know there's no limit to how long a spell's command code can be (FA is a jump command as well) but there's of course the risk of overwriting other spells.
  Find
Quote  

#10
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
No, i was just asking... still no tests, despite i actually did some change to spell animations: in Ultimate Czar hack i changed all Desperation attack animation and dummied spells, even if me and the boss potentially used a lot of spells in the fight, i never seen any issue with animations...


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite