The Legend of Zelda/Tutorials: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(→‎Special Characters: Added info on message-ending characters.)
(→‎Interpretation: Updated info on line-ending values.)
Line 36: Line 36:


===Interpretation===
===Interpretation===
The way the game interprets text is strange. There is a range of hex values for normal characters (00 to 2F), and there is a second range of hex values for the last letter of a multi-line message (80 to AF). This means that if you write a message that is two lines long, the last letter of the first line has to be written using the second set of letters so the game doesn't keep typing stuff offscreen.
The game uses bitwise logic to interpret text bytes. The six least significant (rightmost; d5-d0) bits code for the letter/character tile to be utilized. This allows for a range of 64 characters, from $00-3F. The two most significant (leftmost; d7-d6) bits are used to tell the game to end that current line-write, and how to proceed from there:<br />


If you programmed your table file to have capital letters be mapped to the first range and lowercase letters be mapped to the second range, the code from the RO< would read like this:
00 = Keep writing on same line.<br />
01 = Next character starts 3rd line.<br />
10 = Next character starts 2nd line.<br />
11 = Message end.<br />
<br />
This creates four blocks of hex values: normal characters [00 to 3F], second line enders [40-7F], first line enders [80-BF] and overall message enders [C0-FF]. This means that if you write a message that is two lines long, the last letter of the first line has to be written using the [80-BF] set of letters so the game doesn't keep typing stuff offscreen. (You can make the second line of text appear where the third line would normally be by using a value from the [40-7F] set to end the first line.)<br />
 
$2C = 00101100 = Normal period.<br />
$6C = 01101100 = Second line-ending period.<br />
$AC = 10101100 = First line-ending period.<br />
$EC = 11101100 = Message-ending period.<br />
 
 
If you programmed your table file to have capital letters be mapped to the first range and lowercase letters be mapped to the third range, the code from the RO< would read like this:
     (ROM Offset 418B)
     (ROM Offset 418B)
     <BLANK><BLANK>BUY MEDICINE BEFORe<BLANK><BLANK>YOU GO.
     <BLANK><BLANK>BUY MEDICINE BEFORe<BLANK><BLANK>YOU GO.
Following this logic, there is probably a third set of hex values for three-line messages.

Revision as of 03:12, 6 May 2013

Editing the Storyboard

Original Text

    MANY  YEARS  AGO  PRINCE
    DARKNESS   GANNON  STOLE
    ONE OF THE TRIFORCE WITH
    POWER.    PRINCESS ZELDA
    HAD  ONE OF THE TRIFORCE
    WITH WISDOM. SHE DIVIDED
    IT INTO  8 UNITS TO HIDE
    IT FROM   GANNON  BEFORE
    SHE WAS CAPTURED.       
      GO FIND THE  8 UNITS  
        LINK  TO SAVE HER.  

Interpretation

Each value generates four different colors and splits them among eight different letters. For example, the value B6 would result in this:

    <Red><Red> <Blu><Blu>
    <Grn><Grn> <Red><Red>

If this hex value was applied to the first two lines of the original prologue above, it would apply color in this way.

    MANY  YEARS  AGO  PRINCE
    DARKNESS   GANNON  STOLE


Color Code Chart

Copyright 2006, Dr. Floppy

Editing in-game text

Special Characters

The hex value 25 is a <BLANK> letter - if you start a message with a bunch of them, you won't hear the game typing out spaces, but you can still use them to center your message.

The hex value EC is interpreted as a period and tells the game to stop interpretation.

Interpretation

The game uses bitwise logic to interpret text bytes. The six least significant (rightmost; d5-d0) bits code for the letter/character tile to be utilized. This allows for a range of 64 characters, from $00-3F. The two most significant (leftmost; d7-d6) bits are used to tell the game to end that current line-write, and how to proceed from there:

00 = Keep writing on same line.
01 = Next character starts 3rd line.
10 = Next character starts 2nd line.
11 = Message end.

This creates four blocks of hex values: normal characters [00 to 3F], second line enders [40-7F], first line enders [80-BF] and overall message enders [C0-FF]. This means that if you write a message that is two lines long, the last letter of the first line has to be written using the [80-BF] set of letters so the game doesn't keep typing stuff offscreen. (You can make the second line of text appear where the third line would normally be by using a value from the [40-7F] set to end the first line.)

$2C = 00101100 = Normal period.
$6C = 01101100 = Second line-ending period.
$AC = 10101100 = First line-ending period.
$EC = 11101100 = Message-ending period.


If you programmed your table file to have capital letters be mapped to the first range and lowercase letters be mapped to the third range, the code from the RO< would read like this:

    (ROM Offset 418B)
    <BLANK><BLANK>BUY MEDICINE BEFORe<BLANK><BLANK>YOU GO.