Mercurial > vba-clojure
view 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 |
line wrap: on
line source
1 (ns com.aurellem.gb-driver2 (:import com.aurellem.gb.Gb)3 (:import (java.nio IntBuffer ByteOrder)))5 (defn vba-init []6 (Gb/loadVBA)7 (future8 (Gb/startEmulator "/home/r/proj/pokemon-escape/roms/yellow.gbc")))10 (defn get-ram []11 (let [ram-store (int-array (Gb/getRAMSize))]12 (Gb/getRAM ram-store)13 ram-store))15 (defn get-rom []16 (let [rom-store (int-array (Gb/getROMSize))]17 (Gb/getR0M rom-store)18 rom-store))20 (defn get-working-ram []21 (let [ram-store (int-array Gb/WRAM_SIZE)]22 (Gb/getWRAM ram-store)23 ram-store))25 (defn get-video-ram []26 (let [ram-store (int-array Gb/VRAM_SIZE)]27 (Gb/getVRAM ram-store)28 ram-store))30 (defn get-registers []31 (let [register-store (int-array Gb/NUM_REGISTERS)]32 (Gb/getRegisters register-store)33 register-store))