annotate clojure/com/aurellem/gb_driver.clj @ 63:c44cf1f5954c

java/c++ framework more or less complete
author Robert McIntyre <rlm@mit.edu>
date Wed, 07 Mar 2012 20:37:46 -0600
parents 4699c7bab77d
children 02bca9640f3f
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@62 5 (defn vba-init []
rlm@60 6 (Gb/loadVBA)
rlm@60 7 (future
rlm@60 8 (Gb/startEmulator "/home/r/proj/pokemon-escape/roms/yellow.gbc")))
rlm@60 9
rlm@60 10 (defn get-ram []
rlm@60 11 (let [ram-store (int-array (Gb/getRAMSize))]
rlm@60 12 (Gb/getRAM ram-store)
rlm@60 13 ram-store))
rlm@60 14
rlm@61 15 (defn get-rom []
rlm@61 16 (let [rom-store (int-array (Gb/getROMSize))]
rlm@63 17 (Gb/getR0M rom-store)
rlm@61 18 rom-store))
rlm@61 19
rlm@61 20 (defn get-working-ram []
rlm@61 21 (let [ram-store (int-array Gb/WRAM_SIZE)]
rlm@61 22 (Gb/getWRAM ram-store)
rlm@61 23 ram-store))
rlm@61 24
rlm@61 25 (defn get-video-ram []
rlm@61 26 (let [ram-store (int-array Gb/VRAM_SIZE)]
rlm@61 27 (Gb/getVRAM ram-store)
rlm@62 28 ram-store))
rlm@62 29
rlm@62 30 (defn get-registers []
rlm@62 31 (let [register-store (int-array Gb/NUM_REGISTERS)]
rlm@62 32 (Gb/getRegisters register-store)
rlm@62 33 register-store))