diff clojure/com/aurellem/gb_driver.clj @ 60:ef59aee6d715

added function to retrieve main RAM
author Robert McIntyre <rlm@mit.edu>
date Wed, 07 Mar 2012 19:29:51 -0600
parents 75349da4c344
children dc8b383ecefa
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb_driver.clj	Wed Mar 07 17:40:00 2012 -0600
     1.2 +++ b/clojure/com/aurellem/gb_driver.clj	Wed Mar 07 19:29:51 2012 -0600
     1.3 @@ -1,3 +1,16 @@
     1.4 -(ns com.aurellem.gb-driver)
     1.5 +(ns com.aurellem.gb-driver
     1.6 +  (:import com.aurellem.gb.Gb)
     1.7 +  (:import (java.nio IntBuffer ByteOrder)))
     1.8  
     1.9  
    1.10 +(defn init-vba []
    1.11 +  (Gb/loadVBA)
    1.12 +  (future
    1.13 +    (Gb/startEmulator "/home/r/proj/pokemon-escape/roms/yellow.gbc")))
    1.14 +
    1.15 +
    1.16 +(defn get-ram []
    1.17 +  (let [ram-store (int-array (Gb/getRAMSize))]
    1.18 +    (Gb/getRAM ram-store)
    1.19 +    ram-store))
    1.20 +