view clojure/com/aurellem/exp/notes.txt @ 300:bc1f62b269b5

found program that works as valid items, but now the program is too long...
author Robert McIntyre <rlm@mit.edu>
date Fri, 30 Mar 2012 23:05:38 -0500
parents eb8d1d7941ec
children 1de6aada1cb7
line wrap: on
line source
1 ******** Game Sequence
3 start game
5 name rival "L<PK>T<PK>"
6 (0x8B 0xE1 0x93 0xE1 in character codes)
8 get pikachu, fight rival, deliver oak's parcel, go back to
9 viridian poke mart.
11 Perform save corruption.
13 switch 6th pokemon with 9th to set current-items to 0xFF
15 Sell 254 cancel-buttons to get a bunch of money.
17 buy a pokeball to repair item-list
19 buy 1 potion, 1 antidote, 1 parlyz heal, 2 pokeballs, and
20 96 burn heals
22 95 burn heals spells out the address that will safely return
23 control to the pokemon kernel.
25 switch 5th pokemon with 9th to set current-items to 0xFF,
26 corrupting the item-list again.
28 Deposit things from your item list to get the following
29 pattern in the item computer. You can do this with what is
30 in your item list because of the previous setup.
32 [repeat following 35 times]
33 0xFF
34 0x01
35 [end repeat]
37 ;;; program to swap item ID and quantity at fixed address.
38 ;; here target is equal to rival's thrid and fourth character
40 0x00
41 0x21 ;; load target into HL
43 third rival's name character
44 xD5 -- target item address
46 0x00
47 0x18 ;; jump relative
49 pokeball ;; pokeball = 0x04, so
50 x any ;; jump over the next four bytes
52 target-item type
53 target-item quantity
55 0x00
56 0x2A ;; save (HL)=(target) to A, increment HL
58 0x00
59 0x47 ;; save A to B
61 0x00
62 0x3A ;; save (target+1) to A, decrement HL
64 0x00
65 0x22 ;; save A to target, increment HL [(target+1) -> target]
67 0x00
68 0x70 ;; load B into target+1 [(target) -> target+1]
70 0x00
71 0xC3 ;; first part of absolute jump
73 burn-heal
74 x 95 -- address of Route 3 memory-function
77 Drop enough from rival's first character/ second character
78 as an item so that it is [_ 0xD5] instead of [_ 0xE1].
80 shift rival's name's first two characters into
81 mem-function-address.
83 now close the menu and continue item manipulations using the
84 newly constructed program. Starting and then canceling the
85 start menu activates the program.
87 ********** END Game Sequence
94 ************ Misc Notes.
96 valid start addresses for the initial bootstrap program are
97 the following:
99 0xD31D - 0xD41B
100 --OR--
101 0xD53A - 0XD59C
105 valid character-items:
107 0x7F " " ;space [x]
108 0x80 "A" ; [x]
109 0x81 "B" ; [x]
110 0x82 "C" ; [x]
111 0x83 "D" ; [x]
112 0x84 "E" ; [x]
113 0x85 "F" ; [x]
114 0x86 "G" ; [x]
115 0x87 "H" ; [x]
116 0x88 "I" ; [x]
117 0x89 "J" ; [x]
118 0x8A "K" ; [x]
119 0x8B "L" ; [good]
120 0x8C "M" ; [x]
121 0x8D "N" ; [x]
122 --- last valid character for program start
123 0x8E "O" ; [x]
124 0x8F "P" ; [x]
125 0x90 "Q" ; [x]
126 0x91 "R" ; [x]
127 0x92 "S" ; [x]
128 0x93 "T" ; [good]
129 0x94 "U" ; [good]
130 0x95 "V" ; [good]
131 0x96 "W" ; [x]
132 0x97 "X" ; [x]
133 0x98 "Y" ; [key]
134 0x99 "Z" ; [x]
135 0x9A "(" ; [key]
136 0x9B ")" ; [x]
137 0x9C ":" ; [x]
138 --- last valid character for target