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