changeset 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
files clojure/com/aurellem/exp/notes.txt clojure/com/aurellem/run/bootstrap_0.clj
diffstat 2 files changed, 66 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/notes.txt	Fri Mar 30 23:39:58 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/notes.txt	Sat Mar 31 00:05:39 2012 -0500
     1.3 @@ -2,8 +2,8 @@
     1.4  
     1.5  start game
     1.6  
     1.7 -name rival "L<PK>T<PK><PK><any-character>" 
     1.8 -(0x8B 0xE1 0x93 0xE1 in character codes)
     1.9 +name rival "L<PK>U<PK><PK><any-character>" 
    1.10 +(0x8B 0xE1 0x94 0xE1 in character codes)
    1.11  
    1.12  get pikachu, fight rival, deliver oak's parcel, go back to
    1.13  viridian poke mart.
    1.14 @@ -29,7 +29,7 @@
    1.15  pattern in the item computer.  You can do this with what is
    1.16  in your item list because of the previous setup.
    1.17  
    1.18 -[repeat the following 24 times]
    1.19 +[repeat the following 25 times]
    1.20  0xFF	
    1.21  0x01
    1.22  [end repeat]
    1.23 @@ -55,18 +55,18 @@
    1.24  0x00
    1.25  0xC3  ;; first part of absolute jump
    1.26  
    1.27 -burn-heal
    1.28 -x 95          -- address of Route 3 memory-function
    1.29 +burn-heal   (0x0C) 
    1.30 +x 95        (0x5F)  -- address of Route 3 memory-function
    1.31  
    1.32  [repeat the following 8 times]
    1.33  0xFF
    1.34  0x01
    1.35  [end repeat]
    1.36  
    1.37 -0x00  ;; this starts at address 0xD58B
    1.38 +0x00  ;; this starts at address 0xD58A
    1.39  0x21  ;; load target into HL
    1.40  
    1.41 -third rival's name character
    1.42 +third rival's name character (U == 0x94)
    1.43  x D5     -- target item address
    1.44  
    1.45  0x00
    1.46 @@ -75,8 +75,11 @@
    1.47  fifth rival's name character (PK) (TM25) (0xE1 == -31)
    1.48  x any
    1.49  
    1.50 -target-item type
    1.51 -target-item quantity
    1.52 +0xFF
    1.53 +0x01
    1.54 +
    1.55 +target-item type  (at 0xD594)
    1.56 +target-item quantity (at 0xD595)
    1.57  
    1.58  
    1.59  
     2.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj	Fri Mar 30 23:39:58 2012 -0500
     2.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Sat Mar 31 00:05:39 2012 -0500
     2.3 @@ -784,3 +784,57 @@
     2.4            (do-nothing 1))))
     2.5      
     2.6  
     2.7 +
     2.8 +(defn test-pc-item-program []
     2.9 +  (-> (read-state "bootstrap-init")
    2.10 +      (set-memory pc-item-list-start 50)
    2.11 +      (set-memory-range
    2.12 +
    2.13 +       (inc pc-item-list-start)
    2.14 +       (flatten
    2.15 +        [
    2.16 +         (repeat
    2.17 +          25
    2.18 +          [0xFF 0x01])
    2.19 +         [0x00   ;;  second part of item manipulation program
    2.20 +          0x2A   
    2.21 +          
    2.22 +          0x00
    2.23 +          0x47   
    2.24 +          
    2.25 +          0x00
    2.26 +          0x3A
    2.27 +
    2.28 +          0x00
    2.29 +          0x22
    2.30 +
    2.31 +          0x00
    2.32 +          0X70
    2.33 +
    2.34 +          0x00
    2.35 +          0xC3
    2.36 +
    2.37 +          0x0C
    2.38 +          0x5F]
    2.39 +         (repeat
    2.40 +          8
    2.41 +          [0xFF 0x01])
    2.42 +
    2.43 +         [0x00
    2.44 +          0x21
    2.45 +
    2.46 +          0x93
    2.47 +          0xD5
    2.48 +
    2.49 +          0x00
    2.50 +          0x18
    2.51 +
    2.52 +          0xE1
    2.53 +          0x01
    2.54 +
    2.55 +          0xFF
    2.56 +          0x01
    2.57 +          
    2.58 +          0x04  ;; target ID
    2.59 +          0x3E  ;; target Quantity
    2.60 +          ]]))))