-
Notifications
You must be signed in to change notification settings - Fork 14
/
PokemonROMData.grammar
2229 lines (2172 loc) · 151 KB
/
PokemonROMData.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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.8">
<grammar name="Pokémon ROM File" start="id:21" author="Kelvin Chung" fileextension="GBA">
<description>Grammar for GBA files</description>
<scripts>
<script name="String Pool String" type="DataType" id="2161">
<description>Strings used in the string pool datatype. Like regular C strings, except the charset is different.</description>
<source language="Python"># String Pool String
# Strings in Pokémon G3 are represented by a custom charset. Characters are always one byte, with
# 0xFF acting as the null bit.
lookupTable = {
0 : " ",
0x1B: "é",
0x2D: "&", 0x2E: "+",
0x35: "=", 0x36: ";",
0x5B: "%", 0x5C: "(", 0x5D: ")",
0x85: "<", 0x86: ">",
0xA1: "0", 0xA2: "1", 0xA3: "2", 0xA4: "3", 0xA5: "4", 0xA6: "5", 0xA7: "6",
0xA8: "7", 0xA9: "8", 0xAA: "9", 0xAB: "!", 0xAC: "?", 0xAD: ".", 0xAE: "-",
0xB5: "♂", 0xB6: "♀",
0xB8: ",", 0xB9: "*", 0xBA: "/", 0xBB: "A", 0xBC: "B", 0xBD: "C", 0xBE: "D", 0xBF: "E",
0xC0: "F", 0xC1: "G", 0xC2: "H", 0xC3: "I", 0xC4: "J", 0xC5: "K", 0xC6: "L", 0xC7: "M",
0xC8: "N", 0xC9: "O", 0xCA: "P", 0xCB: "Q", 0xCC: "R", 0xCD: "S", 0xCE: "T", 0xCF: "U",
0xD0: "V", 0xD1: "W", 0xD2: "X", 0xD3: "Y", 0xD4: "Z", 0xD5: "a", 0xD6: "b", 0xD7: "c",
0xD8: "d", 0xD9: "e", 0xDA: "f", 0xDB: "g", 0xDC: "h", 0xDD: "i", 0xDE: "j", 0xDF: "k",
0xE0: "l", 0xE1: "m", 0xE2: "n", 0xE3: "o", 0xE4: "p", 0xE5: "q", 0xE6: "r", 0xE7: "s",
0xE8: "t", 0xE9: "u", 0xEA: "v", 0xEB: "w", 0xEC: "x", 0xED: "y", 0xEE: "z",
0xF0: ":", 0xF1: "Ä", 0xF2: "Ö", 0xF3: "Ü", 0xF4: "ä", 0xF5: "ö", 0xF6: "ü",
0xFE: "\n"
}
def parseByteRange(element, byteView, bitPos, bitLength, results):
# this method parses data starting at bitPos, bitLength bits are remaining
"""parseByteRange method"""
byteRead = 0
startPos = bytePos = bitPos // 8
parsedString = ""
while (byteRead != 0xFF):
byteRead = byteView.readByte(bytePos)
bytePos += 1
if (byteRead != 0xFF):
if (byteRead in lookupTable):
parsedString += lookupTable[byteRead]
else:
parsedString += "[" + str("%X" % byteRead) + "]"
processedBytes = bytePos - startPos
# create and set new value
value = Value()
value.setString(parsedString)
# TODO iteration (ie. array) support is unimplemented at this time
results.addElement(element, processedBytes, 0, value)
# return number of processed bytes
return processedBytes
def fillByteRange(value, byteArray, bitPos, bitLength):
# Not implemented in this time. Not meant to be writeable at the present.
# this method translates edited values back to the file
"""fillByteRange method"""
# write an integer back to file
# byteArray.writeUnsignedIntBits(highWord, bitPos, bitLength, ENDIAN_BIG)
</source>
</script>
</scripts>
<structure name="Pokémon ROM File" id="21" encoding="ISO_8859-1:1987" endian="little" signed="no" order="variable">
<description>2 Unused Experience Tables, identical to Medium Fast.</description>
<structref name="Pokémon Ruby ROM" id="23" repeatmin="0" structure="id:22"/>
<structref name="Pokémon Sapphire ROM" id="25" repeatmin="0" structure="id:24"/>
<structref name="Pokémon FireRed ROM" id="27" repeatmin="0" structure="id:26"/>
<structref name="Pokémon LeafGreen ROM" id="29" repeatmin="0" structure="id:28"/>
<structref name="Pokémon Emerald ROM" id="31" repeatmin="0" structure="id:30"/>
</structure>
<structure name="Pokémon Ruby ROM" id="22" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Ruby ROM Header" id="34" structure="id:33"/>
<structure name="<new structure-0.1>" id="35" length="1997748"/>
<structure name="Enemy Y Table" id="37" length="1760"/>
<structref name="Pokémon Front Sprite Table" id="40" structure="id:39"/>
<structure name="Player Y Table" id="41" length="1760"/>
<structref name="Pokémon Back Sprite Table" id="43" structure="id:39"/>
<structref name="Pokémon Normal Palette Table" id="45" structure="id:44"/>
<structref name="Pokémon Shiny Palette Table" id="46" structure="id:44"/>
<structure name="<new structure-0.2>" id="47" length="2528">
<structure name="<new structure>" id="48" length="1032"/>
<structref name="RS Trainer Sprite Table" id="51" structure="id:50"/>
<structref name="RS Trainer Palette Table" id="53" structure="id:52"/>
<structure name="<new structure-1>" id="54" length="72"/>
<structure name="<new structure-2>" id="56" length="36"/>
<structure name="<new structure-3>" id="58" length="12"/>
<structure name="<unknown sprite table>" id="60" length="24">
<structref name="Sprite Table Entry" id="62" repeatmin="3" repeatmax="3" structure="id:61"/>
</structure>
<structure name="<unknown palette table>" id="64" length="24">
<structref name="Palette Table Entry" id="66" repeatmin="3" repeatmax="3" structure="id:65"/>
</structure>
</structure>
<structref name="Enemy Altitude Table" id="70" structure="id:69"/>
<binary name="Trainer's Pokémon Data" id="71" length="13656"/>
<structref name="Trainer Class Names" id="73" structure="id:72"/>
<structref name="RS Trainer Data" id="75" structure="id:74"/>
<structref name="Pokémon Names" id="77" structure="id:76"/>
<structref name="Move Names" id="79" structure="id:78"/>
<structure name="<new structure-0.3>" id="80" length="505"/>
<structure name="Type Chart" id="82" length="336">
<structref name="Type Chart Entry" id="84" repeatmin="112" repeatmax="112" structure="id:83"/>
</structure>
<structref name="Type Names" id="87" structure="id:86"/>
<structure name="<new structure-1.1>" id="88" length="220" alignment="4"/>
<structref name="Ability Description String Pool" id="91" structure="id:90"/>
<structref name="Ability Descriptions" id="93" structure="id:92"/>
<structref name="Ability Names" id="95" structure="id:94"/>
<structure name="<new structure-1.2>" id="96" length="1824"/>
<structure name="Pickup List" id="98" length="40"/>
<structure name="<new structure-2>" id="100" length="934"/>
<structref name="Move Data" id="103" structure="id:102"/>
<structure name="<new structure-3>" id="104" length="16" alignment="4"/>
<structref name="Pokédex Indices" id="107" structure="id:106"/>
<structure name="<new structure-4>" id="108" length="610"/>
<structure name="<new structure-4.1>" id="110" length="520">
<number name="<unknown pointers>" id="111" repeatmin="130" repeatmax="130" type="integer" length="4" display="hex"/>
</structure>
<structure name="<new structure-4.2>" id="113" length="260"/>
<structref name="TM Compatibility Data" id="116" structure="id:115"/>
<structure name="<new structure-5.1>" id="117" length="424"/>
<structref name="Experience Tables" id="120" structure="id:119"/>
<structref name="Pokémon Base Stats" id="122" structure="id:121"/>
<binary name="Pokémon Move List Data Pool" id="123" length="8766"/>
<structref name="Pokémon Evolution Data" id="125" structure="id:124"/>
<structref name="Pokémon Move List" id="127" structure="id:126"/>
<structure name="<new structure-5.2>" id="128" length="1499852"/>
<structref name="TM List " id="131" structure="id:130"/>
<structure name="<new structure-5.3>" id="132" length="151496"/>
<binary name="Pokémon Location Data Pool" id="134" length="7956"/>
<structref name="RS Location Pokémon Data" id="136" structure="id:135"/>
<structure name="<new structure-6.1>" id="137" length="10769"/>
<binary name="Pokédex Description String Pool" id="139" length="70239"/>
<structref name="RSFRLG Pokédex Entries" id="141" structure="id:140"/>
<structure name="<new structure-6.2>" id="142" length="28252"/>
<structref name="Pokémon Icon Sprite Table" id="145" structure="id:144"/>
<structure name="Pokémon Icon Palette Table" id="146" length="440"/>
<structure name="<new structure-6.3>" id="148" length="200"/>
<structref name="Move Description String Pool" id="151" structure="id:150"/>
<structref name="Move Descriptions" id="153" structure="id:152"/>
<structref name="Nature Name String Pool" id="155" structure="id:154"/>
<structref name="Nature Names" id="157" structure="id:156"/>
<structure name="<new structure-6.4>" id="158" length="3508"/>
<structure name="Berry Graphics Data" id="160" length="348"/>
<structure name="<new structure-7>" id="162" length="176"/>
<binary name="Item Description String Pool" id="164" length="13628"/>
<structref name="Item Data" id="166" structure="id:165"/>
<structure name="<new structure-8>" id="167" length="680"/>
<structref name="Contest Trainer Data" id="170" structure="id:169"/>
<structure name="<new structure-8.1>" id="171" length="484"/>
<structref name="Contest Description String Pool" id="174" structure="id:173"/>
<structref name="Contest Description Strings" id="176" structure="id:175"/>
<structure name="<new structure-9>" id="177" length="6316"/>
<structref name="Berry Description String Pool" id="180" structure="id:179"/>
<structref name="Berry Data" id="182" structure="id:181"/>
<structure name="<new structure-10>" id="183" length="7700" alignment="4"/>
<structref name="Contest Move Data" id="186" structure="id:185"/>
<structref name="Contest Description Data" id="188" structure="id:187"/>
<structure name="<new structure-11>" id="189" length="48576" alignment="4"/>
<structref name="RS Easy Chat Data" id="192" structure="id:191"/>
<structure name="<new structure-12>" id="193" length="3800" alignment="4"/>
<structref name="RS Easy Chat Addendum" id="196" structure="id:195"/>
<structure name="<new structure-13>" id="197" length="143420"/>
<structref name="RS Battle Tower Trainer Data" id="200" structure="id:199"/>
<structref name="RS Battle Tower Held Items" id="202" structure="id:201"/>
<structref name="RS Battle Tower Pokémon Data" id="204" structure="id:203"/>
</structure>
<structure name="Pokémon Sapphire ROM" id="24" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Sapphire ROM Header" id="207" structure="id:206"/>
<structure name="<new structure-0.1>" id="208" length="1997636"/>
<structure name="Enemy Y Table" id="210" length="1760"/>
<structref name="Pokémon Front Sprite Table" id="212" structure="id:39"/>
<structure name="Player Y Table" id="213" length="1760"/>
<structref name="Pokémon Back Sprite Table" id="215" structure="id:39"/>
<structref name="Pokémon Normal Palette Table" id="216" structure="id:44"/>
<structref name="Pokémon Shiny Palette Table" id="217" structure="id:44"/>
<structure name="<new structure-0.2>" id="218" length="2528">
<structure name="<new structure>" id="219" length="1032" alignment="0"/>
<structref name="RS Trainer Sprite Table" id="221" structure="id:50"/>
<structref name="RS Trainer Palette Table" id="222" structure="id:52"/>
</structure>
<structref name="Pokémon Altitude Table" id="224" structure="id:69"/>
<binary name="Trainer's Pokémon Data" id="225" length="13656"/>
<structref name="Trainer Class Names" id="226" structure="id:72"/>
<structref name="RS Trainer Data" id="227" structure="id:74"/>
<structref name="Pokémon Names" id="228" structure="id:76"/>
<structref name="Move Names" id="229" structure="id:78"/>
<structure name="<new structure-0.3>" id="230" length="505"/>
<structure name="Type Chart" id="232">
<structref name="Type Chart Entry" id="233" repeatmin="112" repeatmax="112" structure="id:83"/>
</structure>
<structref name="Type Names" id="235" structure="id:86"/>
<structure name="<new structure-1.1>" id="236" length="220"/>
<structref name="Ability Description String Pool" id="238" structure="id:90"/>
<structref name="Ability Descriptions" id="239" structure="id:92"/>
<structref name="Ability Names" id="240" structure="id:94"/>
<structure name="<new structure-1.2>" id="241" length="1824"/>
<structure name="Pickup List" id="243" length="40"/>
<structure name="<new structure-2>" id="245" length="934"/>
<structref name="Move Data" id="247" structure="id:102"/>
<structure name="<new structure-3>" id="248" length="16" alignment="4"/>
<structref name="Pokédex Indices" id="250" structure="id:106"/>
<structure name="<new structure-4>" id="251" length="610"/>
<structure name="<new structure-4.1>" id="253" length="520" alignment="0">
<number name="<unknown pointers>" id="254" repeatmin="130" repeatmax="130" type="integer" length="4" display="hex"/>
</structure>
<structure name="<new structure-4.2>" id="256" length="260" alignment="0"/>
<structref name="TM Compatibility Data" id="258" structure="id:115"/>
<structure name="<new structure-5.1>" id="259" length="424"/>
<structref name="Experience Tables" id="261" structure="id:119"/>
<structref name="Pokémon Base Stats" id="262" structure="id:121"/>
<binary name="Pokémon Move List Data Pool" id="263" length="8766"/>
<structref name="Pokémon Evolution Data" id="264" structure="id:124"/>
<structref name="Pokémon Move List" id="265" structure="id:126"/>
<structure name="<new structure-5.2>" id="266" length="1499852"/>
<structref name="TM List " id="268" structure="id:130"/>
<structure name="<new structure-5.3>" id="269" length="151496"/>
<binary name="Pokémon Location Data Pool" id="271" length="7956"/>
<structref name="RS Location Pokémon Data" id="272" structure="id:135"/>
<structure name="<new structure-6.1>" id="273" length="12885"/>
<binary name="Pokédex Description String Pool" id="275" length="70767"/>
<structref name="RSFRLG Pokédex Entries" id="276" structure="id:140"/>
<structure name="<new structure-6.2>" id="277" length="28252"/>
<structref name="Pokémon Icon Sprite Table" id="279" structure="id:144"/>
<structure name="Pokémon Icon Palette Table" id="280" length="440"/>
<structure name="<new structure-6.3>" id="282" length="200"/>
<structref name="Move Description String Pool" id="284" structure="id:150"/>
<structref name="Move Descriptions" id="285" structure="id:152"/>
<structref name="Nature Name String Pool" id="286" structure="id:154"/>
<structref name="Nature Names" id="287" structure="id:156"/>
<structure name="<new structure-6.4>" id="288" length="3508"/>
<structure name="Berry Graphics Data" id="290" length="348"/>
<structure name="<new structure-7>" id="292" length="176"/>
<binary name="Item Description String Pool" id="294" length="13628"/>
<structref name="Item Data" id="295" structure="id:165"/>
<structure name="<new structure-8>" id="296" length="680"/>
<structref name="Contest Trainer Data" id="298" structure="id:169"/>
<structure name="<new structure-8.1>" id="299" length="484"/>
<structref name="Contest Description String Pool" id="301" structure="id:173"/>
<structref name="Contest Description Strings" id="302" structure="id:175"/>
<structure name="<new structure-9>" id="303" length="6316"/>
<structref name="Berry Description String Pool" id="305" structure="id:179"/>
<structref name="Berry Data" id="306" structure="id:181"/>
<structure name="<new structure-10>" id="307" length="7700" alignment="4"/>
<structref name="Contest Move Data" id="309" structure="id:185"/>
<structref name="Contest Description Data" id="310" structure="id:187"/>
<structure name="<new structure-11>" id="311" length="48576" alignment="4"/>
<structref name="RS Easy Chat Data" id="313" structure="id:191"/>
<structure name="<new structure-12>" id="314" length="3800" alignment="4"/>
<structref name="RS Easy Chat Addendum" id="316" structure="id:195"/>
<structure name="<new structure-13>" id="317" length="143420"/>
<structref name="RS Battle Tower Trainer Data" id="319" structure="id:199"/>
<structref name="RS Battle Tower Held Items" id="320" structure="id:201"/>
<structref name="RS Battle Tower Pokémon Data" id="321" structure="id:203"/>
</structure>
<structure name="Pokémon FireRed ROM" id="26" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="FireRed ROM Header" id="324" structure="id:323"/>
<structure name="<new structure-0.1>" id="325" length="2312460"/>
<structure name="Enemy Y Table" id="327" length="1760"/>
<structref name="Pokémon Front Sprite Table" id="329" structure="id:39"/>
<structure name="Player Y Table" id="330" length="1760"/>
<structref name="Pokémon Back Sprite Table" id="332" structure="id:39"/>
<structref name="Pokémon Normal Palette Table" id="333" structure="id:44"/>
<structref name="Pokémon Shiny Palette Table" id="334" structure="id:44"/>
<structure name="<new structure-0.2>" id="335" length="4472">
<structure name="<new structure-1>" id="336" length="592"/>
<structure name="<new structure-2>" id="338" length="592"/>
<structure name="<new structure-3>" id="340" length="592"/>
<structref name="FRLG Trainer Sprite Table" id="343" structure="id:342"/>
<structref name="FRLG Trainer Palette Table" id="345" structure="id:344"/>
<structure name="<new structure>" id="346" length="136"/>
<structure name="<new structure-4>" id="348" length="72"/>
<structure name="<new structure-5>" id="350" length="24"/>
<structure name="<unknown sprite table>" id="352" length="48">
<description>pointers to uncompressed sprites?</description>
</structure>
<structure name="<unknown palette table>" id="354" length="48">
<structref name="Palette Table Entry" id="355" repeatmin="6" repeatmax="6" structure="id:65"/>
</structure>
</structure>
<structref name="Enemy Altitude Table" id="358" structure="id:69"/>
<binary name="Trainer's Pokémon Data" id="359" length="17336"/>
<structref name="FRLG Trainer Class Names" id="361" structure="id:360"/>
<structref name="FRLG Trainer Data" id="363" structure="id:362"/>
<structref name="Pokémon Names" id="364" structure="id:76"/>
<structref name="Move Names" id="365" structure="id:78"/>
<structure name="<new structure-0.3>" id="366" length="28085"/>
<structure name="Type Chart" id="368" length="336">
<structref name="Type Chart Entry" id="369" repeatmin="112" repeatmax="112" structure="id:83"/>
</structure>
<structref name="Type Names" id="371" structure="id:86"/>
<structure name="<new structure-1>" id="372" length="420" alignment="4"/>
<structref name="Ability Description String Pool" id="374" structure="id:90"/>
<structref name="Ability Descriptions" id="375" structure="id:92"/>
<structref name="Ability Names" id="376" structure="id:94"/>
<structure name="<new structure-2>" id="377" length="2066"/>
<structure name="Pickup Table" id="380" length="64"/>
<structure name="<new structure-2.1>" id="2163" length="892"/>
<structref name="Move Data" id="383" structure="id:102"/>
<structure name="<new structure-3>" id="384" length="16" alignment="4"/>
<structref name="Pokédex Indices" id="386" structure="id:106"/>
<structure name="<new structure-4>" id="387" length="1390"/>
<structref name="TM Compatibility Data" id="389" structure="id:115"/>
<structure name="<new structure-5>" id="390" length="572"/>
<structref name="Experience Tables" id="392" structure="id:119"/>
<structref name="Pokémon Base Stats" id="393" structure="id:121"/>
<binary name="Pokémon Move List Data Pool" id="394" length="8894"/>
<structref name="Pokémon Evolution Data" id="395" structure="id:124"/>
<structref name="Pokémon Move List" id="396" structure="id:126"/>
<structure name="<new structure-6>" id="398" length="1480060">
<structure name="<new structure>" id="399" length="4328"/>
<structure name="Egg Moves" id="401" length="2276"/>
</structure>
<binary name="Pokémon Location Data Pool" id="404" length="10520"/>
<structref name="Location Pokémon Data" id="406" structure="id:405"/>
<structure name="<new structure-7>" id="2167" length="37016"/>
<structref name="Pokémon Icon Sprite Table" id="408" structure="id:144"/>
<structure name="Pokémon Icon Palette Table" id="409" length="440"/>
<structure name="<new structure-7.1>" id="411" length="604">
<structure name="<Pokémon Icon Palette Table>" id="412" length="48"/>
</structure>
<structref name="FRLG Bag Sprite Table" id="416" structure="id:415"/>
<structure name="<new structure-8>" id="417" length="128"/>
<binary name="Item Description String Pool" id="419" strokecolor="919191" fillcolor="919191" length="24924"/>
<structref name="Item Data" id="421" structure="id:420"/>
<structure name="<new structure-9>" id="422" length="100"/>
<structref name="Berry Description String Pool" id="424" structure="id:179"/>
<structref name="Berry Data" id="425" structure="id:181"/>
<structref name="Berry Data 2" id="427" structure="id:426"/>
<structure name="<new structure-9.1>" id="428" length="32844"/>
<structref name="Easy Chat Data" id="431" structure="id:430"/>
<structure name="<new structure-9.2>" id="432" length="4116"/>
<structref name="Easy Chat Category Strings" id="435" structure="id:434"/>
<structure name="<new structure-9.3>" id="437" length="3340"/>
<binary name="Location Name String Pool" id="439" length="1344"/>
<structure name="<new structure-9.4>" id="440" length="10864"/>
<structure name="Location Names" id="442">
<structref name="String Pool String Pointer" id="444" repeatmin="109" repeatmax="109" structure="id:443"/>
</structure>
<structure name="<new structure-9.5>" id="436" length="180606"/>
<structref name="Easy Chat Category String Pool" id="448" structure="id:447"/>
<structure name="<new structure-10>" id="450" length="137757"/>
<structure name="Footprint Data" id="452" length="0">
<number name="<pointer to 32 bytes?>" id="453" repeatmin="412" repeatmax="412" type="integer" length="4" display="hex"/>
</structure>
<structure name="<new structure-10.0.1>" id="449" length="19221"/>
<binary name="Pokédex Description String Pool" id="456" strokecolor="919191" fillcolor="919191" length="39963"/>
<structref name="RSFRLG Pokédex Entries" id="457" structure="id:140"/>
<structure name="<new structure-10.1>" id="458" length="1556"/>
<binary name="Pokédex Habitat Data Pool" id="460" length="772"/>
<binary name="Pokédex Habitat Page Data Pool" id="461" length="1144"/>
<structref name="Pokédex Habitat Data Index" id="463" structure="id:462"/>
<structure name="<new structure-11>" id="464" length="28364"/>
<structref name="FRLG Move Tutor Data" id="467" structure="id:466"/>
<structure name="<new structure-12>" id="468" length="40710"/>
<structref name="Nature Name String Pool" id="470" structure="id:154"/>
<structref name="Nature Names" id="471" structure="id:156"/>
<structure name="<new structure-13>" id="472" length="91120"/>
<structref name="Trainer Tower Item Index" id="476" structure="id:475"/>
<structure name="<new structure-13.1>" id="2165" length="2266"/>
<structref name="Trainer Tower Data" id="479" structure="id:478"/>
<structref name="Move Description String Pool" id="480" structure="id:150"/>
<structref name="Move Descriptions" id="481" structure="id:152"/>
<structure name="<new structure-14>" id="482" length="15524"/>
</structure>
<structure name="Pokémon LeafGreen ROM" id="28" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="LeafGreen ROM Header" id="486" structure="id:485"/>
<structure name="<new structure-0.1>" id="487" length="2312424"/>
<structure name="Enemy Y Table" id="489" length="1760"/>
<structref name="Pokémon Front Sprite Table" id="491" structure="id:39"/>
<structure name="Player Y Table" id="492" length="1760"/>
<structref name="Pokémon Back Sprite Table" id="494" structure="id:39"/>
<structref name="Pokémon Normal Palette Table" id="495" structure="id:44"/>
<structref name="Pokémon Shiny Palette Table" id="496" structure="id:44"/>
<structure name="<new structure-0.2>" id="497" length="4472">
<structure name="<new structure>" id="498" length="1776"/>
<structref name="FRLG Trainer Sprite Table" id="500" structure="id:342"/>
<structref name="FRLG Trainer Palette Table" id="501" structure="id:344"/>
</structure>
<structref name="Enemy Altitude Table" id="503" structure="id:69"/>
<binary name="Trainer's Pokémon Data" id="504" length="17336"/>
<structref name="FRLG Trainer Class Names" id="505" structure="id:360"/>
<structref name="FRLG Trainer Data" id="506" structure="id:362"/>
<structref name="Pokémon Names" id="507" structure="id:76"/>
<structref name="Move Names" id="508" structure="id:78"/>
<structure name="<new structure-0.3>" id="509" length="28085"/>
<structure name="Type Chart" id="511" length="336" alignment="0">
<structref name="Type Chart Entry" id="512" repeatmin="112" repeatmax="112" structure="id:83"/>
</structure>
<structref name="Type Names" id="514" structure="id:86"/>
<structure name="<new structure-1>" id="515" length="420" alignment="4"/>
<structref name="Ability Description String Pool-1" id="517" structure="id:90"/>
<structref name="Ability Descriptions" id="518" structure="id:92"/>
<structref name="Ability Names" id="519" structure="id:94"/>
<structure name="<new structure-2>" id="520" length="3022">
<structure name="<new structure>" id="521" length="2066"/>
<structure name="Pickup Table" id="523" length="64"/>
</structure>
<structref name="Move Data" id="526" structure="id:102"/>
<structure name="<new structure-3>" id="527" length="16" alignment="4"/>
<structref name="Pokédex Indices" id="529" structure="id:106"/>
<structure name="<new structure-4>" id="530" length="1390"/>
<structref name="TM Compatibility Data" id="532" structure="id:115"/>
<structure name="<new structure-5>" id="533" length="572"/>
<structref name="Experience Tables" id="535" structure="id:119"/>
<structref name="Pokémon Base Stats" id="536" structure="id:121"/>
<binary name="Pokémon Move List Data Pool" id="537" length="8898"/>
<structref name="Pokémon Evolution Data" id="538" structure="id:124"/>
<structref name="Pokémon Move List" id="539" structure="id:126"/>
<structure name="<new structure-7>" id="540" length="1529816">
<structure name="<new structure>" id="541" length="1480060"/>
<binary name="Pokémon Location Data Pool" id="543" length="10520"/>
<structref name="Location Pokémon Data" id="544" structure="id:405"/>
</structure>
<structref name="Pokémon Icon Sprite Table" id="546" structure="id:144"/>
<structure name="Pokémon Icon Palette Table" id="547" length="440"/>
<structure name="<new structure-8>" id="549" length="3732">
<structure name="<new structure>" id="550" length="604"/>
<structref name="FRLG Bag Sprite Table" id="552" structure="id:415"/>
</structure>
<binary name="Item Description String Pool" id="554" length="24924"/>
<structref name="FRLG Item Data" id="555" structure="id:420"/>
<structure name="<new structure-9>" id="556" length="100"/>
<structref name="Berry Description String Pool" id="558" structure="id:179"/>
<structref name="Berry Data" id="559" structure="id:181"/>
<structref name="Berry Data 2" id="560" structure="id:426"/>
<structure name="<new structure-9.1>" id="561" length="32844"/>
<structref name="Easy Chat Data" id="563" structure="id:430"/>
<structure name="<new structure-9.2>" id="564" length="4116"/>
<structref name="Easy Chat Category Strings" id="566" structure="id:434"/>
<structure name="<new structure-9.3>" id="567" length="196590">
<structure name="<new structure>-1" id="568" length="3340"/>
<binary name="Location Name String Pool" id="570" length="1344"/>
<structure name="<new structure>" id="571" length="10864"/>
<structure name="Location Names" id="573">
<structref name="String Pool String Pointer" id="574" repeatmin="109" repeatmax="109" structure="id:443"/>
</structure>
</structure>
<structref name="Easy Chat Category String Pool" id="577" structure="id:447"/>
<structure name="<new structure-10>" id="578" length="158626">
<structure name="<new structure>" id="579" length="137757" alignment="0"/>
<structure name="Footprint Data" id="581" length="0" alignment="0">
<number name="<pointer to 32 bytes?>" id="582" repeatmin="412" repeatmax="412" type="integer" length="4" display="hex"/>
</structure>
</structure>
<binary name="Pokédex Description String Pool" id="585" length="38911"/>
<structref name="RSFRLG Pokédex Entries" id="586" structure="id:140"/>
<structure name="<new structure-10.1>" id="587" length="1556"/>
<binary name="Pokédex Habitat Data Pool" id="589" length="772"/>
<binary name="Pokédex Habitat Page Data Pool" id="590" length="1144"/>
<structref name="Pokédex Habitat Data Index" id="591" structure="id:462"/>
<structure name="<new structure-11>" id="592" length="28364"/>
<structref name="FRLG Move Tutor Data" id="594" structure="id:466"/>
<structure name="<new structure-12>" id="595" length="40710"/>
<structref name="Nature Name String Pool" id="597" structure="id:154"/>
<structref name="Nature Names" id="598" structure="id:156"/>
<structure name="<new structure-13>" id="599" length="93092">
<structure name="<new structure>" id="600" length="90796"/>
<structref name="Trainer Tower Item Index" id="602" structure="id:475"/>
</structure>
<structref name="Trainer Tower Data" id="604" structure="id:478"/>
<structref name="Move Description String Pool" id="605" structure="id:150"/>
<structref name="Move Descriptions" id="606" structure="id:152"/>
</structure>
<structure name="Pokémon Emerald ROM" id="30" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Emerald ROM Header" id="609" structure="id:608"/>
<structure name="<new structure>" id="610" length="2600167"/>
<structure name="<string pool-1>" id="612" length="7643">
<description>Strings used in Pokémon Contests.</description>
</structure>
<structref name="Contest Description String Pool" id="614" structure="id:173"/>
<structure name="<string pool-2>" id="615" length="62337"/>
<structure name="<new structure-0.1>" id="617" length="476495">
<structure name="<new structure>" id="618" length="2319"/>
<structure name="<string pool>" id="620" length="3950"/>
<structure name="<new structure-1>" id="622" length="331"/>
<structure name="<string pool-2>" id="624" length="803"/>
</structure>
<structure name="Enemy Y Table" id="627" length="1760"/>
<structref name="<unknown Pokémon Sprite Table>" id="629" structure="id:39"/>
<structure name="Player Y Table" id="630" length="1760"/>
<structref name="Pokémon Back Sprite Table" id="632" structure="id:39"/>
<structref name="Pokémon Normal Palette Table" id="633" structure="id:44"/>
<structref name="Pokémon Shiny Palette Table" id="634" structure="id:44"/>
<structure name="<new structure-0.2>" id="635" length="1116"/>
<structref name="Emerald Trainer Sprite Table" id="638" structure="id:637"/>
<structref name="Emerald Trainer Palette Table" id="640" structure="id:639"/>
<structure name="<new structure-0.3>" id="641" length="424">
<structure name="<new structure>" id="642" length="168"/>
<structure name="<new structure-1>" id="644" length="96"/>
<structure name="<new structure-2>" id="646" length="32"/>
<structure name="<unknown sprite table>" id="648" length="64"/>
<structure name="<unknown palette table>" id="650" length="64">
<structref name="Palette Table Entry" id="651" repeatmin="8" repeatmax="8" structure="id:65"/>
</structure>
</structure>
<structref name="Enemy Altitude Table" id="654" structure="id:69"/>
<structure name="<new structure-0.4>" id="655" length="16932">
<structure name="Pokémon Animation Frame Timing Data" id="656" length="11604"/>
<structure name="<new structure>" id="658" length="3568"/>
<structure name="<new structure-1>" id="660">
<number name="<unknown list of pointers>" id="661" repeatmin="440" repeatmax="440" type="integer" length="4" display="hex"/>
</structure>
</structure>
<structref name="Pokémon Front Sprite Table" id="664" structure="id:39"/>
<structure name="<new structure-0.5>" id="665" length="1760"/>
<binary name="Trainer's Pokémon Data" id="667" length="18088"/>
<structref name="Emerald Trainer Class Names" id="669" structure="id:668"/>
<structref name="Emerald Trainer Data" id="671" structure="id:670"/>
<structref name="Pokémon Names" id="672" structure="id:76"/>
<structref name="Move Names" id="673" structure="id:78"/>
<structure name="<new structure-1>" id="674" length="868" alignment="4"/>
<structure name="Type Chart" id="676" length="336">
<structref name="Type Chart Entry" id="677" repeatmin="112" repeatmax="112" structure="id:83"/>
</structure>
<structref name="Type Names" id="679" structure="id:86"/>
<structure name="<new structure-3>" id="680" length="226"/>
<structref name="Ability Description String Pool" id="682" structure="id:90"/>
<structref name="Ability Names" id="683" structure="id:94"/>
<structref name="Ability Descriptions" id="684" structure="id:92"/>
<structure name="<new structure-3.1>" id="685" length="2100"/>
<structref name="Emerald Pickup Table" id="688" structure="id:687"/>
<structure name="<new structure-4>" id="689" length="1045"/>
<structref name="Move Data" id="691" structure="id:102"/>
<structure name="<new structure-5>" id="692" length="16" alignment="4"/>
<structref name="Pokédex Indices" id="694" structure="id:106"/>
<structure name="<new structure-6>" id="695" length="1450"/>
<structref name="TM Compatibility Data" id="697" structure="id:115"/>
<structure name="<new structure-7>" id="698" length="436"/>
<structref name="Experience Tables" id="700" structure="id:119"/>
<structref name="Pokémon Base Stats" id="701" structure="id:121"/>
<binary name="Pokémon Move List Data Pool" id="702" length="8766"/>
<structref name="Pokémon Evolution Data" id="703" structure="id:124"/>
<structref name="Pokémon Move List" id="704" structure="id:126"/>
<structure name="<new structure-8>" id="705" length="2265948">
<structure name="<new structure>" id="706" length="5100"/>
<structure name="Egg Move Data" id="708" length="2276"/>
</structure>
<structure name="Location Pokémon Data" id="711" length="2480"/>
<structure name="<new structure-9>" id="713" length="39957"/>
<binary name="Pokédex Description String Pool" id="715" length="58019"/>
<structref name="Pokédex Entries" id="717" structure="id:716"/>
<structure name="<new structure-10>" id="718" length="54936">
<structure name="<new structure>" id="719" length="132"/>
<structure name="<new structure-1>" id="721" length="1652"/>
<structure name="<new structure-2>" id="723" length="260"/>
<structure name="<new structure-3>" id="725" length="408"/>
</structure>
<structref name="Pokémon Icon Sprite Table" id="728" structure="id:144"/>
<structure name="Pokémon Icon Palette Table" id="729" length="440"/>
<structure name="<new structure-11>" id="731" length="14164"/>
<structure name="Berry Graphics Data" id="733" length="344">
<structref name="Berry Graphics Data Entry" id="735" repeatmin="43" repeatmax="43" structure="id:734"/>
</structure>
<structure name="<new structure-11.1>" id="737" length="180"/>
<binary name="Item Description String Pool" id="739" length="15104"/>
<structref name="Emerald Item Data" id="741" structure="id:740"/>
<structure name="<new structure-12>" id="742" length="484"/>
<structref name="Contest Description Strings" id="744" structure="id:175"/>
<structure name="<new structure-13>" id="745" length="916"/>
<structref name="Emerald Contest Trainer Data" id="748" structure="id:747"/>
<structure name="<new structure-14>" id="749" length="576"/>
<structref name="Berry Description String Pool" id="751" structure="id:179"/>
<structref name="Berry Data" id="752" structure="id:181"/>
<structref name="Berry Data 2" id="753" structure="id:426"/>
<structure name="<new structure-15>" id="754" length="5860"/>
<structref name="Contest Move Data" id="756" structure="id:185"/>
<structref name="Contest Description Data" id="757" structure="id:187"/>
<structure name="<new structure-16>" id="758" length="45072" alignment="4"/>
<structref name="Easy Chat Data" id="761" structure="id:760"/>
<structure name="<new structure-16.1>" id="762" length="5408"/>
<structref name="Easy Chat Category Strings" id="764" structure="id:434"/>
<structure name="<new structure-17>" id="765" length="9444"/>
<structure name="Location String Pool" id="767" length="2412"/>
<structure name="Location Data" id="769" length="1704"/>
<structure name="<new structure-18>" id="771" length="184716"/>
<structref name="Battle Frontier Item Index" id="774" structure="id:773"/>
<structref name="Battle Frontier" id="776" structure="id:775"/>
<structure name="<new structure-19>" id="777" length="2096" alignment="4">
<structure name="<new structure>" id="778" length="252"/>
<structure name="<string pool>" id="780" length="1320">
<structref name="String Pool String Pointer" id="781" repeatmin="330" repeatmax="330" structure="id:443"/>
</structure>
<structure name="<new structure-1>" id="783" length="400"/>
<structure name="<new structure-2>" id="785" length="64"/>
</structure>
<structref name="Slateport Battle Tent" id="789" structure="id:788"/>
<structref name="Verdanturf Battle Tent" id="791" structure="id:790"/>
<structref name="Fallarbor Battle Tent" id="793" structure="id:792"/>
<structure name="<new structure-20>" id="794" length="142" alignment="4"/>
<structure name="Battle Tower Trainer List" id="796" length="64"/>
<structure name="<new structure-20.1>" id="798" length="34785">
<structure name="<new structure>" id="799" length="27586"/>
<structure name="<new structure-1>" id="801" length="1272"/>
<structure name="<new structure-2>" id="803" length="1140"/>
</structure>
<structure name="<string pool-3>" id="806" length="3941"/>
<structure name="<new structure-20.2>" id="808" length="64">
<structref name="String Pool String Pointer" id="809" repeatmin="16" repeatmax="16" structure="id:443"/>
</structure>
<structure name="<string pool-4>" id="811" length="22477"/>
<structref name="Easy Chat Category String Pool" id="813" structure="id:447"/>
<structure name="<string pool-5>" id="814" length="4779"/>
<structure name="<new structure-21>" id="816" length="139181">
<structure name="<new structure>" id="817" length="135683"/>
<structure name="<new structure-1>" id="819" length="1152">
<structref name="String Pool String Pointer" id="820" repeatmin="288" repeatmax="288" structure="id:443"/>
</structure>
</structure>
<structure name="Battle Tower Restricted Pokémon List" id="823" length="22">
<number name="Pokémon ID" id="824" repeatmin="10" repeatmax="10" type="integer" length="2"/>
</structure>
<structure name="<new structure-21.1>" id="826" length="272">
<structure name="<string pool>" id="827">
<structref name="String Pool String Pointer" id="828" repeatmin="32" repeatmax="32" structure="id:443"/>
</structure>
<structure name="<new structure-1>" id="830" length="16"/>
<structure name="<string pool 2>" id="832" length="112">
<structref name="String Pool String Pointer" id="833" repeatmin="28" repeatmax="28" structure="id:443"/>
</structure>
<structure name="<pointers to string pool>" id="835" length="16"/>
</structure>
<structref name="Battle Arena Mind Ratings" id="839" structure="id:838"/>
<structure name="<new structure-22>" id="840" length="156" alignment="4"/>
<structref name="Battle Style" id="843" structure="id:842"/>
<structure name="<new structure-23>" id="844" length="116"/>
<structure name="Battle Factory Rental Selection" id="846" length="64"/>
<structure name="<new structure-24>" id="848" length="11832">
<structure name="<new structure>-1" id="849" length="1244"/>
<structure name="Battle Pyramid Wild Pokémon" id="851" length="1920"/>
<structure name="Battle Pyramid Wild Pokémon Data" id="853" length="80">
<offset name="Battle Pyramid Round Data" id="855" fillcolor="FF86D5" repeatmin="20" repeatmax="20" length="4" references="id:854" additional="-134217728" follownullreference="yes"/>
</structure>
<structure name="<second Battle Pyramid Round Data>" id="857" length="1920"/>
<structure name="<second Battle Pyramid Round structure>" id="859" length="80">
<offset name="Battle Pyramid Round Data" id="860" fillcolor="FF86D5" repeatmin="20" repeatmax="20" length="4" references="id:854" additional="-134217728" follownullreference="yes"/>
</structure>
<structure name="<new structure-1>" id="862" length="332"/>
<structref name="Battle Pyramid Pickup List" id="865" structure="id:864"/>
<structure name="<new structure-24.1>" id="866" length="1226">
<structure name="<new structure>" id="867" length="452"/>
<structure name="<unknown string pool>" id="869" length="504"/>
<structure name="<pointers to string pool>" id="871" length="96"/>
</structure>
<structure name="Battle Pyramid Pickup Probs" id="874" length="10">
<number name="Probability" id="875" repeatmin="10" repeatmax="10" type="integer" length="1"/>
</structure>
<structure name="<new structure-24.2>" id="877" length="1152"/>
<structref name="Emerald Bag Sprite Table" id="880" structure="id:879"/>
</structure>
<structref name="Emerald Move Tutor Data" id="883" structure="id:882"/>
<structure name="<new structure-25>" id="884" length="11016">
<structure name="<new structure>" id="885" length="1084"/>
<structure name="<new structure-1>" id="887" length="160">
<structref name="String Pool String Pointer" id="888" repeatmin="40" repeatmax="40" structure="id:443"/>
</structure>
<structure name="<new structure-2>" id="890" length="8932"/>
<structure name="<string pool>" id="892" length="656"/>
<structure name="<new structure-3>" id="894" length="184"/>
</structure>
<structref name="Move Description String Pool" id="898" structure="id:897"/>
<structref name="Move Descriptions" id="899" structure="id:152"/>
<structref name="Nature Name String Pool" id="900" structure="id:154"/>
<structref name="Nature Names" id="901" structure="id:156"/>
<structure name="<new structure-26>" id="902" length="40032">
<structure name="<new structure>" id="903" length="14300"/>
<structure name="<unknown string pool strings>" id="905">
<structref name="String Pool String" id="907" repeatmin="312" repeatmax="312" structure="id:906"/>
</structure>
<structure name="<unknown string pool>" id="909" length="1248" alignment="4">
<structref name="String Pool String Pointer" id="910" repeatmin="312" repeatmax="312" structure="id:443"/>
</structure>
</structure>
<structref name="Trainer Hill Data" id="914" structure="id:913"/>
</structure>
<structure name="GBA ROM Header" id="916" length="192" encoding="ISO_8859-1:1987" endian="little" signed="no">
<binary name="ARM B Jump Instruction" id="917" length="4"/>
<binary name="Nintendo Logo Data" id="918" length="156"/>
<string name="Game Title" id="919" type="fixed-length" length="12"/>
<string name="Game Code" id="920" type="fixed-length" length="4"/>
<binary name="Maker Code" id="921" length="2"/>
<binary name="<fixed value>" mustmatch="yes" id="922" length="1">
<fixedvalues>
<fixedvalue value="96"/>
</fixedvalues>
</binary>
<binary name="Main Unit Code" id="923" length="1"/>
<binary name="Device Type" id="924" length="1"/>
<binary name="<reserved>" id="925" length="7"/>
<number name="Mask ROM Version" id="926" type="integer" length="1"/>
<number name="Complement Check" id="927" type="integer" length="1"/>
<binary name="<reserved-2>" id="928" length="2"/>
</structure>
<structure name="Ruby ROM Header" id="33" extends="id:916">
<string name="Game Title" mustmatch="yes" id="932" type="fixed-length" length="12">
<fixedvalues>
<fixedvalue value="POKEMON RUBY"/>
</fixedvalues>
</string>
<string name="Game Code" mustmatch="yes" id="933" type="fixed-length" length="4">
<fixedvalues>
<fixedvalue value="AXVE"/>
</fixedvalues>
</string>
</structure>
<structure name="Sapphire ROM Header" id="206" extends="id:916">
<string name="Game Title" mustmatch="yes" id="945" type="fixed-length" length="12">
<fixedvalues>
<fixedvalue value="POKEMON SAPP"/>
</fixedvalues>
</string>
<string name="Game Code" mustmatch="yes" id="946" type="fixed-length" length="4">
<fixedvalues>
<fixedvalue value="AXPE"/>
</fixedvalues>
</string>
</structure>
<structure name="FireRed ROM Header" id="323" extends="id:916">
<string name="Game Title" mustmatch="yes" id="958" type="fixed-length" length="12">
<fixedvalues>
<fixedvalue value="POKEMON FIRE"/>
</fixedvalues>
</string>
<string name="Game Code" mustmatch="yes" id="959" type="fixed-length" length="4">
<fixedvalues>
<fixedvalue value="BPRE"/>
</fixedvalues>
</string>
</structure>
<structure name="LeafGreen ROM Header" id="485" extends="id:916">
<string name="Game Title" mustmatch="yes" id="971" type="fixed-length" length="12">
<fixedvalues>
<fixedvalue value="POKEMON LEAF"/>
</fixedvalues>
</string>
<string name="Game Code" mustmatch="yes" id="972" type="fixed-length" length="4">
<fixedvalues>
<fixedvalue value="BPGE"/>
</fixedvalues>
</string>
</structure>
<structure name="Emerald ROM Header" id="608" extends="id:916">
<string name="Game Title" mustmatch="yes" id="984" type="fixed-length" length="12">
<fixedvalues>
<fixedvalue value="POKEMON EMER"/>
</fixedvalues>
</string>
<string name="Game Code" mustmatch="yes" id="985" type="fixed-length" length="4">
<fixedvalues>
<fixedvalue value="BPEE"/>
</fixedvalues>
</string>
</structure>
<structure name="Pokémon Sprite Table" id="39" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Pokémon Sprite Table Entry" id="995" repeatmin="440" repeatmax="440" structure="id:61"/>
</structure>
<structure name="RS Trainer Sprite Table" id="50" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Sprite Table Entry" id="997" repeatmin="83" repeatmax="83" structure="id:61"/>
</structure>
<structure name="FRLG Trainer Sprite Table" id="342" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Sprite Table Entry" id="999" repeatmin="148" repeatmax="148" structure="id:61"/>
</structure>
<structure name="Emerald Trainer Sprite Table" id="637" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Sprite Table Entry" id="1001" repeatmin="93" repeatmax="93" structure="id:61"/>
</structure>
<structure name="Sprite Table Entry" id="61" length="8" encoding="ISO_8859-1:1987" endian="little" signed="no">
<offset name="Compressed Sprite Pointer" id="1004" fillcolor="FF80FB" length="4" references="id:1003" additional="-134217728" follownullreference="yes"/>
<number name="<new number>" id="1005" type="integer" length="2"/>
<number name="<new number-1>" id="1006" type="integer" length="2"/>
</structure>
<structure name="Pokémon Palette Table" id="44" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Pokémon Palette Table Entry" id="1008" repeatmin="440" repeatmax="440" structure="id:65"/>
</structure>
<structure name="RS Trainer Palette Table" id="52" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Palette Table Entry" id="1010" repeatmin="83" repeatmax="83" structure="id:65"/>
</structure>
<structure name="FRLG Trainer Palette Table" id="344" encoding="ISO_8859-1:1987" endian="big" signed="no">
<structref name="Palette Table Entry" id="1012" repeatmin="148" repeatmax="148" structure="id:65"/>
</structure>
<structure name="Emerald Trainer Palette Table" id="639" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Palette Table Entry" id="1014" repeatmin="93" repeatmax="93" structure="id:65"/>
</structure>
<structure name="Palette Table Entry" id="65" length="8" encoding="ISO_8859-1:1987" endian="little" signed="no">
<offset name="Compressed Palette Pointer" id="1016" fillcolor="FF80FB" length="4" references="id:1003" additional="-134217728" follownullreference="yes"/>
<number name="<new number>" id="1017" type="integer" length="4"/>
</structure>
<structure name="Pokémon Altitude Table" id="69" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Altitude" id="1019" repeatmin="412" repeatmax="412" type="integer" length="1"/>
</structure>
<structure name="Trainer Class Names" id="72" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="Name" id="1021" strokecolor="FDD480" fillcolor="FCFD84" repeatmin="58" repeatmax="58" type="fixed-length" length="13"/>
</structure>
<structure name="FRLG Trainer Class Names" id="360" extends="id:72">
<string name="Name" id="1023" repeatmin="107" repeatmax="107" type="fixed-length" length="13"/>
</structure>
<structure name="Emerald Trainer Class Names" id="668" extends="id:72">
<string name="Name" id="1025" repeatmin="66" repeatmax="66" type="fixed-length" length="13"/>
</structure>
<structure name="Trainer's Pokémon Entry" id="1027" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="AI Value" id="1028" type="integer" length="2"/>
<number name="Level" id="1029" type="integer" length="2"/>
<number name="Species ID" id="1030" type="integer" length="2"/>
<number name="Held Item" id="1031" type="integer" length="2"/>
</structure>
<structure name="Trainer's Pokémon with Moveset Entry" id="1033" extends="id:1027">
<number name="Moves" id="1038" repeatmin="4" repeatmax="4" type="integer" length="2"/>
</structure>
<structure name="Trainer Data" id="1040" alignment="4" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Trainer Data Entry" id="1042" structure="id:1041"/>
</structure>
<structure name="RS Trainer Data" id="74" extends="id:1040">
<structref name="Trainer Data Entry" id="1044" repeatmin="694" repeatmax="694" structure="id:1041"/>
</structure>
<structure name="FRLG Trainer Data" id="362" extends="id:1040">
<structref name="Trainer Data Entry" id="1046" repeatmin="743" repeatmax="743" structure="id:1041"/>
</structure>
<structure name="Emerald Trainer Data" id="670" extends="id:1040">
<structref name="Trainer Data Entry" id="1048" repeatmin="855" repeatmax="855" structure="id:1041"/>
</structure>
<structure name="Trainer Data Entry" id="1041" length="40" encoding="ISO_8859-1:1987" endian="little" signed="no">
<binary name="<new binary>" id="1050" length="1"/>
<number name="Trainer Class" id="1051" type="integer" length="1"/>
<binary name="<new binary-1>" id="1052" length="2"/>
<string name="Name" id="1053" strokecolor="FDD480" fillcolor="FCFD84" type="fixed-length" length="12"/>
<number name="Items" id="1054" repeatmin="4" repeatmax="4" type="integer" length="2"/>
<binary name="<new binary-2>" id="1055" length="8"/>
<number name="Team Size" id="1056" type="integer" length="4"/>
<number name="Pokémon Lineup Pointer" id="1057" fillcolor="FF86D5" type="integer" length="4" display="hex"/>
</structure>
<structure name="Pokémon Names" id="76" length="4532" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="Pokémon Name" id="1059" strokecolor="FDD480" fillcolor="FCFD84" repeatmin="412" repeatmax="412" type="fixed-length" length="11"/>
</structure>
<structure name="Move Names" id="78" length="4615" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="Move Name" id="1061" strokecolor="FDD480" fillcolor="FCFD84" repeatmin="355" repeatmax="355" type="fixed-length" length="13"/>
</structure>
<structure name="Type Chart Entry" id="83" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Attacking Type" id="1063" type="integer" length="1"/>
<number name="Defending Type" id="1064" type="integer" length="1"/>
<number name="Damage Multiplier" id="1065" type="integer" length="1"/>
</structure>
<structure name="Type Names" id="86" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="Name" id="1067" strokecolor="FDD480" fillcolor="FCFD84" repeatmin="18" repeatmax="18" type="fixed-length" length="7"/>
</structure>
<structure name="Ability Description String Pool" id="90" extends="id:1069" endian="little">
<structref name="String" id="1070" repeatmin="78" repeatmax="78" structure="id:906"/>
</structure>
<structure name="Ability Descriptions" id="92" length="312" alignment="4" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Description Pointer" id="1072" repeatmin="78" repeatmax="78" structure="id:443"/>
</structure>
<structure name="Ability Names" id="94" length="1014" encoding="ISO_8859-1:1987" endian="little" signed="no">
<string name="Name" id="1074" strokecolor="FDD480" fillcolor="FCFD84" repeatmin="78" repeatmax="78" type="fixed-length" length="13"/>
</structure>
<structure name="Emerald Pickup Table" id="687" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Common Items" id="1076" repeatmin="18" repeatmax="18" type="integer" length="2"/>
<number name="Rare Items" id="1077" repeatmin="11" repeatmax="11" type="integer" length="2"/>
<number name="Cumulative Probs" id="1078" repeatmin="9" repeatmax="9" type="integer" length="1"/>
</structure>
<structure name="Move Data" id="102" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Move Data Entry" id="1081" repeatmin="355" repeatmax="355" structure="id:1080"/>
</structure>
<structure name="Move Data Entry" id="1080" length="9" alignment="4" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Effect" id="1083" type="integer" length="1"/>
<number name="Base Power" id="1084" type="integer" length="1"/>
<number name="Type" id="1085" type="integer" length="1"/>
<number name="Accuracy" id="1086" type="integer" length="1"/>
<number name="PP" id="1087" type="integer" length="1"/>
<number name="Effect Accuracy" id="1088" type="integer" length="1"/>
<number name="Affects Whom" id="1089" type="integer" length="1"/>
<number name="Priority" id="1090" type="integer" length="1" signed="yes"/>
<number name="Flags" id="1091" type="integer" length="1"/>
</structure>
<structure name="Pokédex Indices" id="106" length="2466" alignment="4" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structure name="Hoenn Dex Indices" id="1093" length="822" alignment="1">
<number name="Hoenn ID Index" id="1094" repeatmin="411" repeatmax="411" type="integer" length="2"/>
</structure>
<structure name="National Dex Indices" id="1096" length="822" alignment="1">
<number name="National ID Index" id="1097" repeatmin="411" repeatmax="411" type="integer" length="2"/>
</structure>
<structure name="Hoenn to National Mapping" id="1099" length="822" alignment="1">
<number name="National Dex Number" id="1100" repeatmin="386" repeatmax="386" type="integer" length="2"/>
<binary name="Unused Mapping" id="1101" strokecolor="919191" fillcolor="919191" length="50">
<description>Unused mapping for Hoenn to National</description>
</binary>
</structure>
</structure>
<structure name="TM Compatibility Data" id="115" length="3296" alignment="4" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="TM Compatibility Data Entry " id="1105" repeatmin="412" repeatmax="412" structure="id:1104"/>
</structure>
<structure name="TM Compatibility Data Entry " id="1104" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="TM08 Compatibility" id="1107" type="integer" length="1" lengthunit="bit"/>
<number name="TM07 Compatibility" id="1108" type="integer" length="1" lengthunit="bit"/>
<number name="TM06 Compatibility" id="1109" type="integer" length="1" lengthunit="bit"/>
<number name="TM05 Compatibility" id="1110" type="integer" length="1" lengthunit="bit"/>
<number name="TM04 Compatibility" id="1111" type="integer" length="1" lengthunit="bit"/>
<number name="TM03 Compatibility" id="1112" type="integer" length="1" lengthunit="bit"/>
<number name="TM02 Compatibility" id="1113" type="integer" length="1" lengthunit="bit"/>
<number name="TM01 Compatibility" id="1114" type="integer" length="1" lengthunit="bit"/>
<number name="TM16 Compatibility" id="1115" type="integer" length="1" lengthunit="bit"/>
<number name="TM15 Compatibility" id="1116" type="integer" length="1" lengthunit="bit"/>
<number name="TM14 Compatibility" id="1117" type="integer" length="1" lengthunit="bit"/>
<number name="TM13 Compatibility" id="1118" type="integer" length="1" lengthunit="bit"/>
<number name="TM12 Compatibility" id="1119" type="integer" length="1" lengthunit="bit"/>
<number name="TM11 Compatibility" id="1120" type="integer" length="1" lengthunit="bit"/>
<number name="TM10 Compatibility" id="1121" type="integer" length="1" lengthunit="bit"/>
<number name="TM09 Compatibility" id="1122" type="integer" length="1" lengthunit="bit"/>
<number name="TM24 Compatibility" id="1123" type="integer" length="1" lengthunit="bit"/>
<number name="TM23 Compatibility" id="1124" type="integer" length="1" lengthunit="bit"/>
<number name="TM22 Compatibility" id="1125" type="integer" length="1" lengthunit="bit"/>
<number name="TM21 Compatibility" id="1126" type="integer" length="1" lengthunit="bit"/>
<number name="TM20 Compatibility" id="1127" type="integer" length="1" lengthunit="bit"/>
<number name="TM19 Compatibility" id="1128" type="integer" length="1" lengthunit="bit"/>
<number name="TM18 Compatibility" id="1129" type="integer" length="1" lengthunit="bit"/>
<number name="TM17 Compatibility" id="1130" type="integer" length="1" lengthunit="bit"/>
<number name="TM32 Compatibility" id="1131" type="integer" length="1" lengthunit="bit"/>
<number name="TM31 Compatibility" id="1132" type="integer" length="1" lengthunit="bit"/>
<number name="TM30 Compatibility" id="1133" type="integer" length="1" lengthunit="bit"/>
<number name="TM29 Compatibility" id="1134" type="integer" length="1" lengthunit="bit"/>
<number name="TM28 Compatibility" id="1135" type="integer" length="1" lengthunit="bit"/>
<number name="TM27 Compatibility" id="1136" type="integer" length="1" lengthunit="bit"/>
<number name="TM26 Compatibility" id="1137" type="integer" length="1" lengthunit="bit"/>
<number name="TM25 Compatibility" id="1138" type="integer" length="1" lengthunit="bit"/>
<number name="TM40 Compatibility" id="1139" type="integer" length="1" lengthunit="bit"/>
<number name="TM39 Compatibility" id="1140" type="integer" length="1" lengthunit="bit"/>
<number name="TM38 Compatibility" id="1141" type="integer" length="1" lengthunit="bit"/>
<number name="TM37 Compatibility" id="1142" type="integer" length="1" lengthunit="bit"/>
<number name="TM36 Compatibility" id="1143" type="integer" length="1" lengthunit="bit"/>
<number name="TM35 Compatibility" id="1144" type="integer" length="1" lengthunit="bit"/>
<number name="TM34 Compatibility" id="1145" type="integer" length="1" lengthunit="bit"/>
<number name="TM33 Compatibility" id="1146" type="integer" length="1" lengthunit="bit"/>
<number name="TM48 Compatibility" id="1147" type="integer" length="1" lengthunit="bit"/>
<number name="TM47 Compatibility" id="1148" type="integer" length="1" lengthunit="bit"/>
<number name="TM46 Compatibility" id="1149" type="integer" length="1" lengthunit="bit"/>
<number name="TM45 Compatibility" id="1150" type="integer" length="1" lengthunit="bit"/>
<number name="TM44 Compatibility" id="1151" type="integer" length="1" lengthunit="bit"/>
<number name="TM43 Compatibility" id="1152" type="integer" length="1" lengthunit="bit"/>
<number name="TM42 Compatibility" id="1153" type="integer" length="1" lengthunit="bit"/>
<number name="TM41 Compatibility" id="1154" type="integer" length="1" lengthunit="bit"/>
<number name="HM06 Compatibility" id="1155" type="integer" length="1" lengthunit="bit"/>
<number name="HM05 Compatibility" id="1156" type="integer" length="1" lengthunit="bit"/>
<number name="HM04 Compatibility" id="1157" type="integer" length="1" lengthunit="bit"/>
<number name="HM03 Compatibility" id="1158" type="integer" length="1" lengthunit="bit"/>
<number name="HM02 Compatibility" id="1159" type="integer" length="1" lengthunit="bit"/>
<number name="HM01 Compatibility" id="1160" type="integer" length="1" lengthunit="bit"/>
<number name="TM50 Compatibility" id="1161" type="integer" length="1" lengthunit="bit"/>
<number name="TM49 Compatibility" id="1162" type="integer" length="1" lengthunit="bit"/>
<binary name="<padding>" id="1163" strokecolor="929292" fillcolor="929292" length="6" lengthunit="bit"/>
<number name="HM08 Compatibility" id="1164" type="integer" length="1" lengthunit="bit"/>
<number name="HM07 Compatibility" id="1165" type="integer" length="1" lengthunit="bit"/>
</structure>
<structure name="Experience Tables" id="119" length="3232" encoding="ISO_8859-1:1987" endian="little" signed="no">
<structref name="Medium Fast" id="1168" structure="id:1167"/>
<structref name="Erratic" id="1169" structure="id:1167"/>
<structref name="Fluctuating" id="1170" structure="id:1167"/>
<structref name="Medium Slow" id="1171" structure="id:1167"/>
<structref name="Fast" id="1172" structure="id:1167"/>
<structref name="Slow" id="1173" structure="id:1167"/>
<binary name="Unused Tables" id="1174" strokecolor="919191" fillcolor="919191" length="808"/>
</structure>
<structure name="Experience Table" id="1167" length="404" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Experience for Level" id="1176" repeatmin="101" repeatmax="101" type="integer" length="4"/>
</structure>
<structure name="Pokémon Base Stats" id="121" encoding="ISO_8859-1:1987" endian="big" signed="no">
<structref name="Base Stats" id="1179" repeatmin="412" repeatmax="412" structure="id:1178"/>
</structure>
<structure name="Pokémon Base Stat Data" id="1178" length="28" alignment="4" encoding="ISO_8859-1:1987" endian="little" signed="no">
<number name="Base HP" id="1181" type="integer" length="1"/>
<number name="Base Attack" id="1182" type="integer" length="1"/>
<number name="Base Defense" id="1183" type="integer" length="1"/>
<number name="Base Speed" id="1184" type="integer" length="1"/>
<number name="Base Sp. Attack" id="1185" type="integer" length="1"/>
<number name="Base Sp. Defense" id="1186" type="integer" length="1"/>
<number name="Type" id="1187" repeatmin="2" repeatmax="2" type="integer" length="1">
<fixedvalues>
<fixedvalue name="Normal" value="0"/>
<fixedvalue name="Fighting" value="1"/>
<fixedvalue name="Flying" value="2"/>
<fixedvalue name="Poison" value="3"/>
<fixedvalue name="Ground" value="4"/>
<fixedvalue name="Rock" value="5"/>
<fixedvalue name="Bug" value="6"/>
<fixedvalue name="Ghost" value="7"/>
<fixedvalue name="Steel" value="8"/>
<fixedvalue name="???" value="9"/>
<fixedvalue name="Fire" value="10"/>
<fixedvalue name="Water" value="11"/>
<fixedvalue name="Grass" value="12"/>
<fixedvalue name="Electric" value="13"/>
<fixedvalue name="Psychic" value="14"/>
<fixedvalue name="Ice" value="15"/>
<fixedvalue name="Dragon" value="16"/>
<fixedvalue name="Dark" value="17"/>