diff clojure/com/aurellem/gb/util.clj @ 230:fe26776e1a58

working on map memory, modified view-memory to output hex and decimal as well as binary
author Robert McIntyre <rlm@mit.edu>
date Sat, 24 Mar 2012 14:42:34 -0500
parents c9a855de1d07
children 22f58fa47c3c
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/util.clj	Sat Mar 24 13:22:52 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/util.clj	Sat Mar 24 14:42:34 2012 -0500
     1.3 @@ -36,8 +36,9 @@
     1.4  
     1.5  (defn view-memory
     1.6    ([^SaveState state mem]
     1.7 -     (println (format "mem 0x%04X = %s" mem
     1.8 -                      (binary-str (aget (memory state) mem))))
     1.9 +     (let [val (aget (memory state) mem)]
    1.10 +       (println (format "0x%04X = %s 0x%02X %d" mem
    1.11 +                        (binary-str val) val val)))
    1.12       state)
    1.13    ([mem]
    1.14       (view-memory @current-state mem)))