changeset 247:22f58fa47c3c

starting work on unoptimized bootstrap script.
author Robert McIntyre <rlm@mit.edu>
date Mon, 26 Mar 2012 03:08:54 -0500
parents 27ca947084cf
children e94d20ad853e
files clojure/com/aurellem/exp/cartography clojure/com/aurellem/exp/item_bridge.clj clojure/com/aurellem/exp/notes.txt clojure/com/aurellem/gb/items.clj clojure/com/aurellem/gb/util.clj clojure/com/aurellem/run/bootstrap_0.clj
diffstat 6 files changed, 55 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/cartography	Sun Mar 25 22:33:17 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/cartography	Mon Mar 26 03:08:54 2012 -0500
     1.3 @@ -496,7 +496,7 @@
     1.4  D351                   |                           T
     1.5  D352                   |                           Q
     1.6  D353                   \                           T
     1.7 -D354                   Text Speed                  Q
     1.8 +D354                   Text Speed (Settings)       Q
     1.9  D355                   Badges                      T
    1.10  D356                                               Q
    1.11  D357                                               T
     2.1 --- a/clojure/com/aurellem/exp/item_bridge.clj	Sun Mar 25 22:33:17 2012 -0500
     2.2 +++ b/clojure/com/aurellem/exp/item_bridge.clj	Mon Mar 26 03:08:54 2012 -0500
     2.3 @@ -217,3 +217,41 @@
     2.4      ]))
     2.5  
     2.6  
     2.7 +
     2.8 +(def pc-item-list-start 0xD539)
     2.9 +(def pc-item-list-width 101)
    2.10 +
    2.11 +(def corrupted-items-width 512)
    2.12 +
    2.13 +(defn items-record
    2.14 +  ([^SaveState state]
    2.15 +     (subvec (vec (memory state))
    2.16 +             item-list-start
    2.17 +             (+ item-list-start corrupted-items-width)))
    2.18 +  ([] (items-record @current-state)))
    2.19 +
    2.20 +(defn pc-items-record
    2.21 +  ([^SaveState state]
    2.22 +     (subvec (vec (memory state))
    2.23 +             pc-item-list-start
    2.24 +             (+ pc-item-list-width pc-item-list-start)))
    2.25 +  ([] (pc-items-record @current-state)))
    2.26 +             
    2.27 +(defn print-listing-items
    2.28 +  ([^SaveState state]
    2.29 +     (print-listing state item-list-start
    2.30 +                    (+ item-list-start corrupted-items-width))
    2.31 +     state)
    2.32 +  ([] (print-listing-items @current-state)))
    2.33 +
    2.34 +(defn print-listing-pc-items
    2.35 +  ([^SaveState state]
    2.36 +     (print-listing
    2.37 +      state
    2.38 +      pc-item-list-start
    2.39 +      (+ pc-item-list-width pc-item-list-start))
    2.40 +     state)
    2.41 +  ([] (print-listing-pc-items @current-state)))
    2.42 +  
    2.43 +                     
    2.44 +      
    2.45 \ No newline at end of file
     3.1 --- a/clojure/com/aurellem/exp/notes.txt	Sun Mar 25 22:33:17 2012 -0500
     3.2 +++ b/clojure/com/aurellem/exp/notes.txt	Mon Mar 26 03:08:54 2012 -0500
     3.3 @@ -11,7 +11,8 @@
     3.4  buy 5 items from viridian store, with the last one being a
     3.5  burn-heal.
     3.6  
     3.7 -Perform save corruption.
     3.8 +Perform save corruption. 
     3.9 +(save, restart during save, switch 6th pokemon with 9tn)
    3.10  
    3.11  move one of the other items that wasn't destroyed (but not
    3.12  burn-heal) to the money counter to get a bunch of money.
     4.1 --- a/clojure/com/aurellem/gb/items.clj	Sun Mar 25 22:33:17 2012 -0500
     4.2 +++ b/clojure/com/aurellem/gb/items.clj	Mon Mar 26 03:08:54 2012 -0500
     4.3 @@ -228,4 +228,3 @@
     4.4    ([^SaveState state]
     4.5       (set-inventory state []))
     4.6    ([] (clear-inventory @current-state)))
     4.7 -
     5.1 --- a/clojure/com/aurellem/gb/util.clj	Sun Mar 25 22:33:17 2012 -0500
     5.2 +++ b/clojure/com/aurellem/gb/util.clj	Mon Mar 26 03:08:54 2012 -0500
     5.3 @@ -47,7 +47,10 @@
     5.4    ([^SaveState state begin end]
     5.5       (dorun (map 
     5.6               (fn [opcode line]
     5.7 -               (println (format "0x%04X:  0x%02X" line opcode)))
     5.8 +               (println (format "0x%04X: 0x%02X %s %d"
     5.9 +                                line
    5.10 +                                opcode (binary-str opcode)
    5.11 +                                opcode)))
    5.12               (subvec  (vec (memory state)) begin end)
    5.13               (range begin end)))
    5.14       state)
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Mon Mar 26 03:08:54 2012 -0500
     6.3 @@ -0,0 +1,10 @@
     6.4 +(ns com.aurellem.run.bootstrap-0
     6.5 +  (:use (com.aurellem.gb gb-driver vbm))
     6.6 +  (:use (com.aurellem.run title save-corruption)))
     6.7 +
     6.8 +
     6.9 +(defn-memo boot-0 []
    6.10 +  [(root) []])
    6.11 +  
    6.12 +
    6.13 +