Editing Wikifang:Telefang 1 Translation Patch/RAM map

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 179: Line 179:
|-
|-
|colspan=6|This is a boolean value historically (in terms of the patch) used to track the main script state and enable some hacks which made newlines work properly. Most of the reason for this value's existence has been moved away since the main script was later hacked to properly manage it's own tiles in the face of a VWF.
|colspan=6|This is a boolean value historically (in terms of the patch) used to track the main script state and enable some hacks which made newlines work properly. Most of the reason for this value's existence has been moved away since the main script was later hacked to properly manage it's own tiles in the face of a VWF.
|-
| C91E
| 1
| MainScript_UIElementsTileBase
| Tile graphics management
| F0
| No
|-
|colspan=6|Indicates the base location of certain UI graphics used for the main script window, in terms of tile IDs. This is mainly limited to selection arrows and "waiting for input" animations.
|-
| C91F
| 1
| MainScript_TileBaseIdx
| Tile graphics management
| A0
| No
|-
|colspan=6|Indicates the base location of the 2x16 tile main script area, in terms of tile IDs. This is where the main script window text gets drawn to.
|-
| C959
| 1
| MainScript_SecondAnswerTile
| Script window management
|
| No?
|-
|colspan=6|This is part of a rather massive hack used to render answer selection arrows. When main script needs to ask a question to the user (Say, "would you like to hear what I said again" or something), it needs to draw an arrow. This is handled by altering the tilemap to show a particular animated graphic of an arrow. The second question has to be on the same line as the first, and we allow it to have it's own position in the text line. So, in order to know where to draw the arrow if the second answer is selected, we have a special full-width space which does two things:
* Reserve one aligned tile of space for the arrow
* Write the current tile position to this memory location
|-
| C987
| 1
| VWF_LinesLeft
| Tile graphics management
| 0-$10
| No
|-
|colspan=6|Used to count how many lines left in a tile-copy operation.
|-
| C9C5
| 1
| MainScript_FramesCount
| Animation
|
| No
|-
|colspan=6|The number of times (frames) that the Main Script interpreter has been called, modulo 256.
|-
| C9C6
| 2
| MainScript_TextPtr
| Text retrieval
| $4000-$7FFF, $C000-$DFFF
| No
|-
| C9C8
| 1
| MainScript_TextPtrBank
| Text retrieval
| See text map
| No
|-
|colspan=6|This is a far pointer (spans multiple banks) that indicates the current location of the main script interpreter relative to the script in ROM or (sometimes) Work RAM.
|-
| C9C9
| 1
| MainScript_State
| Interpreter functions management
| 0-8, $A
| No
|-
|colspan=6|The Main Script routine is organized like a state machine, but is independent of the master gameloop state machine, since it can be run either continuously (loop until newline) or per-frame. The state can be changed by the current script with the opcode E1. The operand controls the state.
Notable states include:
State 1: The normal control code interpreter. Most script is executed here.
State A: User question management. This state is invoked in order to allow questions to be answered, and it handles 100% of all the UI during that period.
|-
| C9CA
| 1
| MainScript_WindowLocation
| I don't remember what this does.
|
| No
|-
| C9CB
| 1
| MainScript_TilesDrawn
| Text rendering
| 0-$20
| No
|-
|colspan=6|Records how many tiles have been drawn so far. The sub-tile Y location is stored in VWF_LetterShift.
|-
| C9CC
| 1
| MainScript_WaitFrames
| Text speed
|
| No
|-
| C9CD
| 1
| MainScript_TextSpeed
| Text speed
| 0, some others
| No
|-
|colspan=6|Controls how many frames are waited in between character draws. This controls the speed of the text. WaitFrames is how many frames left we have to wait before it's time to draw another letter. Opcodes are always processed even if it's not yet time to draw anything. When WaitFrames is 0, a letter is drawn and it's refilled with the value from TextSpeed.
0 frame wait is a special value: It causes the main script routine to operate in continuous mode, where it keeps drawing text continuously until it reaches a point in which user input is needed. This is notably abused by the SMS routine to hijack the main script routine to draw text into a non 2x16 sized window.
TextSpeed can be controlled with opcode E3. The operand is saved into TextSpeed.
|}
|}
Please note that all contributions to Wikifang are considered to be released under the Attribution-NonCommercial-ShareAlike 3.0 Unported (see Wikifang:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)