rlm@240: ******** Game Sequence rlm@240: rlm@239: start game rlm@239: rlm@302: name rival "LU" rlm@332: (0x8B 0xE1 0x95 0xE1 0xE1 0x in character codes) rlm@240: rlm@290: get pikachu, fight rival, deliver oak's parcel, go back to rlm@290: viridian poke mart. rlm@239: rlm@290: Perform save corruption. rlm@239: rlm@290: switch 6th pokemon with 9th to set current-items to 0xFF rlm@239: rlm@290: Sell 254 cancel-buttons to get a bunch of money. rlm@239: rlm@290: buy a pokeball to repair item-list rlm@290: rlm@300: buy 1 potion, 1 antidote, 1 parlyz heal, 2 pokeballs, and rlm@290: 96 burn heals rlm@290: rlm@290: 95 burn heals spells out the address that will safely return rlm@290: control to the pokemon kernel. rlm@290: rlm@290: switch 5th pokemon with 9th to set current-items to 0xFF, rlm@290: corrupting the item-list again. rlm@290: rlm@290: Deposit things from your item list to get the following rlm@290: pattern in the item computer. You can do this with what is rlm@290: in your item list because of the previous setup. rlm@239: rlm@302: [repeat the following 25 times] rlm@290: 0xFF rlm@241: 0x01 rlm@290: [end repeat] rlm@240: rlm@301: ;; Second part of program to swap item ID and quantity at rlm@301: ;; fixed address. rlm@293: rlm@332: 0x00 ;; decrement HL rlm@332: 0x2B rlm@332: rlm@301: 0x00 ;; this starts at address 0xD56C rlm@293: 0x2A ;; save (HL)=(target) to A, increment HL rlm@293: rlm@293: 0x00 rlm@295: 0x47 ;; save A to B rlm@293: rlm@293: 0x00 rlm@293: 0x3A ;; save (target+1) to A, decrement HL rlm@293: rlm@293: 0x00 rlm@293: 0x22 ;; save A to target, increment HL [(target+1) -> target] rlm@301: rlm@293: 0x00 rlm@295: 0x70 ;; load B into target+1 [(target) -> target+1] rlm@293: rlm@300: 0x00 rlm@303: 0xC3 ;; first part of absolute jump rlm@293: rlm@302: burn-heal (0x0C) rlm@302: x 95 (0x5F) -- address of Route 3 memory-function rlm@293: rlm@332: [repeat the following 4 times] rlm@301: 0xFF rlm@301: 0x01 rlm@301: [end repeat] rlm@240: rlm@303: ;; first part of item manipulation program rlm@303: rlm@302: 0x00 ;; this starts at address 0xD58A rlm@301: 0x21 ;; load target into HL rlm@301: rlm@302: third rival's name character (U == 0x94) rlm@301: x D5 -- target item address rlm@301: rlm@301: 0x00 rlm@301: 0x18 ;; jump relative rlm@301: rlm@301: fifth rival's name character (PK) (TM25) (0xE1 == -31) rlm@301: x any rlm@301: rlm@302: 0xFF rlm@302: 0x01 rlm@302: rlm@302: target-item type (at 0xD594) rlm@302: target-item quantity (at 0xD595) rlm@301: rlm@301: rlm@301: rlm@301: Drop enough from rival's first character/ third character rlm@300: as an item so that it is [_ 0xD5] instead of [_ 0xE1]. rlm@240: rlm@300: shift rival's name's first two characters into rlm@300: mem-function-address. rlm@240: rlm@300: now close the menu and continue item manipulations using the rlm@300: newly constructed program. Starting and then canceling the rlm@300: start menu activates the program. rlm@240: rlm@300: ********** END Game Sequence rlm@300: rlm@300: rlm@300: rlm@300: rlm@300: rlm@300: rlm@300: ************ Misc Notes. rlm@240: rlm@240: valid start addresses for the initial bootstrap program are rlm@240: the following: rlm@240: rlm@240: 0xD31D - 0xD41B rlm@240: --OR-- rlm@240: 0xD53A - 0XD59C rlm@297: rlm@297: rlm@297: rlm@297: valid character-items: rlm@297: rlm@297: 0x7F " " ;space [x] rlm@297: 0x80 "A" ; [x] rlm@297: 0x81 "B" ; [x] rlm@297: 0x82 "C" ; [x] rlm@297: 0x83 "D" ; [x] rlm@297: 0x84 "E" ; [x] rlm@297: 0x85 "F" ; [x] rlm@297: 0x86 "G" ; [x] rlm@297: 0x87 "H" ; [x] rlm@297: 0x88 "I" ; [x] rlm@297: 0x89 "J" ; [x] rlm@297: 0x8A "K" ; [x] rlm@297: 0x8B "L" ; [good] rlm@297: 0x8C "M" ; [x] rlm@297: 0x8D "N" ; [x] rlm@297: --- last valid character for program start rlm@298: 0x8E "O" ; [x] rlm@298: 0x8F "P" ; [x] rlm@298: 0x90 "Q" ; [x] rlm@298: 0x91 "R" ; [x] rlm@298: 0x92 "S" ; [x] rlm@298: 0x93 "T" ; [good] rlm@332: 0x94 "U" ; [good] [key :(] rlm@299: 0x95 "V" ; [good] rlm@299: 0x96 "W" ; [x] rlm@299: 0x97 "X" ; [x] rlm@299: 0x98 "Y" ; [key] rlm@299: 0x99 "Z" ; [x] rlm@299: 0x9A "(" ; [key] rlm@299: 0x9B ")" ; [x] rlm@299: 0x9C ":" ; [x] rlm@297: --- last valid character for target rlm@301: rlm@301: rlm@301: rlm@301: ;;; character canadates for jump-relative backwards rlm@301: rlm@301: 0xE1 "PK" ; [TM25] rlm@301: 0xE2 "MN" ; [TM26] rlm@301: 0xE6 "?" ; [TM30] rlm@301: 0xE7 "!" ; [TM31] rlm@301: 0xE8 "." ; [TM32]