Mercurial > vba-clojure
comparison clojure/com/aurellem/exp/item_bridge.clj @ 212:8523faa122b0
fixed compilaition error in dylan's code
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 23 Mar 2012 18:06:37 -0500 |
parents | 426fce7e609d |
children | 49a709c555f2 |
comparison
equal
deleted
inserted
replaced
211:661d35f1b56e | 212:8523faa122b0 |
---|---|
117 ([] (corrupt @current-state))) | 117 ([] (corrupt @current-state))) |
118 | 118 |
119 (defn mid-game-corrupt [] | 119 (defn mid-game-corrupt [] |
120 (read-state "corrupt-mid-game")) | 120 (read-state "corrupt-mid-game")) |
121 | 121 |
122 (defn prepare-memory | 122 |
123 ([^SaveState state] | |
124 (-> state | |
125 (set-memory-range 0xD31D (loop-program)) | |
126 (set-memory-range 0xD336 [0x1D 0xD3]))) | |
127 ([] (prepare-memory @current-state))) | |
128 | 123 |
124 | |
129 | 125 |
130 | 126 |
131 (defn test-memory-fun [n] | 127 (defn test-memory-fun [n] |
132 (capture-program-counter | 128 (capture-program-counter |
133 (set-memory-range | 129 (set-memory-range |
139 ;;(def good (test-memory-fun 17000)) | 135 ;;(def good (test-memory-fun 17000)) |
140 | 136 |
141 ;;(def bad (test-memory-fun 18000)) | 137 ;;(def bad (test-memory-fun 18000)) |
142 | 138 |
143 | 139 |
140 | |
141 (defn menu-open-state [] | |
142 (read-state "menu-open")) | |
143 | |
144 (defn prepare-memory | |
145 ([^SaveState state] | |
146 (-> state | |
147 (set-memory-range 0xD31D (loop-program)) | |
148 (set-memory-range 0xD36D [0x1D 0xD3]))) | |
149 ([] (prepare-memory @current-state))) | |
150 | |
151 | |
152 (defn succesful-PC-capture | |
153 "This function demonstrates successful PC capturing by | |
154 setting 0xD36D to the value of the start location of | |
155 a specially prepared program. | |
156 | |
157 You must run the function and then exit the open menu | |
158 to see the effect." | |
159 [] | |
160 (dorun | |
161 (map #(println (Integer/toHexString %)) | |
162 (capture-program-counter | |
163 (prepare-memory (menu-open-state)) | |
164 9000000)))) | |
165 |