changeset 540:7f8030812ac2

allow path back to bootstrap program from image-kernel.
author Robert McIntyre <rlm@mit.edu>
date Mon, 25 Jun 2012 15:08:52 -0500
parents a64485223afa
children cd557c922cec
files clojure/com/aurellem/run/choreo.clj clojure/com/aurellem/run/image.clj
diffstat 2 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/choreo.clj	Mon Jun 25 14:55:55 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/choreo.clj	Mon Jun 25 15:08:52 2012 -0500
     1.3 @@ -13,9 +13,9 @@
     1.4  
     1.5  ;; take over game
     1.6  ;; [X] silence noise
     1.7 -;; [ ] construct writing/playing kernel
     1.8 -;; [ ] play pony song while writing picture-program
     1.9  ;; [ ] run picture program to display pinkie pie mark
    1.10 +;; [ ] play pony song 
    1.11 +
    1.12  
    1.13  (defn-memo silence-noise
    1.14    ([] (silence-noise (launch-main-bootstrap-program)))
    1.15 @@ -23,6 +23,8 @@
    1.16       (->> script
    1.17            (write-RAM 0xFF1A [0 0 0]))))
    1.18  
    1.19 +(def program-target 0xC000)
    1.20 +
    1.21  (defn-memo write-pony-music-data
    1.22    ([] (write-pony-music-data (silence-noise)))
    1.23    ([script]
    1.24 @@ -35,8 +37,13 @@
    1.25              (write-RAM (:address (:noise bytes))
    1.26                         (:data    (:noise bytes)))
    1.27              (write-RAM (:address (:kernel bytes))
    1.28 -                       (:data    (:kernel bytes)))
    1.29 -            (transfer-control (:address (:kernel bytes)))))))
    1.30 +                       (:data    (:kernel bytes)))))))
    1.31  
    1.32 +(defn-memo write-image-display-program
    1.33 +  ([] (write-image-display-program (write-pony-music-data)))
    1.34 +  ([script]
    1.35 +     
    1.36  
    1.37  
    1.38 +
    1.39 +
     2.1 --- a/clojure/com/aurellem/run/image.clj	Mon Jun 25 14:55:55 2012 -0500
     2.2 +++ b/clojure/com/aurellem/run/image.clj	Mon Jun 25 15:08:52 2012 -0500
     2.3 @@ -664,8 +664,8 @@
     2.4                "0"  ;; OBJ-on flag 
     2.5                "1") ;; no-effect 
     2.6               2))
     2.7 +           ]
     2.8  
     2.9 -           (infinite-loop)]
    2.10          D (flatten D)]
    2.11  
    2.12      (concat A B C D)))
    2.13 @@ -675,6 +675,7 @@
    2.14      (-> (tick (tick (tick (mid-game))))
    2.15          (set-memory-range
    2.16           kernel-address
    2.17 -         (display-image-kernel kernel-address image))
    2.18 +         (concat (display-image-kernel kernel-address image)
    2.19 +                 (infinite-loop)))
    2.20          (PC! kernel-address))))
    2.21