annotate clojure/com/aurellem/gb_driver.clj @ 61:dc8b383ecefa

added code to retrieve other RAM areas and ROM
author Robert McIntyre <rlm@mit.edu>
date Wed, 07 Mar 2012 19:53:39 -0600
parents ef59aee6d715
children 4699c7bab77d
rev   line source
rlm@60 1 (ns com.aurellem.gb-driver
rlm@60 2 (:import com.aurellem.gb.Gb)
rlm@60 3 (:import (java.nio IntBuffer ByteOrder)))
rlm@48 4
rlm@48 5
rlm@60 6 (defn init-vba []
rlm@60 7 (Gb/loadVBA)
rlm@60 8 (future
rlm@60 9 (Gb/startEmulator "/home/r/proj/pokemon-escape/roms/yellow.gbc")))
rlm@60 10
rlm@60 11
rlm@60 12 (defn get-ram []
rlm@60 13 (let [ram-store (int-array (Gb/getRAMSize))]
rlm@60 14 (Gb/getRAM ram-store)
rlm@60 15 ram-store))
rlm@60 16
rlm@61 17
rlm@61 18 (defn get-rom []
rlm@61 19 (let [rom-store (int-array (Gb/getROMSize))]
rlm@61 20 (Gb/getRAM rom-store)
rlm@61 21 rom-store))
rlm@61 22
rlm@61 23 (defn get-working-ram []
rlm@61 24 (let [ram-store (int-array Gb/WRAM_SIZE)]
rlm@61 25 (Gb/getWRAM ram-store)
rlm@61 26 ram-store))
rlm@61 27
rlm@61 28 (defn get-video-ram []
rlm@61 29 (let [ram-store (int-array Gb/VRAM_SIZE)]
rlm@61 30 (Gb/getVRAM ram-store)
rlm@61 31 ram-store))