comparison clojure/com/aurellem/run/bootstrap_1.clj @ 377:1f14c1b8af7e

working on main bootstrap program
author Robert McIntyre <rlm@mit.edu>
date Wed, 11 Apr 2012 10:47:27 -0500
parents 7c89fe478de4
children 0162dd315814
comparison
equal deleted inserted replaced
376:7c89fe478de4 377:1f14c1b8af7e
1 (ns com.aurellem.run.bootstrap-1 1 (ns com.aurellem.run.bootstrap-1
2 (:use (com.aurellem.gb saves gb-driver util 2 (:use (com.aurellem.gb saves gb-driver util constants
3 items vbm characters money)) 3 items vbm characters money))
4 (:use (com.aurellem.run util title save-corruption bootstrap-0)) 4 (:use (com.aurellem.run util title save-corruption bootstrap-0))
5 (:use (com.aurellem.exp item-bridge)) 5 (:use (com.aurellem.exp item-bridge))
6 (:import [com.aurellem.gb.gb_driver SaveState])) 6 (:import [com.aurellem.gb.gb_driver SaveState]))
7 7
8 (defn pc-item-writer-program 8 (defn pc-item-writer-program
9 [] 9 []
10 (let [limit 201 10 (let [limit 201
11 [target-high target-low] (disect-bytes-2 0xD162)] 11 [target-high target-low] (disect-bytes-2 pokemon-list-start)]
12 (flatten 12 (flatten
13 [[0x00 ;; (item-hack) set increment stack pointer no-op 13 [[0x00 ;; (item-hack) set increment stack pointer no-op
14 0x1E ;; load limit into E 14 0x1E ;; load limit into E
15 limit 15 limit
16 0x3F ;; (item-hack) set carry flag no-op 16 0x3F ;; (item-hack) set carry flag no-op