changeset 112:6fe33bb5ea22

saving progress
author Robert McIntyre <rlm@mit.edu>
date Thu, 15 Mar 2012 17:29:49 -0500
parents 8be7ce890184
children 0831da75d2c5
files clojure/com/aurellem/assembly.clj
diffstat 1 files changed, 5 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/assembly.clj	Thu Mar 15 17:20:55 2012 -0500
     1.2 +++ b/clojure/com/aurellem/assembly.clj	Thu Mar 15 17:29:49 2012 -0500
     1.3 @@ -19,15 +19,7 @@
     1.4      (-> state
     1.5          (write-memory! scratch-memory)
     1.6          (write-registers! registers)
     1.7 -        (PC! program-counter))))
     1.8 -  ;;([program-counter]
     1.9 -  ;;   (fn [^SaveState state registers assembly-code]
    1.10 -  ;;     (inject-assembly state program-counter registers assembly-code)))
    1.11 -  )
    1.12 -
    1.13 -
    1.14 -;;(def inject-assembly-item
    1.15 -;;  (inject-assembly (inc item-list-start)))
    1.16 +        (PC! program-counter)))))
    1.17  
    1.18  (defn inject-item-assembly
    1.19    ([^SaveState state assembly-code]
    1.20 @@ -61,10 +53,8 @@
    1.21    ([assembly n]
    1.22       (run-assembly info assembly n)))
    1.23  
    1.24 -
    1.25  (def buttons-port 0xFF00)
    1.26  
    1.27 -
    1.28  (defn A [state]
    1.29    (bit-shift-right (bit-and 0x0000FF00 (AF state)) 8))
    1.30  
    1.31 @@ -133,7 +123,6 @@
    1.32          
    1.33          []))))
    1.34  
    1.35 -
    1.36  (defn run-a-bit []
    1.37    (-> (read-buttons)
    1.38        (info)
    1.39 @@ -160,13 +149,9 @@
    1.40        (tick)
    1.41        (print-inventory)))
    1.42  
    1.43 -
    1.44 -(comment
    1.45 -  (view-memory (step (step (read-buttons) [:d])) 0xD328)
    1.46 -  ;;mem 0xD328 = 11100111
    1.47 -  (view-memory (step (step (read-buttons))) 0xD328)
    1.48 -  ;;mem 0xD328 = 00000000
    1.49 -  )
    1.50 +(defn test-read-pad []
    1.51 +  (= (view-memory (step (step (read-buttons) [:d])) 0xD328)
    1.52 +     (view-memory (step (step (read-buttons))) 0xD328)))
    1.53    
    1.54  (defn trace [state]
    1.55    (loop [program-counters []
    1.56 @@ -182,10 +167,9 @@
    1.57           (conj opcodes
    1.58                 (aget (memory @current-state)
    1.59                       (PC @current-state))))))))
    1.60 -        
    1.61    
    1.62  (defn good-trace []
    1.63    (-> (mid-game) (tick) (IE! 0)
    1.64        (set-inv-mem [0x00 0x00 0X00 0x00])
    1.65        (PC! item-list-start)(print-interrupt)
    1.66 -      (info) (tick) (info) (tick) (info)))
    1.67 \ No newline at end of file
    1.68 +      (info) (tick) (info) (tick) (info)))