FF6 Hacking
Trying to understand subroutines - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Trying to understand subroutines (/thread-3041.html)

Pages: 1 2 3


RE: Trying to understand subroutines - Catone - 12-08-2015

35/ for 3F/ seems right, but I can't remember if you have to account for -200 for headered address on events.

And wow, good catch, I didn't even notice that.


RE: Trying to understand subroutines - Gi Nattak - 12-08-2015

(12-08-2015, 07:07 PM)Kugawattan Wrote: Yes, I meant that. Sorry.

I remember having some issue editing this very event after the train, but I forget what it was and what needed to be done, but I know for some events it doesn't like returning with just FE at the end... maybe try instead using a subroutine B2 xx yy zz FE to jump back to the rest of the code where it normally is and plays out, if that's still a possibility. I realize this might not make much technical sense, but it does the trick sometimes.

Another option would be to move the entire event to free space, like the entire thing. Sometimes when I was having issues with freezing it turned out for whatever reason I had to have the whole damn thing play out with no jumps in-between.


RE: Trying to understand subroutines - madsiur - 12-08-2015

(12-08-2015, 07:15 PM)catone Wrote: I can't remember if you have to account for -200 for headered address on events.

This become irrelevant if you don't work with a header when writing event or assembly code, a thing everyone should do.


RE: Trying to understand subroutines - Catone - 12-08-2015

"Should" do? Yeah that's true, but its just so much fun confusing the hell out of yourself trying to remember to add for the header, and even more fun when you have to figure out if your adding for the header or subtracting for the header!

Although, in this case IF you still have the header, you do have to account for it because the start point of events would be CA/0200.

Which means your jump would need to be: 00 EE 35 not 00 F0 35.


RE: Trying to understand subroutines - Kugawattan - 12-08-2015

Quote:maybe try instead using a subroutine B2 xx yy zz FE to jump back to the rest of the code where it normally is and plays out, if that's still a possibility. I realize this might not make much technical sense, but it does the trick sometimes.

Thank you Gi Nattak. This worked perfectly as I intended. You're my saviour man, my own personal...Hacking...fairy...? Whatever. You're great, thanks for your time!