diff clojure/com/aurellem/gb/util.clj @ 176:95b2758dd517

wrote functions to read and write pokemon DV values and status
author Robert McIntyre <rlm@mit.edu>
date Wed, 21 Mar 2012 22:13:43 -0500
parents 5ce074824fac
children fd549c8f42ae
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/util.clj	Wed Mar 21 18:17:37 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/util.clj	Wed Mar 21 22:13:43 2012 -0500
     1.3 @@ -42,13 +42,16 @@
     1.4    ([mem]
     1.5       (view-memory @current-state mem)))
     1.6  
     1.7 -(defn print-listing [state begin end]
     1.8 -  (dorun (map 
     1.9 -          (fn [opcode line]
    1.10 -            (println (format "0x%04X:  0x%02X" line opcode)))
    1.11 -          (subvec  (vec (memory state)) begin end)
    1.12 -          (range begin end)))
    1.13 -  state)
    1.14 +(defn print-listing
    1.15 +  ([^SaveState state begin end]
    1.16 +     (dorun (map 
    1.17 +             (fn [opcode line]
    1.18 +               (println (format "0x%04X:  0x%02X" line opcode)))
    1.19 +             (subvec  (vec (memory state)) begin end)
    1.20 +             (range begin end)))
    1.21 +     state)
    1.22 +  ([begin end]
    1.23 +     (print-listing @current-state begin end)))
    1.24  
    1.25  (defn print-pc
    1.26    ([^SaveState state]