changeset 70:ff6f1acae59e

removed zero frame confusion
author Robert McIntyre <rlm@mit.edu>
date Thu, 08 Mar 2012 02:25:20 -0600
parents 063b78119835
children 39928bf4622d
files clojure/com/aurellem/gb_driver.clj clojure/com/aurellem/test_vba.clj clojure/com/aurellem/vbm.clj src/sdl/SDL.cpp
diffstat 4 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb_driver.clj	Thu Mar 08 02:12:49 2012 -0600
     1.2 +++ b/clojure/com/aurellem/gb_driver.clj	Thu Mar 08 02:25:20 2012 -0600
     1.3 @@ -13,8 +13,7 @@
     1.4  
     1.5  (defn vba-init []
     1.6    (.delete yellow-save-file)
     1.7 -  (future
     1.8 -    (Gb/startEmulator (.getCanonicalPath yellow-rom-image))))
     1.9 +  (Gb/startEmulator (.getCanonicalPath yellow-rom-image)))
    1.10  
    1.11  (defn cpu-data [size arr-fn]
    1.12    (let [store (int-array size)]
     2.1 --- a/clojure/com/aurellem/test_vba.clj	Thu Mar 08 02:12:49 2012 -0600
     2.2 +++ b/clojure/com/aurellem/test_vba.clj	Thu Mar 08 02:25:20 2012 -0600
     2.3 @@ -10,5 +10,8 @@
     2.4    (dorun
     2.5     (map step (vbm-masks speedrun-2942))))
     2.6  
     2.7 +(defn play-vbm [#^File vbm]
     2.8 +  (shutdown)
     2.9 +  (vba-init)
    2.10 +  (dorun (map step (vbm-masks vbm))))
    2.11  
    2.12 -
     3.1 --- a/clojure/com/aurellem/vbm.clj	Thu Mar 08 02:12:49 2012 -0600
     3.2 +++ b/clojure/com/aurellem/vbm.clj	Thu Mar 08 02:25:20 2012 -0600
     3.3 @@ -43,11 +43,10 @@
     3.4  (def vbm-header-length 255)
     3.5  
     3.6  (defn repair-vbm
     3.7 -  "Two 0's must be inserted after every reset, and the first
     3.8 -   button must be dropped"
     3.9 +  "Two 0's must be inserted after every reset."
    3.10    [vbm-seq]
    3.11    (loop [fixed []
    3.12 -         pending (next vbm-seq)]
    3.13 +         pending vbm-seq]
    3.14      (if (empty? pending) fixed
    3.15          (let [mask (first pending)]
    3.16            (if (not= 0x0000 (bit-and mask (button-mask :reset)))
     4.1 --- a/src/sdl/SDL.cpp	Thu Mar 08 02:12:49 2012 -0600
     4.2 +++ b/src/sdl/SDL.cpp	Thu Mar 08 02:25:20 2012 -0600
     4.3 @@ -2714,7 +2714,7 @@
     4.4      fprintf (stderr, "I got a filename OMG!\nCalling VBAMovieOpen...\n");
     4.5      VBAMovieOpen(moviefile, true);
     4.6    }
     4.7 -  step();
     4.8 +  //step();
     4.9    return 0;
    4.10  }
    4.11