Mail has been fixed; you should now be able to confirm your e-mail address, watch pages, and the like.
Please report any issues on Discord.

Notes:Lufia II: Rise of the Sinistrals

From The Cutting Room Floor
Jump to navigation Jump to search

This page contains notes for the game Lufia II: Rise of the Sinistrals.

EV(ent) Flags

Information

  • 2-7 tell the game that the respective character is in your party.
  • 21-118 are various story triggers.
  • 196 actually works also in the standard game and "Retry" mode, and does indeed allow you to switch all party members at will. Keep in mind that Selan is required at Doom Island; otherwise the game will freeze because no one else has the Light spell.
  • 250-255 seem to be special dungeon events; they're very frequently activated after defeating bosses.
  • The effects of blank entries are unknown as of yet.
  • There is no event flag for 'Retry'-mode exp/gold. it could be that this information is stored in the TP Registers instead.

Table

EV Flag Event that changes it
0
1 Starting a new Game (Probably the party trigger for Maxim)
2 Party trigger: Selan
3 Party trigger: Guy
4 Party trigger: Artea
5 Party trigger: Dekar
6 Party trigger: Tia
7 Partytrigger: Lexis
8 Jelze (Foomy) joined the Party
9 Flash (Shaggy) joined the Party
10 Starting a new Game
11
12 Gusto (Hard hat) joined the Party
13 Zappy (Red Fish) joined the Party
14
15 Sully (Radisher) joined the Party
16 Blaze (Armor Dog) joined the Party
17
18
19
20
21 Finished the tutorial
22 Diner with Tia in Elcid
23 Met Iris the first time in the cave near Elcid
24 Saved Tia in the Lake Cave
25 Killed the fish in the Lake Cave
26 Talked to the king in Alunze Kingdom
27 Picked up the crown
28 Brought the crown back to the King
29 Killed Regal Goblin in the Northwest Cavern of Alunze
30 Guy joined the party
31 Defeated Camu...
32 ...and returned Hilda to Tanbel
33 Talked to Rochy in Clamento
34 (not used?)
35 Killed the spider in the Ruby Cave
36 After receiving the Ruby Apple from Jaffy
37 Brought the Ruby Apple to Rochy and the money to Jaffy
38 First visit to Parcelyte (Seeing Selan protecting the little girl)
39 Short fight in Parcelyte Castle between Selan and one of the soldiers
40 Selan joined the party
41 Killed Pierre (first time, blue clown)
42 Killed Danielle (first time, red clown)
43 Selan talked about the two clones, killing them at the same time
44 Defeated Pierre and Danielle
45 Talked with the King about Gades and the destroyed city Gordovan
46 Passed Gades in Gordovan Tower/met Iris again
47 Talked to the king in Parcelyte
48 Destroyed the crystal nall in the Cave north of Merix
49 The guy repaired the bridge after you destroyed the crystal
50 Talked to the king of Bound Kingdom
51 Saved the prince of the Bound Kingdom
52 Dekar and Guy joined the party in Bound Kingdom, heading for Gades
53 After the earthquake in Sundletan
54 (not used?)
55 After Idura kidnapped Jeros
56 (not used?)
57 Saved Jeros from Idura
58 Talked to Jyad at Phantom Tree Mountain
59 Ported back with Jyad to Aleyn
60 Rested twice at the inn in Aleyn
61 (not used?)
62 On after the women of Narcysus run away
63 On after the women of Narcysus run away, turned off after defeating Idura inside Tower of Sacrifice
64 Idura defeated in Tower of Sacrifice
65 Finished Karlloon Temple (lost Dekar)
66 Talked to Lexis assistance in Treadool
67 Talked to Lexis in his Lab
68 Talked to the shipbuilder in Aleyn
69 Talked to the flower girl in Treadool
70 Received the Pretty Flower
71 Brought the Priphea to Leffa
72 Talked to the king of Dankirk Kingdom
73 They noticed the Ruby Icon is gone
74 Talked to Jaffy about the Ruby Icon
75 Brought the Ruby Icon to Prince Alex
76 Returned the real Ruby Icon
77 Talked to Prince Alex in Auralio to open the water gate
78 Talked to the guy in Ferim Kingdom about the jewel in the Northwest Tower
79 Met Amon the first time
80 Returned to Ferim Kingdom king's room
81 Talked to Iris in Agurio
82 (not used?)
83 Answered yes in Kirmo's Lab
84 Saved Milka from the gargoyles
85 Amon defeated in Divine Shrine
86 Got the Submarine
87 Defeated the ghost in the Shrine of Vengeance
88 Talked to Iris in Barnan
89 Finished Tower of Truth
90 Finished Dragon Mountain
91 (not used?)
92 Talked to the queen of the mermaids
93 Defeated the Doom Ship
94 Talked to the mermaids right in front of the underwater temple
95 Chaed was destroyed
96 Talked with Lexis about the engine
97 Killed the soldiers in the prison
98 Got the engine and warped back to Portravia
99 Got the airship
100 Talked to the old guy in Narvick
101 Talked to the old guy in Narvick (received the first maid) / Turns off after Gades is defeated
102 Gades defeated
103 Talked to the old guy in Narvick
104 Talked to the old guy in Narvick (received the second maid) / Turns off after Amon is defeated
105 Amon defeated
106 Talked to the old guy in Narvick
107 "Talked to the old guy in Narvick (received the third maid) / Turns off after Daos is ""defeated"""
108 Optained the Dual Blade
109 Ported back to Portravia
110 The small conversation in Portravia
111 Talked to Lexis to enter the final fight
112 Gades defeated
113 Amon defeated
114 Erim defeated
115 Daos is defeated
116 First stone destroyed
117 Second stone destroyed
118 (not used?) - Destroying the third stone will start the credits/outro
119 Tutorial event initialized
120 Turned on after Guy left the party in Parcelyte
121 Rested twice at the inn in Aleyn
122
123
124 Talked to the King in Alunze Kingdom, deactivated again after talking to the passed out guy
125 Opened the Shrine for Guys Sister Hilda
126 Talked to Iris in Karlloon Shrine (Iris 'joined' the party)
127 Talked to Lexis in Treadool and received the ship
128 Talked to Iris in Agurio
129
130 Teleporter 2 in Daos Room active? (not sure)
131
132 On after Idura kidnaps Jeros
133 Defeated Gades in Ancient Tower
134 The two thieves opened the door in the prison
135
136 Talked to Rochy in Clamento
137 Small Cutscene inside the the cave in the north of Merix (Where Tia falls down)
138 Cutscene at the entrance to Bound Kingdom, turned off after talking to Dekar or the king (not sure)
139
140 Talked to Jyad at Phantom Tree Mountain
141 Killed the two lions at Phantom Tree Mountain
142 Killed Idura in Kalloon Shrine
143 Received the Pretty Flower
144 Amon defeated in Divine Shrine
145
146 Amon defeated in Divine Shrine
147 Inside Ancient Cave (not sure!)
148 Talked to Prince Alex in Auralio to open the water gate
149 Talked to Prince Alex in Auralio to open the water gate
150 Bad News, the key is gone (Elcid)
151 After the sewer scene in Alunze Castle
152 Talked to Guy's sister Hilda in Tanbel
153 Used the ship from Aleyn to go to Gruberik or Narcysus
154 Talked to Dekar for the first time
155 Bound Kingdom, the guard told you about Gades and the king
156 On after Idura kidnaps Jeros
157 Dekar and Guy joined the party inside the shrine to Alyen
158 Tutorial Event (Entering the cave and talking to the old guy)
159 Tutorial Event (Jelly beaten)
160 Tutorial Event (Move the pillar)
161 Tutorial Event (Jump down)
162 Tutorial Event (Kill them all)
163 Tutorial Event (cut the grass)
164 Alunze Kingdom (talked to the passed out guy)
165
166
167 Visited Picolina again after the Mother of Milka died while killing Amon
168
169 Talked to Abel in Alunze Northwest Cavern
170 Picked up the Crown (Alunze Castle)
171 Tutorial Event (There is an R-Button)
172 Tutorial Event (Undo Magic received)
173
174
175
176
177 Turned on after killing both clowns one time inside the Treasure Sword Shrine
178 Dekar and Guy joined the party in Bound Kingdom, heading for Gades, turned off after killing Gades
179
180
181
182
183 Talked to the boy in Treble when you visit it for the first time
184
185 Talked to the girl in Foomy Woods
186 Activated the power extend platform in Divine Room
187
188
189
190 Finished Karlloon Temple (lost Dekar)
191
192
193 Killed the Egg Dragon for the first time (Turning off will allow you to get more Egg Rings/Egg Swords)
194
195 Ancient Cave boss killed
196 Gift Mode (Party members are standing inside the pub of Gruberik)
197
198
199 Destroyed two statues in Ancient Tower, off again after the wedding etc.
200 Got Iris Treasure 1/10 (Will be turned on after leaving ancient cave)
201 Got Iris Treasure 2/10 (Will be turned on after leaving ancient cave)
202 Ancient Cave Boss killed 3/10 (Will be turned on after leaving ancient cave)
203 Got Iris Treasure 4/10 (Will be turned on after leaving Ancient Cave)
204 Got Iris Treasure 5/10 (Will be turned on after leaving Ancient Cave)
205 Got Iris Treasure 6/10 (Will be turned on after leaving Ancient Cave)
206 Got Iris Treasure 7/10 (Will be turned on after leaving Ancient Cave)
207 Got Iris Treasure 8/10 (Will be turned on after leaving Ancient Cave)
208 Got Iris Treasure 9/10 (Will be turned on after leaving Ancient Cave)
209 Got Iris Treasure 10/10 (Will be turned on after leaving Ancient Cave)
210 Returned Iris Sword
211 Returned Iris Shield
212 Returned Iris Helmet
213 Returned Iris Armor
214 Returned Iris Ring
215 Returned Iris Jewel
216 Returned Iris Staff
217 Returned Iris Pot
218 Returned Iris Tiara
219 Returned Ancient Cave Boss
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240 Turned on after receiving the Undo magic; turns off again after leaving the dungeon
241 Turned on after receiving the Undo magic; turns off again after leaving the dungeon
242
243
244
245
246
247
248
249
250 Changes after several special events to 'on', after leaving the floor/house/dungeon it turns off again
251 Changes after several special events to 'on', after leaving the floor/house/dungeon it turns off again
252 Changes after several special events to 'on', after leaving the floor/house/dungeon it turns off again
253 Changes after several special events to 'on', after leaving the floor/house/dungeon it turns off again
254 Changes after several special events to 'on', after leaving the floor/house/dungeon it turns off again
255 Changes after several special events to 'on', after leaving the floor/house/dungeon it turns off again

EV(ent) Registers

EP Registers When changed
0
1
2
3 Changed register to 2 after activating the hard switch in lake cave, changed back to one after leaving the cave,
4
5
6 Changes the register to 2 after you talked the first time to the girl in Merix
7 Counter for the number of times you rested at an inn
8 Counter for Dragon Eggs returned (with a 'dragon egg code' active the dragon would give always stuff)
9
10 Default value of 5 at game start
11
12 Changes register to 1 after you got the Dragon Egg from the girl in Merix
13
14 Counter for the Iris Treasures you returned
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

Location List / Decompressed Map Names (North American Version)

ID Map Name

00 World Map
01 Map of Seafloor
02 Arek Daos Shrine
03 Elcid
04 Elcid
05 Secret Skills Cave
06 Cave to Sundletan B1
07 Cave to Sundletan B2
08 Sundletan
09 Sundletan
0A Lake Cave B1
0B Lake Cave B2
0C Lake Cave B3
0D Shrine to Alunze Kingdom
0E Foomy Woods
0F Alunze Castle
10 Alunze Castle
11 Alunze Castle B2
12 Alunze Castle B3
13 Alunze Castle B4
14 Alunze Castle B5
15 Alunze Kingdom
16 Alunze Kingdom
17 Alunze North Shrine
18 Alunze Northwest Cave B1
19 Alunze Northwest Cave B2
1A Alunze Northwest Cave B3
1B Alunze Northwest Cave B4
1C Tanbel
1D Tanbel
1E 
1F Tanbel Southeast Tower 1F
20 Tanbel Southeast Tower 2F
21 Tanbel Southeast Tower 3F
22 Tanbel Southeast Tower 4F
23 Tanbel Southeast Tower 5F
24 Tanbel Southeast Tower 6F
25 Clamento
26 Clamento
27 Ruby Cave B1
28 Ruby Cave B2
29 Ruby Cave B3
2A Ruby Cave B4
2B Small Shrine to Parcelyte
2C Parcelyte
2D Parcelyte
2E Parcelyte Castle
2F Parcelyte Castle
30 Treasure Sword Shrine 1F
31 Treasure Sword Shrine 2F
32 Treasure Sword Shrine 3F
33 Treasure Sword Shrine 4F
34 Treasure Sword Shrine B1
35 Small Shrine to Gordovan
36 Gordovan
37 
38 Gordovan West Tower 1F
39 Gordovan West Tower 2F
3A Gordovan West Tower 3F
3B Gordovan West Tower 4F
3C Gordovan West Tower 5F
3D Gordovan West Tower 6F
3E Merix Village
3F Merix Village
40 Cave Bridge B1
41 Cave Bridge B2
42 Cave Bridge B3
43 Cave Bridge B4
44 Cave Bridge B5
45 Bound Kingdom
46 Bound Kingdom
47 North Dungeon B1
48 North Dungeon B2
49 North Dungeon B3
4A North Dungeon B4
4B 
4C Ancient Tower 1F
4D Ancient Tower 2F
4E Ancient Tower 3F
4F Ancient Tower 4F
50 Ancient Tower 5F
51 Ancient Tower 6F
52 Ancient Tower 7F
53 Ancient Tower 6F
54 Ancient Tower 5F
55 Ancient Tower 4F
56 Small Shrine to Aleyn
57 
58 North Lighthouse 1F
59 North Lighthouse 2F
5A North Lighthouse 3F
5B North Lighthouse 4F
5C North Lighthouse 5F
5D North Lighthouse 6F
5E Port Town of Aleyn
5F Port Town of Aleyn
60 Phantom Tree Mountain
61 Phant
62 Phant
63 Phant
64 Phant
65 Phant
66 Phant
67 Phant
68 Gruberik
69 Gruberik
6A Narcysus
6B Narcysus
6C 
6D Tower of Sacrifice 1F
6E Tower of Sacrifice 2F
6F Tower of Sacrifice 3F
70 Tower of Sacrifice 4F
71 Tower of Sacrifice 5F
72 Tower of Sacrifice 6F
73 Karlloon
74 Karlloon
75 Karlloon North Shrine 1F
76 Karlloon North Shrine 2F
77 Karlloon North Shrine 3F
78 Karlloon North Shrine B1
79 Small Shrine to Treadool
7A Treadool
7B Treadool
7C 
7D Lexis Shaia Laboratory
7E Flower Mountain
7F Flower Mountain
80 Flower Mountain
81 Flower Mountain
82 Flower Mountain
83 Flower Mountain
84 Flower Mountain
85 Forfeit Island
86 Forfeit Island
87 Markao
88 Dankirk Kingdom
89 Dankirk Kingdom
8A Auralio Kingdom
8B Auralio Kingdom
8C Dankirk North Cave B1
8D Dankirk North Cave B2
8E Dankirk North Cave B3
8F Dankirk North Cave B4
90 Dankirk North Cave B5
91 Ferim Kingdom
92 Ferim Kingdom
93 
94 Northeast Tower 1F
95 Northeast Tower 2F
96 Northeast Tower 3F
97 Northeast Tower 4F
98 Northeast Tower 5F
99 Small Shrine to Agurio
9A Agurio
9B Treble
9C Treble
9D Pico Forest
9E Pico Forest
9F Small Shrine to Dragon Egg
A0 Portravia
A1 Portravia
A2 Kirmo Laboratory
A3 Mountain of No Return
A4 Mountain of No Return
A5 Mountain of No Return
A6 Eserikto
A7 Eserikto
A8 Divine Shrine 1F
A9 Divine Shrine 2F
AA Divine Shrine 3F
AB Divine Shrine B1
AC Barnan
AD Barnan
AE Barnan Sth. Submarine Cave
AF Shrine of Vengeance 1F
B0 Shrine of Vengeance 2F
B1 Shrine of Vengeance 3F
B2 Shrine of Vengeance 4F
B3 Shrine of Vengeance B1
B4 Shrine of Vengeance B2
B5 Durale
B6 Durale
B7 
B8 Tower of Truth 1F
B9 Tower of Truth 2F
BA Tower of Truth 3F
BB Tower of Truth 4F
BC Tower of Truth 5F
BD Tower of Truth 6F
BE Chaed
BF Chaed
C0 Dragon Mountain
C1 Dragon Mountain
C2 Dragon Mountain
C3 Dragon Mountain
C4 Dragon Mountain
C5 Dragon Mountain
C6 Dragon Mountain
C7 Dragon Mountain
C8 Chaed Nth. Submarine Cave
C9 Submarine Town of Preamarl
CA Submarine Town of Preamarl
CB Submarine Cave to Shrine
CC Submarine Cave to Shrine
CD Submarine Cave Shrine
CE Submarine Cave Shrine
CF 
D0 Chaed
D1 Gratze Sth. Submarine Cave
D2 ò3 y�  Castle B1
D3 ò3 y�  Castle B2
D4 ò3 y�  Castle B3
D5 ò3 y�  Castle B4
D6 ò3 y�  Kingdom
D7 ò3 y�  Kingdom
D8 Narvick
D9  �� ‘�<
DA 
DB 
DC 
DD Shuman Isl. Sealed Tower
DE 
DF 
E0 
E1 Strahda Isl. Sealed Towe
E2 
E3 
E4 
E5 Kamirno Isl. Sealed Towe
E6 
E7 Shrine of Daos 1F
E8 Shrine of Daos 2F
E9 Shrine of Daos 3F
EA Shrine of Daos 4F
EB Shrine of Daos 5F
EC 
ED Capsule Monsters` Shrine
EE 
EF £� U	“e Mo� V	¹T� Cave
F0 Ancient Cave
F1 Ancient Cave Final Floor
F2 
F3 
F4 
F5 
F6 
F7 
F8 
F9 
FA 
FB 
FC 
FD 
FE 
FF 

Notes

Map names are stored in ASCII, and there's two control codes: $00 (end string) and $0A (compression). For compression, the $0A control code is followed by a 16 bit value, where the lower 12 bits is the start address to copy from (+878000) and the upper 4 bits is the number of bytes to copy -2.

Example:

Location 03 Elcid (outside)

          E l c i d
87883B | 456C636964 00
-----
Location 04 Elcid (inside rooms)

878841 | 0A3B38 00
           ^^^^
           Byteswap, result is 383B.
           Add 2 to the first digit.  Result is 5, the number of bytes to copy.
           Next, add the next three digits (83B) to 878000.  Result is 87883B, the start address to copy from.
  • 61-67 - These are supposed to be copies of the name Phantom Tree Mountain for use in the inside caves, but the game doesn't display the map name for them. The $15 / 21 decimal byte length of Phantom Tree Mountain can't be represented by the 4 bits allocated for the number of bytes to copy during decompression, so only $05 bytes are copied instead. The result is just Phant for these entries.
  • D2-D7 - With only 12 bits to represent the decompression start address, the range is limited to 878000-878FFF. But the start address for Gratze is 879028. The game ends up pulling data from 878028 instead. The data there is pointers, resulting in gibberish text.
  • D9 - The inside rooms in Narvick. It has a decompression error for the name Narvick (like Gratze / '3y), but this isn't seen as the map name isn't displayed for this location. Pulls data from 878072 instead of 879072.
  • E1,E5 - off-by-one error for the number of bytes to copy results in " Towe" instead of " Tower".
  • ED - This name contains ` (ASCII 0x60), which isn't in the font graphics.
  • EF - Decompression error, pulls data from 878103 instead of 879103. Correct name is Capsule Monsters Cave, but also has the missing ` issue.

Map Name text handler 80C9C0-80CA13

$80/C9C0 08          PHP
$80/C9C1 8B          PHB
$80/C9C2 E2 20       SEP #$20
$80/C9C4 C2 10       REP #$10
$80/C9C6 A9 7E       LDA #$7E
$80/C9C8 48          PHA
$80/C9C9 AB          PLB
$80/C9CA BF 00 80 87 LDA $878000,x       //read one byte of map name (when starting, x is pointer obtained from (878016 + (location ID * 0x08))
$80/C9CE F0 3D       BEQ $3D    [$CA0D]  //goto $CA0D if control code $00 end string
$80/C9D0 C9 0A       CMP #$0A            //control code $0A compression
$80/C9D2 D0 32       BNE $32    [$CA06]

$80/C9D4 E8          INX
$80/C9D5 BF 00 80 87 LDA $878000,x       //8 bits of start address to copy from (of 12 bits total)
$80/C9D9 85 54       STA $54
$80/C9DB E8          INX
$80/C9DC BF 00 80 87 LDA $878000,x       //4 bits of number of bytes to copy, and remaining 4 bits of start address to copy from
$80/C9E0 85 55       STA $55
$80/C9E2 E8          INX
$80/C9E3 4A          LSR A               //get most significant 4 bits (contains number of bytes to copy)
$80/C9E4 4A          LSR A               //^
$80/C9E5 4A          LSR A               //^
$80/C9E6 4A          LSR A               //^
$80/C9E7 1A          INC A               //add 2 to the number of bytes to copy...
$80/C9E8 1A          INC A               //^
$80/C9E9 85 56       STA $56             //...and store the result to 7E0056
$80/C9EB DA          PHX                 //push current position in reading map name (ie., after the 0Axxxx command) to stack
$80/C9EC C2 20       REP #$20
$80/C9EE A5 54       LDA $54
$80/C9F0 29 FF 0F    AND #$0FFF          //get 12 bit start address
$80/C9F3 AA          TAX                 //move to x reg...
$80/C9F4 E2 20       SEP #$20
$80/C9F6 BF 00 80 87 LDA $878000,x       //...and start reading map name bytes from there
$80/C9FA 99 00 00    STA $0000,y         //store byte of map name to RAM
$80/C9FD C8          INY
$80/C9FE E8          INX
$80/C9FF C6 56       DEC $56             //decrease number of bytes to copy...
$80/CA01 D0 F3       BNE $F3    [$C9F6]  //...and loop until zero
$80/CA03 FA          PLX                 //pull current position in reading map name
$80/CA04 80 C4       BRA $C4    [$C9CA]  //finished control code $0A work

$80/CA06 99 00 00    STA $0000,y         //store byte of map name to RAM
$80/CA09 C8          INY                 //increment number of bytes for final decompressed map name length, ignoring $00 end string (full 16 bit y reg is end address in RAM (+7E0000))
$80/CA0A E8          INX                 //increment current position
$80/CA0B 80 BD       BRA $BD    [$C9CA]  //loop until control code $00 is found

$80/CA0D 7B          TDC                 //clear accumulator (all 16 bits)
$80/CA0E 99 00 00    STA $0000,y         //store the control code $00 byte to RAM
$80/CA11 AB          PLB
$80/CA12 28          PLP
$80/CA13 6B          RTL

Text Control Code $0A

(This section corresponds to the Japanese version Estpolis Denki II)

Text control code $0A for the main dialogue is similar to the map name decompression for the North American version seen in the above section. The $0A byte is followed by a 16-bit value, where the lower 12 bits is how many bytes to jump back, and the upper 4 bits is the number of bytes to copy -2.

  • Example 1:

Estpolis Denki II control code 0A example 1 1.pngEstpolis Denki II control code 0A example 1 2.png

Create 5 character string "0GOLD" on the third line of the second textbox by copying "0GOLD" from the second line of the first textbox.

ROM/SNES addr
                 0 G O L D
03413E/86C13E   203038352D

03415B/86C15B   0A1E30
                  ^^^^
                  Byteswap, result is 301E.
                  Add 2 to the first digit.  Result is 5, the number of bytes to copy.
                  Next, subtract the next three digits (01E) from the address that's 1 byte after the $0A control code byte (86C15C).
                  86C15C - 01E =  86C13E
  • Example 2:

This is a modified example of the above just to show the maximum distance to jump back:

ROM/SNES addr
03415B/86C15B   0AFF3F
                  ^^^^
                  Byteswap, result is 3FFF.
                  Add 2 to the first digit.  Result is 5, the number of bytes to copy.
                  Next, subtract the next three digits (FFF) from the address that's 1 byte after the $0A control code byte (86C15C).
                  86C15C - FFF =  86B15D
  • SNES programming for Example 1
$80/C1C2 B9 00 00    LDA $0000,y[$86:C15B]   A:0000 X:0010 Y:C15B P:envMxdIZc
$80/C1C5 C8          INY                     A:000A X:0010 Y:C15B P:envMxdIzc //control code 0A
$80/C1C6 30 12       BMI $12    [$C1DA]      A:000A X:0010 Y:C15C P:eNvMxdIzc
$80/C1DA 60          RTS                     A:000A X:0010 Y:C15C P:eNvMxdIzc
$80/9E5F C2 20       REP #$20                A:000A X:0010 Y:C15C P:eNvMxdIzc
$80/9E61 0A          ASL A                   A:000A X:0010 Y:C15C P:eNvmxdIzc
$80/9E62 AA          TAX                     A:0014 X:0010 Y:C15C P:envmxdIzc
$80/9E63 E2 20       SEP #$20                A:0014 X:0014 Y:C15C P:envmxdIzc
$80/9E65 7C FB CA    JMP ($CAFB,x)[$80:9FB3] A:0014 X:0014 Y:C15C P:envMxdIzc
$80/9FB3 20 C2 C1    JSR $C1C2  [$80:C1C2]   A:0014 X:0014 Y:C15C P:envMxdIzc

$80/C1C2 B9 00 00    LDA $0000,y[$86:C15C]   A:0014 X:0014 Y:C15C P:envMxdIzc //8 bits of start address to copy from (of 12 bits total)
$80/C1C5 C8          INY                     A:001E X:0014 Y:C15C P:envMxdIzc
$80/C1C6 30 12       BMI $12    [$C1DA]      A:001E X:0014 Y:C15D P:eNvMxdIzc
$80/C1DA 60          RTS                     A:001E X:0014 Y:C15D P:eNvMxdIzc
$80/9FB6 85 54       STA $54    [$00:0054]   A:001E X:0014 Y:C15D P:eNvMxdIzc
$80/9FB8 20 C2 C1    JSR $C1C2  [$80:C1C2]   A:001E X:0014 Y:C15D P:eNvMxdIzc
$80/C1C2 B9 00 00    LDA $0000,y[$86:C15D]   A:001E X:0014 Y:C15D P:eNvMxdIzc //4 bits of number of bytes to copy, and remaining 4 bits of start address to copy from
$80/C1C5 C8          INY                     A:0030 X:0014 Y:C15D P:envMxdIzc
$80/C1C6 30 12       BMI $12    [$C1DA]      A:0030 X:0014 Y:C15E P:eNvMxdIzc
$80/C1DA 60          RTS                     A:0030 X:0014 Y:C15E P:eNvMxdIzc

$80/9FBB 85 55       STA $55    [$00:0055]   A:0030 X:0014 Y:C15E P:eNvMxdIzc
$80/9FBD 4A          LSR A                   A:0030 X:0014 Y:C15E P:eNvMxdIzc //get most significant 4 bits (contains number of bytes to copy)
$80/9FBE 4A          LSR A                   A:0018 X:0014 Y:C15E P:envMxdIzc //^
$80/9FBF 4A          LSR A                   A:000C X:0014 Y:C15E P:envMxdIzc //^
$80/9FC0 4A          LSR A                   A:0006 X:0014 Y:C15E P:envMxdIzc //^
$80/9FC1 18          CLC                     A:0003 X:0014 Y:C15E P:envMxdIzc //^
$80/9FC2 69 02       ADC #$02                A:0003 X:0014 Y:C15E P:envMxdIzc //add 2 to the number of bytes to copy
$80/9FC4 8D 3D 12    STA $123D  [$86:123D]   A:0005 X:0014 Y:C15E P:envMxdIzc //store total number of bytes to copy
$80/9FC7 8C 3A 12    STY $123A  [$86:123A]   A:0005 X:0014 Y:C15E P:envMxdIzc //remember current position in script
$80/9FCA A9 F0       LDA #$F0                A:0005 X:0014 Y:C15E P:envMxdIzc
$80/9FCC 14 55       TRB $55    [$00:0055]   A:00F0 X:0014 Y:C15E P:eNvMxdIzc //clear number of bytes to copy, so now the 16-bit value is just the number of bytes to jump back
$80/9FCE 8B          PHB                     A:00F0 X:0014 Y:C15E P:eNvMxdIzc
$80/9FCF 68          PLA                     A:00F0 X:0014 Y:C15E P:eNvMxdIzc
$80/9FD0 8D 3C 12    STA $123C  [$86:123C]   A:0086 X:0014 Y:C15E P:eNvMxdIzc //bank address (ie, 86xxxx)
$80/9FD3 C2 20       REP #$20                A:0086 X:0014 Y:C15E P:eNvMxdIzc
$80/9FD5 AD 3A 12    LDA $123A  [$86:123A]   A:0086 X:0014 Y:C15E P:eNvmxdIzc
$80/9FD8 38          SEC                     A:C15E X:0014 Y:C15E P:eNvmxdIzc
$80/9FD9 E9 02 00    SBC #$0002              A:C15E X:0014 Y:C15E P:eNvmxdIzC //subtract 2 from current position, result is address just after the 0A control code byte
$80/9FDC E5 54       SBC $54    [$00:0054]   A:C15C X:0014 Y:C15E P:eNvmxdIzC //subtract number of bytes to jump back (01E in this case)
$80/9FDE A8          TAY                     A:C13E X:0014 Y:C15E P:eNvmxdIzC //accumulator holds the start address to copy bytes from
$80/9FDF 30 0F       BMI $0F    [$9FF0]      A:C13E X:0014 Y:C13E P:eNvmxdIzC
$80/9FF0 8C B7 09    STY $09B7  [$86:09B7]   A:C13E X:0014 Y:C13E P:eNvmxdIzC
$80/9FF3 E2 20       SEP #$20                A:C13E X:0014 Y:C13E P:eNvmxdIzC
$80/9FF5 82 42 FE    BRL $FE42  [$9E3A]      A:C13E X:0014 Y:C13E P:eNvMxdIzC

TBL

Table files for extracting Japanese text, mainly for comparison to the prototype. The kanji tables were provided by kWhazit, with some updates made since to fill in missing entries.

Main font

$00-FF

Estpolis Denki II 0D8000 0D97FF font.png

$00-0F are various control codes. $10 is the space character.

  • $02 might be used to auto-close a textbox after it's finished - TODO: find an example.
  • $04 is used to create pauses as the text is being written (eg, 321 countdown as the thieves try to escape the Alunze Castle throne room) For the parameter byte, when bit 0x80 is clear, the remaining bits are used as an index to change the "typewriter" sound effect as text is being printed in message boxes (TODO: verify and add more notes). When bit 0x80 is set, each digit increase represents a delay of around 10 frames. A common delay command seen is 04 83 - 30 frames or a half second. A 1 second delay is created with 04 86. The counter used is a single byte; the maximum possible delay is around 4 seconds, and would be represented with 04 98 or maybe 04 99 (needs more research), though it's unlikely there's any delay that long used in the script.
  • $09 is the hero's name you entered at the start of a new game (default "マキシム" / "Maxim") The name can be up to 5 characters, and is stored at memory address FIXME 7Exxxx-7Exxxx
  • $0A is used for compression in the main dialogue. For item and spell descriptions in menus, it's used as a line break.
ID=Char
$00=(end dialogue) $01=(end textbox) $02= $03=(line break) $04=(delay xx) $05=(kanji 05xx) $06=(kanji 06xx) $07=(kanji 07xx) $08= $09=マキシム $0A= $0B=(wait for decision) $0C=?(line break) $0D=!(line break) $0E=。(line break) $0F=、(line break)
$10=  $11=! $12=? $13=。 $14=、 $15=… $16=〜 $17=!? $18=!! $19=( $1A=) $1B=『 $1C=』 $1D=ー $1E=: $1F=〳
$20=0 $21=1 $22=2 $23=3 $24=4 $25=5 $26=6 $27=7 $28=8 $29=9 $2A=A $2B=B $2C=C $2D=D $2E=E $2F=F
$30=G $31=H $32=I $33=J $34=K $35=L $36=M $37=N $38=O $39=P $3A=Q $3B=R $3C=S $3D=T $3E=U $3F=V
$40=W $41=X $42=Y $43=Z $44=a $45=b $46=c $47=d $48=e $49=f $4A=g $4B=h $4C=i $4D=j $4E=k $4F=l
$50=m $51=n $52=o $53=p $54=q $55=r $56=s $57=t $58=u $59=v $5A=w $5B=x $5C=y $5D=z $5E=あ $5F=い
$60=う $61=え $62=お $63=か $64=き $65=く $66=け $67=こ $68=さ $69=し $6A=す $6B=せ $6C=そ $6D=た $6E=ち $6F=つ
$70=て $71=と $72=な $73=に $74=ぬ $75=ね $76=の $77=は $78=ひ $79=ふ $7A=へ $7B=ほ $7C=ま $7D=み $7E=む $7F=め
$80=も $81=や $82=ゆ $83=よ $84=ら $85=り $86=る $87=れ $88=ろ $89=わ $8A=を $8B=ん $8C=ぁ $8D=ぃ $8E=ぅ $8F=ぇ
$90=ぉ $91=っ $92=ゃ $93=ゅ $94=ょ $95=ア $96=イ $97=ウ $98=エ $99=オ $9A=カ $9B=キ $9C=ク $9D=ケ $9E=コ $9F=サ
$A0=シ $A1=ス $A2=セ $A3=ソ $A4=タ $A5=チ $A6=ツ $A7=テ $A8=ト $A9=ナ $AA=ニ $AB=ヌ $AC=ネ $AD=ノ $AE=ハ $AF=ヒ
$B0=フ $B1=ヘ $B2=ホ $B3=マ $B4=ミ $B5=ム $B6=メ $B7=モ $B8=ヤ $B9=ユ $BA=ヨ $BB=ラ $BC=リ $BD=ル $BE=レ $BF=ロ
$C0=ワ $C1=ヲ $C2=ン $C3=ァ $C4=ィ $C5=ゥ $C6=ェ $C7=ォ $C8=ッ $C9=ャ $CA=ュ $CB=ョ $CC=ヶ $CD=が $CE=ぎ $CF=ぐ
$D0=げ $D1=ご $D2=ざ $D3=じ $D4=ず $D5=ぜ $D6=ぞ $D7=だ $D8=ぢ $D9=づ $DA=で $DB=ど $DC=ば $DD=び $DE=ぶ $DF=べ
$E0=ぼ $E1=ぱ $E2=ぴ $E3=ぷ $E4=ぺ $E5=ぽ $E6=ガ $E7=ギ $E8=グ $E9=ゲ $EA=ゴ $EB=ザ $EC=ジ $ED=ズ $EE=ゼ $EF=ゾ
$F0=ダ $F1=ヂ $F2=ヅ $F3=デ $F4=ド $F5=バ $F6=ビ $F7=ブ $F8=ベ $F9=ボ $FA=パ $FB=ピ $FC=プ $FD=ペ $FE=ポ $FF=ヴ

$0500-05FF

Estpolis Denki II 0D9800 0DAFFF font.png

ID=Char
$0500=峡 $0501=唱 $0502=減 $0503=公 $0504=夏 $0505=職 $0506=笑 $0507=義 $0508=各 $0509=聖 $050A=舞 $050B=敗 $050C=果 $050D=唯 $050E=畑 $050F=刀
$0510=半 $0511=狂 $0512=功 $0513=病 $0514=悔 $0515=震 $0516=恩 $0517=暗 $0518=危 $0519=草 $051A=右 $051B=幅 $051C=宮 $051D=具 $051E=留 $051F=頂
$0520=防 $0521=霊 $0522=栄 $0523=秘 $0524=可 $0525=育 $0526=交 $0527=沌 $0528=輪 $0529=資 $052A=格 $052B=嫁 $052C=紀 $052D=虫 $052E=質 $052F=闘
$0530=頭 $0531=険 $0532=略 $0533=冒 $0534=月 $0535=美 $0536=技 $0537=条 $0538=左 $0539=永 $053A=投 $053B=特 $053C=妻 $053D=商 $053E=常 $053F=巨
$0540=側 $0541=判 $0542=移 $0543=夕 $0544=審 $0545=穴 $0546=乱 $0547=苦 $0548=類 $0549=軽 $054A=指 $054B=血 $054C=版 $054D=号 $054E=嬢 $054F=都
$0550=市 $0551=祈 $0552=然 $0553=重 $0554=約 $0555=邪 $0556=着 $0557=形 $0558=町 $0559=森 $055A=青 $055B=火 $055C=便 $055D=異 $055E=束 $055F=支
$0560=急 $0561=段 $0562=赤 $0563=専 $0564=未 $0565=混 $0566=増 $0567=答 $0568=工 $0569=倍 $056A=追 $056B=湖 $056C=色 $056D=員 $056E=涙 $056F=術
$0570=起 $0571=車 $0572=値 $0573=想 $0574=限 $0575=放 $0576=在 $0577=過 $0578=白 $0579=選 $057A=得 $057B=風 $057C=救 $057D=存 $057E=由 $057F=種
$0580=込 $0581=利 $0582=息 $0583=友 $0584=灯 $0585=化 $0586=玉 $0587=器 $0588=細 $0589=脱 $058A=接 $058B=広 $058C=武 $058D=主 $058E=報 $058F=械
$0590=消 $0591=昼 $0592=声 $0593=面 $0594=浮 $0595=不 $0596=係 $0597=昔 $0598=組 $0599=復 $059A=妹 $059B=族 $059C=点 $059D=音 $059E=程 $059F=愛
$05A0=失 $05A1=民 $05A2=匹 $05A3=台 $05A4=兵 $05A5=呼 $05A6=撃 $05A7=茶 $05A8=足 $05A9=受 $05AA=違 $05AB=艇 $05AC=能 $05AD=索 $05AE=勇 $05AF=覚
$05B0=木 $05B1=査 $05B2=父 $05B3=原 $05B4=幸 $05B5=怖 $05B6=夢 $05B7=令 $05B8=性 $05B9=機 $05BA=葉 $05BB=弱 $05BC=他 $05BD=恋 $05BE=普 $05BF=因
$05C0=夜 $05C1=軍 $05C2=封 $05C3=欲 $05C4=品 $05C5=去 $05C6=飲 $05C7=親 $05C8=活 $05C9=室 $05CA=代 $05CB=別 $05CC=題 $05CD=潜 $05CE=両 $05CF=客
$05D0=遠 $05D1=像 $05D2=付 $05D3=関 $05D4=港 $05D5=訓 $05D6=練 $05D7=遊 $05D8=引 $05D9=情 $05DA=問 $05DB=三 $05DC=幻 $05DD=寝 $05DE=進 $05DF=僕
$05E0=正 $05E1=老 $05E2=供 $05E3=回 $05E4=返 $05E5=料 $05E6=連 $05E7=魚 $05E8=陸 $05E9=門 $05EA=階 $05EB=司 $05EC=初 $05ED=良 $05EE=高 $05EF=図
$05F0=奥 $05F1=店 $05F2=才 $05F3=対 $05F4=数 $05F5=攻 $05F6=鳴 $05F7=件 $05F8=完 $05F9=液 $05FA=廃 $05FB=宿 $05FC=押 $05FD=的 $05FE=負 $05FF=頃

$0600-06FF

Estpolis Denki II 0DB000 0DC7FF font.png

ID=Char
$0600=母 $0601=始 $0602=申 $0603=忘 $0604=成 $0605=役 $0606=酒 $0607=相 $0608=滅 $0609=歩 $060A=殺 $060B=姿 $060C=乗 $060D=眠 $060E=年 $060F=道
$0610=楽 $0611=送 $0612=残 $0613=口 $0614=造 $0615=設 $0616=真 $0617=改 $0618=次 $0619=恐 $061A=光 $061B=願 $061C=休 $061D=向 $061E=続 $061F=絶
$0620=新 $0621=降 $0622=和 $0623=顔 $0624=住 $0625=教 $0626=好 $0627=終 $0628=平 $0629=合 $062A=全 $062B=盗 $062C=発 $062D=家 $062E=橋 $062F=止
$0630=決 $0631=要 $0632=落 $0633=敵 $0634=同 $0635=娘 $0636=礼 $0637=共 $0638=切 $0639=安 $063A=味 $063B=君 $063C=婚 $063D=元 $063E=仲 $063F=食
$0640=外 $0641=印 $0642=確 $0643=集 $0644=底 $0645=悪 $0646=仕 $0647=守 $0648=陛 $0649=彼 $064A=理 $064B=意 $064C=明 $064D=士 $064E=計 $064F=運
$0650=買 $0651=結 $0652=売 $0653=虚 $0654=説 $0655=水 $0656=調 $0657=多 $0658=若 $0659=金 $065A=戻 $065B=以 $065C=取 $065D=泣 $065E=番 $065F=花
$0660=実 $0661=飛 $0662=小 $0663=山 $0664=逃 $0665=立 $0666=配 $0667=探 $0668=緒 $0669=石 $066A=考 $066B=身 $066C=伝 $066D=西 $066E=少 $066F=分
$0670=四 $0671=体 $0672=屋 $0673=部 $0674=破 $0675=開 $0676=泊 $0677=研 $0678=究 $0679=我 $067A=姉 $067B=待 $067C=南 $067D=精 $067E=自 $067F=信
$0680=姫 $0681=壊 $0682=勝 $0683=助 $0684=会 $0685=目 $0686=東 $0687=丈 $0688=夫 $0689=流 $068A=名 $068B=界 $068C=空 $068D=隊 $068E=必 $068F=感
$0690=直 $0691=式 $0692=後 $0693=早 $0694=村 $0695=二 $0696=倒 $0697=死 $0698=世 $0699=用 $069A=通 $069B=城 $069C=変 $069D=場 $069E=冠 $069F=魔
$06A0=兄 $06A1=法 $06A2=近 $06A3=誰 $06A4=先 $06A5=無 $06A6=作 $06A7=生 $06A8=命 $06A9=最 $06AA=持 $06AB=地 $06AC=宝 $06AD=心 $06AE=日 $06AF=波
$06B0=当 $06B1=度 $06B2=中 $06B3=長 $06B4=者 $06B5=力 $06B6=上 $06B7=知 $06B8=天 $06B9=本 $06BA=帰 $06BB=旅 $06BC=方 $06BD=時 $06BE=海 $06BF=聞
$06C0=物 $06C1=入 $06C2=窟 $06C3=塔 $06C4=強 $06C5=洞 $06C6=剣 $06C7=話 $06C8=下 $06C9=所 $06CA=女 $06CB=間 $06CC=思 $06CD=戦 $06CE=北 $06CF=男
$06D0=殿 $06D1=島 $06D2=手 $06D3=子 $06D4=使 $06D5=様 $06D6=船 $06D7=動 $06D8=国 $06D9=街 $06DA=大 $06DB=出 $06DC=何 $06DD=気 $06DE=前 $06DF=今
$06E0=俺 $06E1=来 $06E2=王 $06E3=見 $06E4=一 $06E5=神 $06E6=私 $06E7=言 $06E8=人 $06E9=行 $06EA=事 $06EB=― $06EC=・ $06ED=々 $06EE=解 $06EF=効
$06F0=経 $06F1=験 $06F2=捜 $06F3=任 $06F4=状 $06F5=態 $06F6=困 $06F7=爆 $06F8=裂 $06F9=求 $06FA=静 $06FB=装 $06FC=置 $06FD=速 $06FE=局 $06FF=禁

$0700-0778

Estpolis Denki II 0DC800 0DDFFF font.png

ID=Char
$0700=現 $0701=第 $0702=航 $0703=路 $0704=悲 $0705=走 $0706=毒 $0707=迷 $0708=沼 $0709=影 $070A=響 $070B=治 $070C=与 $070D=冷 $070E=浴 $070F=炎
$0710=服 $0711=布 $0712=皮 $0713=厚 $0714=包 $0715=鉄 $0716=属 $0717=巻 $0718=型 $0719=編 $071A=岩 $071B=胸 $071C=銅 $071D=製 $071E=銀 $071F=固
$0720=晶 $0721=価 $0722=帽 $0723=髪 $0724=耳 $0725=腕 $0726=御 $0727=系 $0728=有 $0729=備 $072A=盾 $072B=円 $072C=刻 $072D=刃 $072E=氷 $072F=雷
$0730=避 $0731=丁 $0732=棒 $0733=短 $0734=斧 $0735=砕 $0736=複 $0737=槍 $0738=球 $0739=弓 $073A=矢 $073B=杖 $073C=霧 $073D=塗 $073E=揮 $073F=福
$0740=鳥 $0741=吹 $0742=雪 $0743=瞬 $0744=至 $0745=低 $0746=吸 $0747=溶 $0748=内 $0749=表 $074A=抗 $074B=角 $074C=登 $074D=幼 $074E=否 $074F=定
$0750=位 $0751=習 $0752=素 $0753=仰 $0754=怒 $0755=電 $0756=竜 $0757=十 $0758=字 $0759=柱 $075A=箱 $075B=加 $075C=敬 $075D=語 $075E=脅 $075F=迫
$0760=個 $0761=予 $0762=呪 $0763=軌 $0764=授 $0765=非 $0766=古 $0767=. $0768=奇 $0769=跡 $076A=衣 $076B=黒 $076C=殊 $076D=闇 $076E=昇 $076F=量
$0770=根 $0771=朝 $0772=枚 $0773=賭 $0774=況 $0775=虹 $0776=打 $0777=閉 $0778=板