rlm@240
|
1 ******** Game Sequence
|
rlm@240
|
2
|
rlm@239
|
3 start game
|
rlm@239
|
4
|
rlm@302
|
5 name rival "L<PK>U<PK><PK><any-character>"
|
rlm@330
|
6 (0x8B 0xE1 0x94 0xE1 0xE1 0x<any> 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@302
|
32 [repeat the following 25 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@303
|
56 0xC3 ;; first part of absolute jump
|
rlm@293
|
57
|
rlm@302
|
58 burn-heal (0x0C)
|
rlm@302
|
59 x 95 (0x5F) -- 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@303
|
66 ;; first part of item manipulation program
|
rlm@303
|
67
|
rlm@302
|
68 0x00 ;; this starts at address 0xD58A
|
rlm@301
|
69 0x21 ;; load target into HL
|
rlm@301
|
70
|
rlm@302
|
71 third rival's name character (U == 0x94)
|
rlm@301
|
72 x D5 -- target item address
|
rlm@301
|
73
|
rlm@301
|
74 0x00
|
rlm@301
|
75 0x18 ;; jump relative
|
rlm@301
|
76
|
rlm@301
|
77 fifth rival's name character (PK) (TM25) (0xE1 == -31)
|
rlm@301
|
78 x any
|
rlm@301
|
79
|
rlm@302
|
80 0xFF
|
rlm@302
|
81 0x01
|
rlm@302
|
82
|
rlm@302
|
83 target-item type (at 0xD594)
|
rlm@302
|
84 target-item quantity (at 0xD595)
|
rlm@301
|
85
|
rlm@301
|
86
|
rlm@301
|
87
|
rlm@301
|
88 Drop enough from rival's first character/ third character
|
rlm@300
|
89 as an item so that it is [_ 0xD5] instead of [_ 0xE1].
|
rlm@240
|
90
|
rlm@300
|
91 shift rival's name's first two characters into
|
rlm@300
|
92 mem-function-address.
|
rlm@240
|
93
|
rlm@300
|
94 now close the menu and continue item manipulations using the
|
rlm@300
|
95 newly constructed program. Starting and then canceling the
|
rlm@300
|
96 start menu activates the program.
|
rlm@240
|
97
|
rlm@300
|
98 ********** END Game Sequence
|
rlm@300
|
99
|
rlm@300
|
100
|
rlm@300
|
101
|
rlm@300
|
102
|
rlm@300
|
103
|
rlm@300
|
104
|
rlm@300
|
105 ************ Misc Notes.
|
rlm@240
|
106
|
rlm@240
|
107 valid start addresses for the initial bootstrap program are
|
rlm@240
|
108 the following:
|
rlm@240
|
109
|
rlm@240
|
110 0xD31D - 0xD41B
|
rlm@240
|
111 --OR--
|
rlm@240
|
112 0xD53A - 0XD59C
|
rlm@297
|
113
|
rlm@297
|
114
|
rlm@297
|
115
|
rlm@297
|
116 valid character-items:
|
rlm@297
|
117
|
rlm@297
|
118 0x7F " " ;space [x]
|
rlm@297
|
119 0x80 "A" ; [x]
|
rlm@297
|
120 0x81 "B" ; [x]
|
rlm@297
|
121 0x82 "C" ; [x]
|
rlm@297
|
122 0x83 "D" ; [x]
|
rlm@297
|
123 0x84 "E" ; [x]
|
rlm@297
|
124 0x85 "F" ; [x]
|
rlm@297
|
125 0x86 "G" ; [x]
|
rlm@297
|
126 0x87 "H" ; [x]
|
rlm@297
|
127 0x88 "I" ; [x]
|
rlm@297
|
128 0x89 "J" ; [x]
|
rlm@297
|
129 0x8A "K" ; [x]
|
rlm@297
|
130 0x8B "L" ; [good]
|
rlm@297
|
131 0x8C "M" ; [x]
|
rlm@297
|
132 0x8D "N" ; [x]
|
rlm@297
|
133 --- last valid character for program start
|
rlm@298
|
134 0x8E "O" ; [x]
|
rlm@298
|
135 0x8F "P" ; [x]
|
rlm@298
|
136 0x90 "Q" ; [x]
|
rlm@298
|
137 0x91 "R" ; [x]
|
rlm@298
|
138 0x92 "S" ; [x]
|
rlm@298
|
139 0x93 "T" ; [good]
|
rlm@299
|
140 0x94 "U" ; [good]
|
rlm@299
|
141 0x95 "V" ; [good]
|
rlm@299
|
142 0x96 "W" ; [x]
|
rlm@299
|
143 0x97 "X" ; [x]
|
rlm@299
|
144 0x98 "Y" ; [key]
|
rlm@299
|
145 0x99 "Z" ; [x]
|
rlm@299
|
146 0x9A "(" ; [key]
|
rlm@299
|
147 0x9B ")" ; [x]
|
rlm@299
|
148 0x9C ":" ; [x]
|
rlm@297
|
149 --- last valid character for target
|
rlm@301
|
150
|
rlm@301
|
151
|
rlm@301
|
152
|
rlm@301
|
153 ;;; character canadates for jump-relative backwards
|
rlm@301
|
154
|
rlm@301
|
155 0xE1 "PK" ; [TM25]
|
rlm@301
|
156 0xE2 "MN" ; [TM26]
|
rlm@301
|
157 0xE6 "?" ; [TM30]
|
rlm@301
|
158 0xE7 "!" ; [TM31]
|
rlm@301
|
159 0xE8 "." ; [TM32]
|