annotate clojure/com/aurellem/exp/notes.txt @ 302:0b3e89103dc2

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