comparison clojure/com/aurellem/exp/item_bridge.clj @ 187:426fce7e609d

successfully captured program counter!
author Robert McIntyre <rlm@mit.edu>
date Thu, 22 Mar 2012 07:36:54 -0500
parents d63886d63b2f
children 8523faa122b0
comparison
equal deleted inserted replaced
182:f0c1e5574e81 187:426fce7e609d
116 (corrupt-moves))) 116 (corrupt-moves)))
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
122 121
123 122 (defn prepare-memory
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
124 129
125 130
131 (defn test-memory-fun [n]
132 (capture-program-counter
133 (set-memory-range
134 (tick (mid-game))
135 0xD36D
136 [0 0])
137 n))
126 138
139 ;;(def good (test-memory-fun 17000))
140
141 ;;(def bad (test-memory-fun 18000))
142
143