forked from synalysis/Grammars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPMDRedRomMap.grammar
299 lines (299 loc) · 21.5 KB
/
PMDRedRomMap.grammar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.0.4.25">
<grammar name="PMD Red" start="Pokémon Mystery Dungeon - Red Rescue Team" author="Kelvin Chung" fileextension="gba">
<description>Grammar for Pokémon Mystery Dungeon</description>
<structure name="Pokémon Mystery Dungeon - Red Rescue Team" id="328" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="US ROM Header" id="330" structure="id:329"/>
<structure name="<new structure>" id="331" length="992974"/>
<structref name="Starter Pokémon Data" id="334" structure="id:333"/>
<structure name="<new structure-0.0.0.1>" id="335" length="6818"/>
<structref name="Partner Pokémon Data" id="338" structure="id:337"/>
<structure name="<new structure-0.0.1>" id="339" length="3540"/>
<structref name="Attack Stages" id="342" structure="id:341"/>
<structref name="Defense Stages" id="343" structure="id:341"/>
<structref name="Accuracy Stages" id="344" structure="id:341"/>
<structref name="Evasion Stages" id="345" structure="id:341"/>
<structure name="<new structure-0.1.1>" id="346" length="89008"/>
<structref name="Type Names" id="349" structure="id:348"/>
<binary name="Type Name String Pool" id="350" length="144"/>
<structref name="Formatted Type Names" id="352" structure="id:351"/>
<binary name="Formatted Type Name String Pool" mustmatch="yes" id="353" length="228"/>
<structure name="<new structure-0.1.2>" id="354" length="1400"/>
<structref name="Ability Names" id="357" structure="id:356"/>
<binary name="Ability Name String Pool" id="358" length="908"/>
<structref name="Ability Descriptions" id="360" structure="id:359"/>
<binary name="Ability Description String Pool" id="361" length="4432"/>
<structref name="Range Types" id="363" structure="id:362"/>
<binary name="Range Type String Pool" id="364" length="544"/>
<structure name="<new structure-0.2>" id="365" length="44"/>
<structref name="Status Names" id="368" structure="id:367"/>
<binary name="Status Name String Pool" id="369" length="1448"/>
<structref name="Formatted Status Names" id="371" structure="id:370"/>
<binary name="Formatted Status String Pool" id="372" length="1476"/>
<structure name="<new structure-0.2.1>" id="373" length="804"/>
<structref name="Status Descriptions" id="376" structure="id:375"/>
<binary name="Status Description String Pool" id="377" length="13988"/>
<structref name="Dungeon Names" id="379" structure="id:378"/>
<binary name="Dungeon Name String Pool" id="380" length="1276"/>
<structref name="IQ Skill Names" id="382" structure="id:381"/>
<binary name="IQ Skill Name String Pool" id="383" length="376"/>
<structref name="IQ Skill Descriptions" id="385" structure="id:384"/>
<binary name="IQ Skill Description String Pool" id="386" length="1960"/>
<structref name="Tactic Names" id="388" structure="id:387"/>
<binary name="Tactic Name String Pool" id="389" length="184"/>
<structref name="Tactic Descriptions" id="391" structure="id:390"/>
<binary name="Tactic Description String Pool" id="392" length="852"/>
<structure name="<new structure-0.3>" id="393" length="2384"/>
<structref name="Friend Area Names" id="396" structure="id:395"/>
<binary name="Friend Area Name String Pool" id="397" length="888"/>
<structref name="Friend Area Descriptions" id="399" structure="id:398"/>
<binary name="Friend Area Description String Pool" id="400" length="6144"/>
<structure name="<new structure-1>" id="401" length="2035288">
<structure name="<new structure>-1" id="402" length="1430564"/>
<binary name="<unused>" id="404" strokecolor="919191" fillcolor="919191" length="578756"/>
<structure name="<new structure>" id="405" length="1304"/>
<structref name="Directory Data" id="408" repeatmin="431" repeatmax="431" structure="id:407"/>
<binary name="<directory data string pool>" id="409" length="3468"/>
</structure>
<structref name="Item Data SIRO Section" id="412" structure="id:411"/>
<structure name="<new structure-2>" id="413" length="296220"/>
<structref name="Pokémon Data SIRO Section" id="416" structure="id:415"/>
<structref name="Move Data SIRO Section" id="418" structure="id:417"/>
<binary name="<unused>" id="419" strokecolor="919191" fillcolor="919191" length="52416"/>
<structure name="<new structure-3>" id="420" length="142964"/>
<binary name="<unused>-1" id="422" strokecolor="919191" fillcolor="919191" length="53644"/>
<structure name="<new structure-4>" id="423" length="24"/>
<structure name="<new structure-4.1>" id="425">
<structref name="Directory Data" id="426" repeatmin="455" repeatmax="455" structure="id:407"/>
<binary name="<directory name string pool>" id="427" length="3700"/>
</structure>
<structure name="<new structure-5>" id="429" length="1153940"/>
<structure name="<new structure-6>" id="431" length="219560"/>
<binary name="<unused>-2" id="433" strokecolor="919191" fillcolor="919191" length="60928"/>
<structure name="<new structure-7>" id="434" length="24"/>
<structure name="<new structure-8>" id="436">
<structref name="Directory Data" id="437" repeatmin="497" repeatmax="497" structure="id:407"/>
<binary name="<directory data string pool>" id="438" length="3976"/>
</structure>
<structure name="<new structure-9>" id="440" length="18527492"/>
</structure>
<structure name="ROM Header" id="443" length="192" encoding="ISO_8859-1:1987" endian="little" signed="no">
<binary name="ARM B Jump Instruction" id="444" length="4"/>
<binary name="Nintendo Logo Data" id="445" length="156"/>
<string name="Game Title" mustmatch="yes" id="446" type="fixed-length" length="12">
<fixedvalue value="POKE DUNGEON"/>
</string>
<string name="Game Code" id="447" type="fixed-length" length="4"/>
<binary name="Maker Code" id="448" length="2"/>
<binary name="<fixed value>" mustmatch="yes" id="449" length="1">
<fixedvalue value="96" />
</binary>
<binary name="Main Unit Code" id="450" length="1"/>
<binary name="Device Type" id="451" length="1"/>
<binary name="<reserved>" id="452" length="7"/>
<number name="Mask ROM Version" id="453" type="integer" length="1"/>
<number name="Complement Check" id="454" type="integer" length="1"/>
<binary name="<reserved-2>" id="455" length="2"/>
</structure>
<structure name="US ROM Header" id="329" extends="id:443">
<string name="Game Code" mustmatch="yes" id="460" type="fixed-length" length="4">
<fixedvalue value="B24E"/>
</string>
</structure>
<structure name="Euro ROM Header" id="470" extends="id:443">
<string name="Game Code" mustmatch="yes" id="474" type="fixed-length" length="4">
<fixedvalue value="B24P"/>
</string>
</structure>
<structure name="Starter Pokémon Data" id="333" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Starter Pokémon Data Entry" id="485" repeatmin="13" repeatmax="13" structure="id:484"/>
</structure>
<structure name="Starter Pokémon Data Entry" id="484" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Male Starter" id="487" type="integer" length="2"/>
<number name="Female Starter" id="488" type="integer" length="2"/>
</structure>
<structure name="Partner Pokémon Data" id="337" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Partner Pokémon" id="490" repeatmin="10" repeatmax="10" type="integer" length="2"/>
</structure>
<structure name="Stat Stage Table" id="341" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="<new number>" id="492" repeatmin="21" repeatmax="21" type="integer" length="4"/>
</structure>
<structure name="Type Names" id="348" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="495" repeatmin="18" repeatmax="18" structure="id:494"/>
</structure>
<structure name="Formatted Type Names" id="351" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Formatted Name" id="497" repeatmin="18" repeatmax="18" structure="id:494"/>
</structure>
<structure name="Ability Names" id="356" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="499" repeatmin="77" repeatmax="77" structure="id:494"/>
</structure>
<structure name="Ability Descriptions" id="359" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Description" id="501" repeatmin="77" repeatmax="77" structure="id:494"/>
</structure>
<structure name="Range Types" id="362" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Range Type" id="503" repeatmin="49" repeatmax="49" structure="id:494"/>
</structure>
<structure name="Status Names" id="367" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="505" repeatmin="89" repeatmax="89" structure="id:494"/>
</structure>
<structure name="Formatted Status Names" id="370" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="507" repeatmin="89" repeatmax="89" structure="id:494"/>
</structure>
<structure name="Status Descriptions" id="375" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Status Description Entry" id="510" repeatmin="99" repeatmax="99" structure="id:509"/>
</structure>
<structure name="Status Description Entry" id="509" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="512" structure="id:494"/>
<structref name="Description" id="513" structure="id:494"/>
</structure>
<structure name="Dungeon Names" id="378" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="515" repeatmin="196" repeatmax="196" structure="id:494"/>
</structure>
<structure name="IQ Skill Names" id="381" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="517" repeatmin="24" repeatmax="24" structure="id:494"/>
</structure>
<structure name="IQ Skill Descriptions" id="384" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Description" id="519" repeatmin="24" repeatmax="24" structure="id:494"/>
</structure>
<structure name="Tactic Names" id="387" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="521" repeatmin="12" repeatmax="12" structure="id:494"/>
</structure>
<structure name="Tactic Descriptions" id="390" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Description" id="523" repeatmin="12" repeatmax="12" structure="id:494"/>
</structure>
<structure name="Friend Area Names" id="395" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="525" repeatmin="58" repeatmax="58" structure="id:494"/>
</structure>
<structure name="Friend Area Descriptions" id="398" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Description" id="527" repeatmin="58" repeatmax="58" structure="id:494"/>
</structure>
<structure name="Item Data SIRO Section" id="411" extends="id:529" endian="little">
<string name="<header>" id="530" type="fixed-length" length="4">
<fixedvalue value="SIRO"/>
</string>
<offset name="Data Pointer" id="532" fillcolor="FF80FB" length="4" references="id:531" additional="-134217728" follownullreference="yes"/>
<binary name="<new binary>" id="533" length="8"/>
<binary name="Item Description String Pool" id="534" length="26280"/>
<structref name="Item Data" id="535" structure="id:531"/>
<binary name="Item Name String Pool" id="536" length="3140"/>
</structure>
<structure name="Item Data" id="531" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Item Data Entry" id="539" repeatmin="240" repeatmax="240" structure="id:538"/>
</structure>
<structure name="Item Data Entry" id="538" length="32" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="541" structure="id:494"/>
<structure name="<new structure>" id="542" length="12"/>
<structref name="Description" id="544" structure="id:494"/>
</structure>
<structure name="Pokémon Data SIRO Section" id="415" extends="id:529">
<string name="<header>" id="546" type="fixed-length" length="4">
<fixedvalue value="SIRO"/>
</string>
<offset name="Data Pointer" id="548" length="4" references="id:547" additional="-134217728" follownullreference="yes"/>
<binary name="<new binary>" id="549" length="8"/>
<structref name="Pokémon Data" id="550" structure="id:547"/>
<binary name="Pokémon Data String Pool" id="551" length="6428"/>
</structure>
<structure name="Pokémon Data" id="547" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Pokémon Data Entry" id="554" repeatmin="424" repeatmax="424" structure="id:553"/>
</structure>
<structure name="Pokémon Data Entry" id="553" length="72" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="556" structure="id:494"/>
<structref name="Species" id="557" structure="id:494"/>
<structure name="<new structure>" id="558" length="1">
<binary name="<new binary>" id="559"/>
</structure>
<number name="Body Size" id="561" type="integer" length="1"/>
<structure name="<new structure-1>" id="562" length="9">
<binary name="<new binary>" id="563"/>
</structure>
<number name="Type" id="565" repeatmin="2" repeatmax="2" type="integer" length="1"/>
<number name="Mobility Type" mustmatch="yes" id="566" type="integer" length="1">
<fixedvalue name="Normal" value="0"/>
<fixedvalue name="Magma" value="4"/>
<fixedvalue name="Water" value="5"/>
<fixedvalue name="Floating" value="2"/>
<fixedvalue name="Ghost" value="3"/>
</number>
<number name="Friend Area" id="567" type="integer" length="1"/>
<number name="Ability" id="568" repeatmin="2" repeatmax="2" type="integer" length="1"/>
<structure name="<new structure-3>" id="569" length="5">
<binary name="<new binary>" id="570"/>
</structure>
<number name="Base HP" id="572" type="integer" length="2"/>
<number name="Base Experience" id="573" type="integer" length="2"/>
<structure name="<new structure-4>" id="574" length="2">
<binary name="<new binary>" id="575"/>
</structure>
<number name="Base Attack" id="577" type="integer" length="2"/>
<number name="Base Sp. Attack" id="578" type="integer" length="2"/>
<number name="Base Defense" id="579" type="integer" length="2"/>
<number name="Base Sp. Defense" id="580" type="integer" length="2"/>
<number name="Low Kick Tier" id="581" type="integer" length="2"/>
<number name="Sizebust Orb" id="582" type="integer" length="1"/>
<structure name="<new structure-5>" id="583" length="17">
<binary name="<new binary>" id="584"/>
</structure>
<number name="Recruit Rate" id="586" type="integer" length="2" signed="yes"/>
</structure>
<structure name="Move Data SIRO Section" id="417" extends="id:529">
<string name="<header>" id="588" type="fixed-length" length="4">
<fixedvalue value="SIRO"/>
</string>
<offset name="Data Pointer" id="590" fillcolor="FF80FB" length="4" references="id:589" additional="-134217728" follownullreference="yes"/>
<binary name="<new binary-1>" id="591" length="10"/>
<binary name="Moves Learned Data Pool" id="592" length="28054"/>
<binary name="<new binary-2>" id="593" length="4"/>
<structref name="Move Data" id="595" structure="id:594"/>
<binary name="Move Data String Pool" id="596" length="29252"/>
<structref name="Moves Learned Data" id="598" structure="id:597"/>
<structref name="Move Data SIRO Section Data" id="599" structure="id:589"/>
</structure>
<structure name="Move Data SIRO Section Data" id="589" encoding="ISO_8859-1:1987" endian="little" signed="no">
<offset name="Move Data" id="601" fillcolor="FF80FB" length="4" references="id:594" additional="-134217728" follownullreference="yes"/>
<offset name="Moves Learned Data" id="602" fillcolor="FF80FB" length="4" references="id:597" additional="-134217728" follownullreference="yes"/>
</structure>
<structure name="Move Data" id="594" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Move Data Entry" id="605" repeatmin="413" repeatmax="413" structure="id:604"/>
</structure>
<structure name="Move Data Entry" id="604" length="36" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="607" structure="id:494"/>
<number name="Base Power" id="608" type="integer" length="2"/>
<number name="Type" id="609" type="integer" length="2"/>
<structure name="<new structure>" id="610" length="20">
<structure name="<new structure>" id="611" length="4"/>
<number name="PP" id="613" type="integer" length="1"/>
<number name="<new number>" id="614" type="integer" length="1"/>
<number name="<new number-1>" id="615" type="integer" length="1"/>
<number name="Accuracy" id="616" type="integer" length="1"/>
<structure name="<new structure-1>" id="617" length="3"/>
<number name="Critical" id="619" type="integer" length="1"/>
</structure>
<structref name="Description" id="621" structure="id:494"/>
<structref name="Usage String" id="622" structure="id:494"/>
</structure>
<structure name="Moves Learned Data" id="597" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Moves Learned Data Entry" id="625" repeatmin="424" repeatmax="424" structure="id:624"/>
</structure>
<structure name="Moves Learned Data Entry" id="624" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Level-Up Pointer" id="627" fillcolor="FF86D5" type="integer" length="4" display="hex"/>
<number name="TMs/HMs Pointer" id="628" fillcolor="FF86D5" type="integer" length="4" display="hex"/>
</structure>
<structure name="Null String" id="630" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="String" id="631" strokecolor="FDD480" fillcolor="FCFD84" type="zero-terminated"/>
</structure>
<structure name="Null String Pointer" id="494" encoding="ISO_8859-1:1987" endian="little" signed="no">
<offset name="Null String" id="633" fillcolor="FF80FB" length="4" references="id:630" additional="-134217728" follownullreference="yes"/>
</structure>
<structure name="Directory Data" id="407" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Name" id="635" structure="id:494"/>
<offset name="SIRO Section" id="636" fillcolor="FF80FB" length="4" references="id:529" additional="-134217728" follownullreference="yes"/>
</structure>
<structure name="SIRO Section" id="529" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="<header>" mustmatch="yes" id="638" strokecolor="FCFD84" fillcolor="919191" type="fixed-length" length="4">
<fixedvalue value="SIRO"/>
</string>
<number name="Data Pointer" id="639" fillcolor="FF86D5" type="integer" length="4" display="hex"/>
</structure>
</grammar>
</ufwb>