Mercurial > vba-clojure
diff clojure/com/aurellem/gb_driver.clj @ 62:4699c7bab77d
added code to retrieve CPU registers
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 07 Mar 2012 20:10:21 -0600 |
parents | dc8b383ecefa |
children | c44cf1f5954c |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/gb_driver.clj Wed Mar 07 19:53:39 2012 -0600 1.2 +++ b/clojure/com/aurellem/gb_driver.clj Wed Mar 07 20:10:21 2012 -0600 1.3 @@ -2,19 +2,16 @@ 1.4 (:import com.aurellem.gb.Gb) 1.5 (:import (java.nio IntBuffer ByteOrder))) 1.6 1.7 - 1.8 -(defn init-vba [] 1.9 +(defn vba-init [] 1.10 (Gb/loadVBA) 1.11 (future 1.12 (Gb/startEmulator "/home/r/proj/pokemon-escape/roms/yellow.gbc"))) 1.13 1.14 - 1.15 (defn get-ram [] 1.16 (let [ram-store (int-array (Gb/getRAMSize))] 1.17 (Gb/getRAM ram-store) 1.18 ram-store)) 1.19 1.20 - 1.21 (defn get-rom [] 1.22 (let [rom-store (int-array (Gb/getROMSize))] 1.23 (Gb/getRAM rom-store) 1.24 @@ -28,4 +25,9 @@ 1.25 (defn get-video-ram [] 1.26 (let [ram-store (int-array Gb/VRAM_SIZE)] 1.27 (Gb/getVRAM ram-store) 1.28 - ram-store)) 1.29 \ No newline at end of file 1.30 + ram-store)) 1.31 + 1.32 +(defn get-registers [] 1.33 + (let [register-store (int-array Gb/NUM_REGISTERS)] 1.34 + (Gb/getRegisters register-store) 1.35 + register-store)) 1.36 \ No newline at end of file