changeset 290:dc9a0060e7cb

script: walked to poke-center computer.
author Robert McIntyre <rlm@mit.edu>
date Thu, 29 Mar 2012 17:38:36 -0500
parents df9cad9909d2
children c8b0db518de3
files clojure/com/aurellem/exp/notes.txt clojure/com/aurellem/run/bootstrap_0.clj
diffstat 2 files changed, 55 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/notes.txt	Thu Mar 29 13:49:40 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/notes.txt	Thu Mar 29 17:38:36 2012 -0500
     1.3 @@ -1,29 +1,38 @@
     1.4  ******** Game Sequence
     1.5  
     1.6 -
     1.7  start game
     1.8  
     1.9  name rival "<space><PK>G<PK>G<PK>" 
    1.10  (0x7F 0xE1 0x86 0xE1 0x86 0xE1 in character codes)
    1.11  
    1.12 -get pikachu, fight rival, deliver oak's parcel
    1.13 +get pikachu, fight rival, deliver oak's parcel, go back to
    1.14 +viridian poke mart.
    1.15  
    1.16 -buy 5 items from viridian store, with the last one being a
    1.17 -burn-heal.
    1.18 +Perform save corruption.
    1.19  
    1.20 -Perform save corruption. 
    1.21 -(save, restart during save, switch 6th pokemon with 9tn)
    1.22 +switch 6th pokemon with 9th to set current-items to 0xFF
    1.23  
    1.24 -move one of the other items that wasn't destroyed (but not
    1.25 -burn-heal) to the money counter to get a bunch of money.
    1.26 +Sell 254 cancel-buttons to get a bunch of money.
    1.27  
    1.28 -buy 95 more burn heals.  95 burn heals spells out the
    1.29 -address that will safely return control to the pokemon
    1.30 -kernel.
    1.31 +buy a pokeball to repair item-list
    1.32 +
    1.33 +buy 1 pokeball, 1 potion, 1 antidote, 1 parlyz heal, and
    1.34 +96 burn heals
    1.35 +
    1.36 +95 burn heals spells out the address that will safely return
    1.37 +control to the pokemon kernel.
    1.38 +
    1.39 +switch 5th pokemon with 9th to set current-items to 0xFF,
    1.40 +corrupting the item-list again.
    1.41 +
    1.42 +Deposit things from your item list to get the following
    1.43 +pattern in the item computer.  You can do this with what is
    1.44 +in your item list because of the previous setup.
    1.45  
    1.46  [repeat following 35 times]
    1.47 -0x00	
    1.48 +0xFF	
    1.49  0x01
    1.50 +[end repeat]
    1.51  
    1.52  0x00
    1.53  0xFA          -- first part of "Load A from Literal address"
    1.54 @@ -49,15 +58,16 @@
    1.55  0x00
    1.56  0x??
    1.57  
    1.58 +Drop enough from rival's first character/ second character
    1.59 +as an item so that it is [0x7F 0xD5] instead of [0x7F 0xE1].
    1.60 +
    1.61  shift rival's name's first two characters into
    1.62 -mem-function-address. 
    1.63 +mem-function-address.
    1.64  
    1.65  now close the menu and continue item manipulations using the
    1.66  newly constructed program.  Starting and then canceling the
    1.67  start menu activates the program.
    1.68  
    1.69 -
    1.70 -
    1.71  **********  END Game Sequence
    1.72  
    1.73  
     2.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj	Thu Mar 29 13:49:40 2012 -0500
     2.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Thu Mar 29 17:38:36 2012 -0500
     2.3 @@ -573,8 +573,9 @@
     2.4            scroll-text
     2.5            (play-moves
     2.6             ;; this section is copied from speedrun-2942 and corrupts
     2.7 -           ;; the save so that the end-of-list marker for the pokemon
     2.8 -           ;; roster is destroyed, but the save is still playable.
     2.9 +           ;; the save so that the total number of pokemon is set to
    2.10 +           ;; 0xFF, allowing manipulation of non-pokemon data in RAM
    2.11 +           ;; via the pokemon interface.
    2.12             [[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    2.13              [] [] [] [] [] [] [] [] [] [] [] [:select] [:restart]])
    2.14            (title)
    2.15 @@ -659,8 +660,6 @@
    2.16     (play-moves [[] [] [:a]])
    2.17     (scroll-text)
    2.18     (do-nothing 300)))
    2.19 -  
    2.20 -       
    2.21  
    2.22  (defn-memo corrupt-item-list-again
    2.23    ([] (corrupt-item-list-again (get-burn-heals)))
    2.24 @@ -681,10 +680,30 @@
    2.25            
    2.26            
    2.27  
    2.28 -(defn viridian-store->viridian-poke-center
    2.29 -  []
    2.30 -  ;; leave store
    2.31 -  ;;(walk [↓ ↓ 
    2.32 -  ;;       →  ↓ ↓])
    2.33 -    )      
    2.34 -          
    2.35 +(defn-memo viridian-store->viridian-poke-center
    2.36 +  ([] (viridian-store->viridian-poke-center
    2.37 +       (corrupt-item-list-again)))
    2.38 +  ([script]
    2.39 +     (->> script
    2.40 +          (do-nothing 100)
    2.41 +          (play-moves [[:b]])
    2.42 +          (do-nothing 100)
    2.43 +          (play-moves [[:b]])
    2.44 +          (do-nothing 40)
    2.45 +          ;; leave store
    2.46 +          (walk [↓ ↓ 
    2.47 +                 → ↓ ↓])
    2.48 +          (walk [← ← ← ←
    2.49 +                 ↓ ↓ ↓ ↓ ↓ ↓
    2.50 +                 ← ← ← ↑]))))
    2.51 +
    2.52 +(defn to-poke-center-computer
    2.53 +  ([] (to-poke-center-computer
    2.54 +       (viridian-store->viridian-poke-center)))
    2.55 +  ([script]
    2.56 +     (->> script
    2.57 +          (walk [→ →
    2.58 +                 ↑ ↑ ↑
    2.59 +                 → → → → → → → → → ↑])
    2.60 +          (do-nothing 1))))
    2.61 +