Difference between revisions of "Message Format"

From Terranigma Wiki
Jump to navigation Jump to search
(Commands: 0x1A, 0x1C)
m (Added commands and values of commands)
 
Line 14: Line 14:
! Function
! Function
|-
|-
| 0x00
| 0x00 (0xC0)
| 1
| 1
| Resets the text frame
| Resets the text frame
|-
|-
| 0x02
| 0x02 (0xC1)
| 1
| 1
| Automatically resizes the text frame
| Automatically resizes the text frame
|-
|-
| 0x04
| 0x04 (0xC2)
| 6
| 6
| Text frame settings
| Text frame settings
Line 46: Line 46:
|}
|}
|-
|-
| 0x08
| 0x08 (0xC4)
| 2
| 1
|  
| Enable/Disable text frame
{| class="wikitable"
|-
|-
! Offset
| 0x0A (0xC5)
! Name
| 1
| Wait frames
|-
|-
| 0
| 0x0C (0xC6)
| Enable/Disable text frame
| 1
|}
| Change color: 0:white, 4:yellow
|-
|-
| 0x0E
| 0x0E (0xC7)
| 2
| 2
| Control text type sound
| Control text type sound
Line 70: Line 70:
|}
|}
|-
|-
| 0x10
| 0x10 (0xC8)
| 1
| Type speed setting
|-
| 0x12 (0xC9)
| 1
| Fill with spaces
|-
| 0x14 (0xCA)
| 3
| ?
|-
| 0x16 (0xCB)
| 2
| 2
| Control text type speed
| ?
{| class="wikitable"
|-
|-
! Offset
| 0x18 (0xCC)
! Name
| 3
| Call text
|-
|-
| 0
| 0x1A (0xCD)
| Type speed setting
| 2
|}
| displays a value from RAM
|-
|-
| 0x1A
| 0x1C (0xCE)
| 2
| 2
| displays a value from RAM
| displays an indexed value from RAM
|-
|-
| 0x1E
| 0x1E (0xCF)
| 1
| 1
| New line
| New line
|-
|-
| 0x1A
| 0x26(0xD3),0x28(0xD4),0x2E(0xD7)
| 3
| 1
| Number from RAM
| Message end
|-
|-
| 0x1C
| 0x2A (0xD5)
| 5
| 1
| String indexed from RAM
| waits
|-
|-
| 0x2A
| 0x34 (0xDA)
| 1
| 1
| waits
| clear box
|-
|-
| 0x26,0x28,0x2E
| 0x38 (0xDC)
| 1
| 1
| Message end
| default(or end change color) color
|-
| 0x4A (0xE5)
| 2
| [[WordInsertion|Word placeholder]], inserts a word from the table at [[0x120000]]
|-
|-
| 0x4A
| 0x4B (0xE6)
| 2
| 2
| [[WordInsertion|Word placeholder]], inserts a word from the table at [[0x120000]]
| [[WordInsertion|Word placeholder]], inserts a word from the table at [[0x120000]]

Latest revision as of 11:12, 24 May 2022

Messages are parsed bytewise, if the 8th bit is set it is a special command.


Commands

A byte is converted to the command opcode like this

( Byte << 1 ) & 0x7F
Opcode Length (byte) Function
0x00 (0xC0) 1 Resets the text frame
0x02 (0xC1) 1 Automatically resizes the text frame
0x04 (0xC2) 6 Text frame settings
Offset Name
0 Position X
1 Position Y
2 Offset in VRAM to GFX?
3 Sprite offset in VRAM?
4 Draws on the BG when changed?
0x08 (0xC4) 1 Enable/Disable text frame
0x0A (0xC5) 1 Wait frames
0x0C (0xC6) 1 Change color: 0:white, 4:yellow
0x0E (0xC7) 2 Control text type sound
Offset Name
0 0xFF Disable, anything else Enable
0x10 (0xC8) 1 Type speed setting
0x12 (0xC9) 1 Fill with spaces
0x14 (0xCA) 3 ?
0x16 (0xCB) 2 ?
0x18 (0xCC) 3 Call text
0x1A (0xCD) 2 displays a value from RAM
0x1C (0xCE) 2 displays an indexed value from RAM
0x1E (0xCF) 1 New line
0x26(0xD3),0x28(0xD4),0x2E(0xD7) 1 Message end
0x2A (0xD5) 1 waits
0x34 (0xDA) 1 clear box
0x38 (0xDC) 1 default(or end change color) color
0x4A (0xE5) 2 Word placeholder, inserts a word from the table at 0x120000
0x4B (0xE6) 2 Word placeholder, inserts a word from the table at 0x120000

Non-Command Bytes

Value Char
0x20 (space)
0x3B ü
0x3C ä
0x3D Ä
0x3E ö
0x3F Ö
0x5B Ü
0x5D ¿
0x5E ¡
0x5F ß
0x60 ?
0x61 (
0x62 )
0x6D !
0x6E ,
0x6F :
0x76 \
0x77 =
0x7B +
0x7C -
0x7E &
0x7F .

The other values are converted by adding 0x20 to them.