Mercurial > vba-clojure
view 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 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/getRAM 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))