annotate clojure/com/aurellem/exp/notes.txt @ 297:528dc923d4c5

mapping out characters-as-items to avoid corrupt items.
author Robert McIntyre <rlm@mit.edu>
date Fri, 30 Mar 2012 22:35:08 -0500
parents d35683bfc15f
children 95afeea88c3a
rev   line source
rlm@240 1 ******** Game Sequence
rlm@240 2
rlm@239 3 start game
rlm@239 4
rlm@240 5 name rival "<space><PK>G<PK>G<PK>"
rlm@240 6 (0x7F 0xE1 0x86 0xE1 0x86 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@290 19 buy 1 pokeball, 1 potion, 1 antidote, 1 parlyz heal, 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@241 32 [repeat following 35 times]
rlm@290 33 0xFF
rlm@241 34 0x01
rlm@290 35 [end repeat]
rlm@240 36
rlm@240 37 0x00
rlm@241 38 0xFA -- first part of "Load A from Literal address"
rlm@240 39
rlm@240 40 third rival's name character
rlm@241 41 xD5 -- target item address
rlm@240 42
rlm@240 43 0x00
rlm@241 44 0x3C -- increment A register
rlm@240 45
rlm@240 46 0x00
rlm@241 47 0xEA -- first part of "Save A to literal address"
rlm@240 48
rlm@240 49 fifth rival's name character
rlm@241 50 xD5 -- target item address
rlm@240 51
rlm@240 52 0x00
rlm@241 53 0xC3 -- first part of "Absolute Jump to literal address"
rlm@240 54
rlm@240 55 burn-heal
rlm@241 56 x 95 -- address of Route 3 memory-function
rlm@240 57
rlm@241 58 0x00
rlm@241 59 0x??
rlm@240 60
rlm@290 61 Drop enough from rival's first character/ second character
rlm@290 62 as an item so that it is [0x7F 0xD5] instead of [0x7F 0xE1].
rlm@290 63
rlm@240 64 shift rival's name's first two characters into
rlm@290 65 mem-function-address.
rlm@240 66
rlm@240 67 now close the menu and continue item manipulations using the
rlm@240 68 newly constructed program. Starting and then canceling the
rlm@240 69 start menu activates the program.
rlm@240 70
rlm@240 71 ********** END Game Sequence
rlm@240 72
rlm@240 73
rlm@240 74
rlm@240 75
rlm@293 76 [repeat 35 times]
rlm@293 77 0xFF
rlm@293 78 0x01
rlm@293 79 [end repeat]
rlm@293 80
rlm@293 81
rlm@293 82 ;;; program to swap item ID and quantity at fixed address.
rlm@293 83 ;; here target is equal to rival's thrid and fourth character
rlm@293 84
rlm@293 85
rlm@293 86 0x00
rlm@293 87 0x21 ;; load target into HL
rlm@293 88
rlm@293 89 third rival's name character
rlm@295 90 xD5 -- target item address
rlm@293 91
rlm@293 92 0x00
rlm@293 93 0x2A ;; save (HL)=(target) to A, increment HL
rlm@293 94
rlm@293 95 0x00
rlm@295 96 0x47 ;; save A to B
rlm@293 97
rlm@293 98 0x00
rlm@293 99 0x3A ;; save (target+1) to A, decrement HL
rlm@293 100
rlm@293 101 0x00
rlm@293 102 0x22 ;; save A to target, increment HL [(target+1) -> target]
rlm@293 103
rlm@293 104 0x00
rlm@295 105 0x70 ;; load B into target+1 [(target) -> target+1]
rlm@293 106
rlm@293 107
rlm@293 108
rlm@240 109
rlm@240 110
rlm@240 111
rlm@240 112
rlm@240 113
rlm@240 114 valid start addresses for the initial bootstrap program are
rlm@240 115 the following:
rlm@240 116
rlm@240 117 0xD31D - 0xD41B
rlm@240 118 --OR--
rlm@240 119 0xD53A - 0XD59C
rlm@297 120
rlm@297 121
rlm@297 122
rlm@297 123 valid character-items:
rlm@297 124
rlm@297 125 0x7F " " ;space [x]
rlm@297 126 0x80 "A" ; [x]
rlm@297 127 0x81 "B" ; [x]
rlm@297 128 0x82 "C" ; [x]
rlm@297 129 0x83 "D" ; [x]
rlm@297 130 0x84 "E" ; [x]
rlm@297 131 0x85 "F" ; [x]
rlm@297 132 0x86 "G" ; [x]
rlm@297 133 0x87 "H" ; [x]
rlm@297 134 0x88 "I" ; [x]
rlm@297 135 0x89 "J" ; [x]
rlm@297 136 0x8A "K" ; [x]
rlm@297 137 0x8B "L" ; [good]
rlm@297 138 0x8C "M" ; [x]
rlm@297 139 0x8D "N" ; [x]
rlm@297 140 --- last valid character for program start
rlm@297 141 0x8E "O" ; [ ]
rlm@297 142 0x8F "P" ; [ ]
rlm@297 143 0x90 "Q" ; [ ]
rlm@297 144 0x91 "R" ; [ ]
rlm@297 145 0x92 "S" ; [ ]
rlm@297 146 0x93 "T" ; [ ]
rlm@297 147 0x94 "U" ; [ ]
rlm@297 148 0x95 "V" ; [ ]
rlm@297 149 0x96 "W" ; [ ]
rlm@297 150 0x97 "X" ; [ ]
rlm@297 151 0x98 "Y" ; [ ]
rlm@297 152 0x99 "Z" ; [ ]
rlm@297 153 0x9A "(" ; [ ]
rlm@297 154 0x9B ")" ; [ ]
rlm@297 155 0x9C ":" ; [ ]
rlm@297 156 --- last valid character for target