diff clojure/com/aurellem/run/bootstrap_1.clj @ 417:0b6624c1291c

made basic tone player.
author Robert McIntyre <rlm@mit.edu>
date Mon, 16 Apr 2012 14:08:56 -0500
parents 21b8b3350b20
children cd557c922cec
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/bootstrap_1.clj	Sat Apr 14 05:41:55 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/bootstrap_1.clj	Mon Apr 16 14:08:56 2012 -0500
     1.3 @@ -858,6 +858,13 @@
     1.4              (transfer-control target)
     1.5              (do-nothing 1)))))
     1.6  
     1.7 +(defn gen-new-kernel-checkpoint! []
     1.8 +  (write-script! (do-nothing 10 (relocate-main-bootstrap))
     1.9 +                 "new-kernel"))
    1.10 +
    1.11 +(defn new-kernel [] (read-script "new-kernel"))
    1.12 +
    1.13 +
    1.14  (def mid-game-data
    1.15    (subvec (vec (memory (mid-game)))
    1.16            pokemon-list-start
    1.17 @@ -865,7 +872,7 @@
    1.18  
    1.19  (def mid-game-map-address 0x46BC)
    1.20  
    1.21 -(defn set-mid-game-data
    1.22 +(defn-memo set-mid-game-data
    1.23    ([] (set-mid-game-data (relocate-main-bootstrap)))
    1.24    ([script]
    1.25       (->> script
    1.26 @@ -888,7 +895,7 @@
    1.27               pokemon-list-start
    1.28               (+ pokemon-list-start 500))))
    1.29  
    1.30 -(defn return-to-pokemon-kernel
    1.31 +(defn-memo return-to-pokemon-kernel
    1.32    ([] (return-to-pokemon-kernel (set-mid-game-data)))
    1.33    ([script]
    1.34       (let [scratch (+ 200 pokemon-box-1-address)