It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
dtgreene: Actually, my understanding is that Lady Y. will use Mega-Death at the start of the third form, before you get to act. A Penance-ready party would one-shot the first two forms only to be wiped out by Mega-Death. Maybe you won because you had a summon out? (Or maybe you had death resistance equipped?)
I can't remember now. I probably killed her 2nd form with some summon. Aeons carried me through the whole main story in this game...

By the way, this is something you can't really do in FF XII, summons are so weak in that game, except maybe Zodiark. I was so excited to try out Belias after defeating him, but there were many worlds of difference between him as boss and him as summon... You can also make easy fights with Quickenings, but you first need to get them. I didn't use them as they look a bit cheaty.
avatar
dtgreene: By the way, have you seen the Final Fantasy 2 "executes arbitrary code" TAS?
I googled it, but it looked lame XD Code to win?
low rated
avatar
dtgreene: Actually, my understanding is that Lady Y. will use Mega-Death at the start of the third form, before you get to act. A Penance-ready party would one-shot the first two forms only to be wiped out by Mega-Death. Maybe you won because you had a summon out? (Or maybe you had death resistance equipped?)
avatar
Sarisio: I can't remember now. I probably killed her 2nd form with some summon. Aeons carried me through the whole main story in this game...

By the way, this is something you can't really do in FF XII, summons are so weak in that game, except maybe Zodiark. I was so excited to try out Belias after defeating him, but there were many worlds of difference between him as boss and him as summon... You can also make easy fights with Quickenings, but you first need to get them. I didn't use them as they look a bit cheaty.
avatar
dtgreene: By the way, have you seen the Final Fantasy 2 "executes arbitrary code" TAS?
avatar
Sarisio: I googled it, but it looked lame XD Code to win?
The idea behind arbitrary code TASes (and arbitrary code speedruns in general) is that the player writes code into memory (in this case, with character names) and tricks the game into executing the code.

You may notice that that TAS encode includes a dump of part of RAM on the right side. If you skip to the point (about 6 minutes into the run) and look at the right side, you will notice that data (namely the information on where the Warp spell will send the player) starts filling up more and more of RAM until, during the fight, some other data gets overwritten.

Essentially, the player hacked the game using only controller input. Many security exploits (including the Morris worm) use this sort of trick.
avatar
dtgreene: Essentially, the player hacked the game using only controller input. Many security exploits (including the Morris worm) use this sort of trick.
Nah, he uses knowledge of exploits.Going through same door/stairs thing made it reappearance in FF V I think (maybe in FF IV, not sure on that). Entering and leaving through same door/stairs in quick succession could freeze the game in early versions.

All TAS gameplays allow things, which don't really fit "hhacking through controller input only". It allows easy RNG-manipulation, which makes it easy to to not have a single random encounter and stuff like that. Same Final Fantasy V can very easily be cheated into having no random encounters by opening Menu at right point (note: I am not using this exploit).

Usually when it says TAS, it presumes all kind of exploits and not actually fair play. Non-TA Speed runs are also subject to this - e.g., it is like every FF IV Speed run involves skipping Sealed Cave entirely (especially laughable when it is done in Solo challenge).
avatar
dtgreene: You may notice that that TAS encode includes a dump of part of RAM on the right side. If you skip to the point (about 6 minutes into the run) and look at the right side, you will notice that data (namely the information on where the Warp spell will send the player) starts filling up more and more of RAM until, during the fight, some other data gets overwritten.
Watching it, it appears there it's missing the cleanup code that's usually present...

Let's see if i can explain. When you write functions you generally do the following
[code]
FunctionName:
Push Registers //onto stack
do work
Pop Registers //off stack
return
[/code]

which is fine, although it's possible a function doesn't clean/free up the stack properly. Then there's also calling the function, in C you push the variables onto the stack, so if we pushed Hello World, it would be:

[code]
push hellostring //pushes (char*) pointer
Call Print
add sp, sizeof(char *) //remove string pointer, if we wanted to preserve it we'd pop it instead.

hellostring: db "Hello World", 0
[/code]

So in the FF2 TAS, the add/pop used after calling the function to change the screen never got cleaned, lowering the stack/data until it's right where he wanted it.
low rated
avatar
dtgreene: You may notice that that TAS encode includes a dump of part of RAM on the right side. If you skip to the point (about 6 minutes into the run) and look at the right side, you will notice that data (namely the information on where the Warp spell will send the player) starts filling up more and more of RAM until, during the fight, some other data gets overwritten.
avatar
rtcvb32: Watching it, it appears there it's missing the cleanup code that's usually present...

Let's see if i can explain. When you write functions you generally do the following
[code]
FunctionName:
Push Registers //onto stack
do work
Pop Registers //off stack
return
[/code]

which is fine, although it's possible a function doesn't clean/free up the stack properly. Then there's also calling the function, in C you push the variables onto the stack, so if we pushed Hello World, it would be:

[code]
push hellostring //pushes (char*) pointer
Call Print
add sp, sizeof(char *) //remove string pointer, if we wanted to preserve it we'd pop it instead.

hellostring: db "Hello World", 0
[/code]

So in the FF2 TAS, the add/pop used after calling the function to change the screen never got cleaned, lowering the stack/data until it's right where he wanted it.
I think the reason the cleanup code isn't there is that the game has to implement the Warp spell. Warp, when cast outside of combat, teleports you back a number of floors equal to the spell's level. As a result, the game has to remember every floor you have been on since you entered the dungeon, and it seems the game uses the stack to store that information.

In C, one can actually store a linked list on the stack, using code like the following:


void liststack(Node *node)
{
Node new;
new.next = node;
if (some_condition)
liststack(&new);
else
work_with_list(&new);
}

Note that the function does not actually return the pointer to the list. Instead, the list is sent to another function once constructed, and once the function returns, the linked list will be deallocated due to it being stored entirely in local variables. Also, note that the local variable is an actual Node, not a pointer to one. (Notice no malloc here.)

(This will work in C++, provided you change the name of the variable "new".)

The Chicken Scheme compiler actually does something like this; here is an article if you're interested:
http://www.more-magic.net/posts/internals-gc.html

Incidentally, looking at the memory during the stairs portion of the TAS, I notice a pattern: 3A F2 CA 81 15 3A F2 CA 84 15, and then it repeats.
avatar
dtgreene: I think the reason the cleanup code isn't there is that the game has to implement the Warp spell. Warp, when cast outside of combat, teleports you back a number of floors equal to the spell's level. As a result, the game has to remember every floor you have been on since you entered the dungeon, and it seems the game uses the stack to store that information.
Well at least we know it was on purpose...

avatar
dtgreene: Incidentally, looking at the memory during the stairs portion of the TAS, I notice a pattern: 3A F2 CA 81 15 3A F2 CA 84 15, and then it repeats.
What he would really want is an absolute jump, plus potentially a couple leftover bytes as filler in case it offsets wrong... That or a 2 byte return address when it does a return... Glancing at a list of 6502 opcodes, neither 3A F2 or CA would have been a jump, so the jump address to win the game was either $1581 or $1584.. Depending on what the middle code is, it might not matter, it's the same address effectively... So it had to be overwriting the return address.
avatar
dtgreene: Incidentally, looking at the memory during the stairs portion of the TAS, I notice a pattern: 3A F2 CA 81 15 3A F2 CA 84 15, and then it repeats.
That's just variation of memory leak nothing else. One of those numbers could contain endgame scene trigger and it got written into combat section.

This door/stairs memory leak was much more nasty in other FF (it might actually be Lufia I or Breath of Fire I game, not sure), where it would outright freeze if you do such thing.
avatar
rtcvb32: What he would really want is an absolute jump, plus potentially a couple leftover bytes as filler in case it offsets wrong... That or a 2 byte return address when it does a return... Glancing at a list of 6502 opcodes, neither 3A F2 or CA would have been a jump, so the jump address to win the game was either $1581 or $1584.. Depending on what the middle code is, it might not matter, it's the same address effectively... So it had to be overwriting the return address.
You make it sound very convoluted. 4C at $0100 is Jump, and it is being used extensively in battle, and some of the following section where it was "jumping" got corrupted by door/stairs' exploit.
Post edited July 25, 2015 by Sarisio
avatar
Sarisio: You make it sound very convoluted. 4C at $0100 is Jump, and it is being used extensively in battle, and some of the following section where it was "jumping" got corrupted by door/stairs' exploit.
I wasn't sure if part of the name held extra instructions, seeing as none of those could be a jump, it had to just be the address... maybe i took the long winded approach as i looked over opcodes to figure out which ones it could/couldn't have been.
Post edited July 25, 2015 by rtcvb32
low rated
avatar
Sarisio: You make it sound very convoluted. 4C at $0100 is Jump, and it is being used extensively in battle, and some of the following section where it was "jumping" got corrupted by door/stairs' exploit.
avatar
rtcvb32: I wasn't sure if part of the name held extra instructions, seeing as none of those could be a jump, it had to just be the address... maybe i took the long winded approach as i looked over opcodes to figure out which ones it could/couldn't have been.
Have you looked at the TASVideos submission page?
http://tasvideos.org/4770S.html

It has plenty of technical details, including the actual meaning of the character names and (at least if you have Japanese working in your broswer) the game's character set.
avatar
dtgreene: Have you looked at the TASVideos submission page?
No I hadn't but it looks interesting...

Hmmm glancing at the Nameable text table, I'm surprised it's not in Shift-JIS