This is a split board - You can return to the Split List for other boards.

  • Topic Archived
You're browsing the GameFAQs Message Boards as a guest. Sign Up for free (or Log In if you already have an account) to be able to post messages, change how messages are displayed, and view media in posts.
  1. Boards
  2. Final Fantasy VII
  3. ATTN: Terrence Fergusson

User Info: Yojimbo_Beta

Yojimbo_Beta
9 years ago#1
Sorry to bother you, but I wondered if you knew - what's the size of the stack when dealing with AI? Also, does the stack clear between turns?

Thanks for your time,
JBMK

User Info: Yojimbo_Beta

Yojimbo_Beta
9 years ago#2
...Not that I have any intention of willingly tempting an overflow.
To the newbies: Third tab from the left. An FAQ is your friend. I am not.

User Info: Terence

Terence
9 years ago#3
I'm reasonably sure the stack has space for 512 variables, but different types of data will take up different spaces in it. It's plenty of space and you'd have to do a hell of a lot to overflow it, but it still pays to use the stack sensibly.

I don't know for certain whether the stack is properly reset between turns. I don't see any reason why it shouldn't be, but I'm sure you're in a better position than I am to test whether it does or not. I also have no information on how the game deals with either an overflow or underflow of the stack (but I didn't see any overflow checking in the quick glance I made, so be careful in that area).

User Info: Yojimbo_Beta

Yojimbo_Beta
9 years ago#4
Thanks for the quick response!

I'd try and write code that deliberately overflows (leaves eight bytes 'spare' each time), and report the effects to you, but at the moment I'm at the family home for Christmas, and don't have the computer with the modding tools etc. At any rate, I imagine it would just crash. I'm not sure how FF7 - or indeed the PSOne - handles the call stack. I'm not even sure about the 'structure' of the PSOne's RAM, never mind whether or not the stack would 'expand' into space reserved for other resources. I certainly can't imagine anything desirable happening, anyway.

Thanks again. I was a bit concerned about overflowing with particularly complex AI codes, but with 512 that shouldn't be an issue.
  1. Boards
  2. Final Fantasy VII
  3. ATTN: Terrence Fergusson
  • Topic Archived

GameFAQs Answers