Mercurial > vba-clojure
comparison clojure/com/aurellem/gb_driver.clj @ 96:cb487c4ce5c0
added write-memory!, which allows me to write any value to the
gameboy's memory-mapped rom or ram.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 11 Mar 2012 23:27:19 -0500 |
parents | b74a578d0c88 |
children | 9fad96094950 |
comparison
equal
deleted
inserted
replaced
95:b74a578d0c88 | 96:cb487c4ce5c0 |
---|---|
153 (cpu-data Gb/VRAM_SIZE #(Gb/getVRAM %))) | 153 (cpu-data Gb/VRAM_SIZE #(Gb/getVRAM %))) |
154 | 154 |
155 (def registers | 155 (def registers |
156 (cpu-data Gb/NUM_REGISTERS #(Gb/getRegisters %))) | 156 (cpu-data Gb/NUM_REGISTERS #(Gb/getRegisters %))) |
157 | 157 |
158 | |
159 (defn write-memory! [new-memory] | |
160 (let [store (int-array new-memory)] | |
161 (assert (= Gb/GB_MEMORY) (count new-memory)) | |
162 (Gb/writeMemory new-memory))) | |
163 | |
164 | |
158 ;; TODO add register names | 165 ;; TODO add register names |
159 | 166 |
160 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 167 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
161 | 168 |
162 (defn AF [state] | 169 (defn AF [state] |