If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
EarthBound/Text parser call stack: Difference between revisions
Jump to navigation
Jump to search
m (formatting) |
m (Xkeeper moved page EarthBound:Text parser call stack to EarthBound/Text parser call stack: normalize subpages and titles) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{subpage|game=EarthBound:RAM map}} | |||
The text parser uses a call stack, with the current text parser location usually stored at $7E:96C5, but if a [08] reference jump or similar control code is used, the stack pointer ($7E:97B8) is incremented, and a new "text parser" object is pushed onto the parser's call stack. | The text parser uses a call stack, with the current text parser location usually stored at $7E:96C5, but if a [08] reference jump or similar control code is used, the stack pointer ($7E:97B8) is incremented, and a new "text parser" object is pushed onto the parser's call stack. | ||
Latest revision as of 02:41, 24 January 2024
This is a sub-page of EarthBound.
The text parser uses a call stack, with the current text parser location usually stored at $7E:96C5, but if a [08] reference jump or similar control code is used, the stack pointer ($7E:97B8) is incremented, and a new "text parser" object is pushed onto the parser's call stack.
Here is a view of the RAM beginning at $7E:96C5 dumped, giving a visual explanation of how it works.
- Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A
- 00000000: 06 00 F2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 0000001B: 86 00 F2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 00000036: 96 00 F2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 00000051: A6 00 F2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 0000006C: B1 00 F2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 00000087: C1 00 F2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 000000A2: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 000000BD: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 000000D8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- 000000F3: 05 00 B0 00 F2 00 00 00 00 00 00 00 00 ...
From this, we can tell that there has already been 5 calls, with the original text block starting at $F2:0006 (06 00 F2) We can also see the stack pointer (05 00) denoting how many calls have occured already, and the beginning of the control code arguments (B0 00 F2 ...)