rlm@240
|
1 ******** Game Sequence
|
rlm@240
|
2
|
rlm@239
|
3 start game
|
rlm@239
|
4
|
rlm@301
|
5 name rival "L<PK>T<PK><PK><any-character>"
|
rlm@300
|
6 (0x8B 0xE1 0x93 0xE1 in character codes)
|
rlm@240
|
7
|
rlm@290
|
8 get pikachu, fight rival, deliver oak's parcel, go back to
|
rlm@290
|
9 viridian poke mart.
|
rlm@239
|
10
|
rlm@290
|
11 Perform save corruption.
|
rlm@239
|
12
|
rlm@290
|
13 switch 6th pokemon with 9th to set current-items to 0xFF
|
rlm@239
|
14
|
rlm@290
|
15 Sell 254 cancel-buttons to get a bunch of money.
|
rlm@239
|
16
|
rlm@290
|
17 buy a pokeball to repair item-list
|
rlm@290
|
18
|
rlm@300
|
19 buy 1 potion, 1 antidote, 1 parlyz heal, 2 pokeballs, and
|
rlm@290
|
20 96 burn heals
|
rlm@290
|
21
|
rlm@290
|
22 95 burn heals spells out the address that will safely return
|
rlm@290
|
23 control to the pokemon kernel.
|
rlm@290
|
24
|
rlm@290
|
25 switch 5th pokemon with 9th to set current-items to 0xFF,
|
rlm@290
|
26 corrupting the item-list again.
|
rlm@290
|
27
|
rlm@290
|
28 Deposit things from your item list to get the following
|
rlm@290
|
29 pattern in the item computer. You can do this with what is
|
rlm@290
|
30 in your item list because of the previous setup.
|
rlm@239
|
31
|
rlm@301
|
32 [repeat the following 24 times]
|
rlm@290
|
33 0xFF
|
rlm@241
|
34 0x01
|
rlm@290
|
35 [end repeat]
|
rlm@240
|
36
|
rlm@301
|
37 ;; Second part of program to swap item ID and quantity at
|
rlm@301
|
38 ;; fixed address.
|
rlm@293
|
39
|
rlm@301
|
40 0x00 ;; this starts at address 0xD56C
|
rlm@293
|
41 0x2A ;; save (HL)=(target) to A, increment HL
|
rlm@293
|
42
|
rlm@293
|
43 0x00
|
rlm@295
|
44 0x47 ;; save A to B
|
rlm@293
|
45
|
rlm@293
|
46 0x00
|
rlm@293
|
47 0x3A ;; save (target+1) to A, decrement HL
|
rlm@293
|
48
|
rlm@293
|
49 0x00
|
rlm@293
|
50 0x22 ;; save A to target, increment HL [(target+1) -> target]
|
rlm@301
|
51
|
rlm@293
|
52 0x00
|
rlm@295
|
53 0x70 ;; load B into target+1 [(target) -> target+1]
|
rlm@293
|
54
|
rlm@300
|
55 0x00
|
rlm@300
|
56 0xC3 ;; first part of absolute jump
|
rlm@293
|
57
|
rlm@300
|
58 burn-heal
|
rlm@300
|
59 x 95 -- address of Route 3 memory-function
|
rlm@293
|
60
|
rlm@301
|
61 [repeat the following 8 times]
|
rlm@301
|
62 0xFF
|
rlm@301
|
63 0x01
|
rlm@301
|
64 [end repeat]
|
rlm@240
|
65
|
rlm@301
|
66 0x00 ;; this starts at address 0xD58B
|
rlm@301
|
67 0x21 ;; load target into HL
|
rlm@301
|
68
|
rlm@301
|
69 third rival's name character
|
rlm@301
|
70 x D5 -- target item address
|
rlm@301
|
71
|
rlm@301
|
72 0x00
|
rlm@301
|
73 0x18 ;; jump relative
|
rlm@301
|
74
|
rlm@301
|
75 fifth rival's name character (PK) (TM25) (0xE1 == -31)
|
rlm@301
|
76 x any
|
rlm@301
|
77
|
rlm@301
|
78 target-item type
|
rlm@301
|
79 target-item quantity
|
rlm@301
|
80
|
rlm@301
|
81
|
rlm@301
|
82
|
rlm@301
|
83 Drop enough from rival's first character/ third character
|
rlm@300
|
84 as an item so that it is [_ 0xD5] instead of [_ 0xE1].
|
rlm@240
|
85
|
rlm@300
|
86 shift rival's name's first two characters into
|
rlm@300
|
87 mem-function-address.
|
rlm@240
|
88
|
rlm@300
|
89 now close the menu and continue item manipulations using the
|
rlm@300
|
90 newly constructed program. Starting and then canceling the
|
rlm@300
|
91 start menu activates the program.
|
rlm@240
|
92
|
rlm@300
|
93 ********** END Game Sequence
|
rlm@300
|
94
|
rlm@300
|
95
|
rlm@300
|
96
|
rlm@300
|
97
|
rlm@300
|
98
|
rlm@300
|
99
|
rlm@300
|
100 ************ Misc Notes.
|
rlm@240
|
101
|
rlm@240
|
102 valid start addresses for the initial bootstrap program are
|
rlm@240
|
103 the following:
|
rlm@240
|
104
|
rlm@240
|
105 0xD31D - 0xD41B
|
rlm@240
|
106 --OR--
|
rlm@240
|
107 0xD53A - 0XD59C
|
rlm@297
|
108
|
rlm@297
|
109
|
rlm@297
|
110
|
rlm@297
|
111 valid character-items:
|
rlm@297
|
112
|
rlm@297
|
113 0x7F " " ;space [x]
|
rlm@297
|
114 0x80 "A" ; [x]
|
rlm@297
|
115 0x81 "B" ; [x]
|
rlm@297
|
116 0x82 "C" ; [x]
|
rlm@297
|
117 0x83 "D" ; [x]
|
rlm@297
|
118 0x84 "E" ; [x]
|
rlm@297
|
119 0x85 "F" ; [x]
|
rlm@297
|
120 0x86 "G" ; [x]
|
rlm@297
|
121 0x87 "H" ; [x]
|
rlm@297
|
122 0x88 "I" ; [x]
|
rlm@297
|
123 0x89 "J" ; [x]
|
rlm@297
|
124 0x8A "K" ; [x]
|
rlm@297
|
125 0x8B "L" ; [good]
|
rlm@297
|
126 0x8C "M" ; [x]
|
rlm@297
|
127 0x8D "N" ; [x]
|
rlm@297
|
128 --- last valid character for program start
|
rlm@298
|
129 0x8E "O" ; [x]
|
rlm@298
|
130 0x8F "P" ; [x]
|
rlm@298
|
131 0x90 "Q" ; [x]
|
rlm@298
|
132 0x91 "R" ; [x]
|
rlm@298
|
133 0x92 "S" ; [x]
|
rlm@298
|
134 0x93 "T" ; [good]
|
rlm@299
|
135 0x94 "U" ; [good]
|
rlm@299
|
136 0x95 "V" ; [good]
|
rlm@299
|
137 0x96 "W" ; [x]
|
rlm@299
|
138 0x97 "X" ; [x]
|
rlm@299
|
139 0x98 "Y" ; [key]
|
rlm@299
|
140 0x99 "Z" ; [x]
|
rlm@299
|
141 0x9A "(" ; [key]
|
rlm@299
|
142 0x9B ")" ; [x]
|
rlm@299
|
143 0x9C ":" ; [x]
|
rlm@297
|
144 --- last valid character for target
|
rlm@301
|
145
|
rlm@301
|
146
|
rlm@301
|
147
|
rlm@301
|
148 ;;; character canadates for jump-relative backwards
|
rlm@301
|
149
|
rlm@301
|
150 0xE1 "PK" ; [TM25]
|
rlm@301
|
151 0xE2 "MN" ; [TM26]
|
rlm@301
|
152 0xE6 "?" ; [TM30]
|
rlm@301
|
153 0xE7 "!" ; [TM31]
|
rlm@301
|
154 0xE8 "." ; [TM32]
|