changeset 374:143a2dfb3177

merge
author Robert McIntyre <rlm@mit.edu>
date Tue, 10 Apr 2012 06:56:07 -0500
parents abcc522a3242 (current diff) a6f212ae29a3 (diff)
children ce74088cd953
files
diffstat 3 files changed, 325 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/hxc.clj	Tue Apr 10 06:33:44 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/hxc.clj	Tue Apr 10 06:56:07 2012 -0500
     1.3 @@ -482,7 +482,22 @@
     1.4  
     1.5  
     1.6  
     1.7 -
     1.8 +(defn hxc-advantage
     1.9 +  ;; in-game multipliers are stored as 10x their effective value
    1.10 +  ;; to allow for fractional multipliers like 1/2
    1.11 +  
    1.12 +  "The hardcoded type advantages in memory, returned as tuples of
    1.13 +  atk-type def-type multiplier. By default (i.e. if not listed here),
    1.14 +the multiplier is 1. List begins at 0x3E62D."
    1.15 +  ([] (hxc-advantage com.aurellem.gb.gb-driver/original-rom))
    1.16 +  ([rom]
    1.17 +     (map
    1.18 +      (fn [[atk def mult]] [(get pkmn-types atk (hex atk))
    1.19 +                            (get pkmn-types def (hex def))
    1.20 +                            (/ mult 10)])
    1.21 +      (partition 3
    1.22 +                 (take-while (partial not= 0xFF)
    1.23 +                             (drop 0x3E62D rom))))))
    1.24  
    1.25  
    1.26  
    1.27 @@ -537,6 +552,63 @@
    1.28  
    1.29         )))
    1.30  
    1.31 +(defn hxc-evolution
    1.32 +  "Hardcoded evolution data in memory. The data exists at ROM@34000,
    1.33 +  sorted by internal order. Pointers to the data exist at ROM@3B1E5; see also, hxc-ptrs-evolve."
    1.34 +  ([] (hxc-evolution com.aurellem.gb.gb-driver/original-rom))
    1.35 +  ([rom]
    1.36 +       (apply assoc {}
    1.37 +               (interleave
    1.38 +                (hxc-pokenames rom)
    1.39 +                (map
    1.40 +                 (comp
    1.41 +                  format-evo
    1.42 +                  (partial take-while (comp not zero?))
    1.43 +                  #(drop % rom))
    1.44 +                 (hxc-ptrs-evolve rom)
    1.45 +                 )))))
    1.46 +
    1.47 +(defn hxc-evolution-pretty
    1.48 +  "Like hxc-evolution, except it uses the names of items and pokemon
    1.49 +--- grabbed from ROM --- rather than their numerical identifiers."
    1.50 +  ([] (hxc-evolution-pretty com.aurellem.gb.gb-driver/original-rom))
    1.51 +  ([rom]
    1.52 +     (let
    1.53 +         [poke-names (vec (hxc-pokenames rom))
    1.54 +          item-names (vec (hxc-items rom))
    1.55 +          use-names
    1.56 +          (fn [m]
    1.57 +            (loop [ks (keys m) new-map m]
    1.58 +              (let [k (first ks)]
    1.59 +                (cond (nil? ks) new-map
    1.60 +                      (= k :into)
    1.61 +                      (recur
    1.62 +                       (next ks)
    1.63 +                       (assoc new-map
    1.64 +                         :into
    1.65 +                         (poke-names
    1.66 +                          (:into
    1.67 +                           new-map))))
    1.68 +                      (= k :item)
    1.69 +                      (recur
    1.70 +                       (next ks)
    1.71 +                       (assoc new-map
    1.72 +                         :item
    1.73 +                         (item-names
    1.74 +                          (:item new-map))))
    1.75 +                      :else
    1.76 +                      (recur
    1.77 +                       (next ks)
    1.78 +                       new-map)
    1.79 +                      ))))]
    1.80 +
    1.81 +       (into {}
    1.82 +             (map (fn [[pkmn evo-coll]]
    1.83 +                    [pkmn (map use-names evo-coll)])
    1.84 +                  (hxc-evolution rom))))))
    1.85 +
    1.86 +
    1.87 +
    1.88  
    1.89  (defn hxc-learnsets
    1.90    "Hardcoded map associating pokemon names to lists of pairs [lvl
    1.91 @@ -579,8 +651,9 @@
    1.92    ([] (hxc-pokemon-base com.aurellem.gb.gb-driver/original-rom))
    1.93    ([rom]
    1.94       (let [entry-size 28
    1.95 -           pkmn-count (count (hxc-pokedex-text rom))
    1.96 +          
    1.97             pokemon (rest (hxc-pokedex-names))
    1.98 + pkmn-count (inc(count pokemon))
    1.99             types (apply assoc {}
   1.100                          (interleave
   1.101                           (range)
     2.1 --- a/org/rom.org	Tue Apr 10 06:33:44 2012 -0500
     2.2 +++ b/org/rom.org	Tue Apr 10 06:56:07 2012 -0500
     2.3 @@ -75,7 +75,7 @@
     2.4  
     2.5  Here you can see the raw data in three stages: in the first stage, we
     2.6  just grab the first few bytes starting from position 0xE8000. In the
     2.7 -second stage, we partition it into ten-letter chunks to show you
     2.8 +second stage, we partition the bytes into ten-letter chunks to show you
     2.9  where the names begin and end. In the final stage, we convert each
    2.10  byte into the letter it represents using the =character-codes->str=
    2.11  function. (0x50 is rendered as the symbol \ldquo{} =#= \rdquo{} for
    2.12 @@ -87,6 +87,7 @@
    2.13                           constants))
    2.14    (:import [com.aurellem.gb.gb_driver SaveState]))
    2.15  
    2.16 +
    2.17  (println (take 100 (drop 0xE8000 (rom))))
    2.18  
    2.19  (println (partition 10 (take 100 (drop 0xE8000 (rom)))))
    2.20 @@ -157,8 +158,9 @@
    2.21    ([] (hxc-pokemon-base com.aurellem.gb.gb-driver/original-rom))
    2.22    ([rom]
    2.23       (let [entry-size 28
    2.24 -           pkmn-count (count (hxc-pokedex-text rom))
    2.25 +          
    2.26             pokemon (rest (hxc-pokedex-names))
    2.27 + pkmn-count (inc(count pokemon))
    2.28             types (apply assoc {}
    2.29                          (interleave
    2.30                           (range)
    2.31 @@ -557,6 +559,36 @@
    2.32  
    2.33  * Items
    2.34  ** Item names
    2.35 +
    2.36 +*** See the data
    2.37 +#+begin_src clojure :exports both :results output 
    2.38 +(ns com.aurellem.gb.hxc
    2.39 +  (:use (com.aurellem.gb assembly characters gb-driver util mem-util
    2.40 +                         constants))
    2.41 +  (:import [com.aurellem.gb.gb_driver SaveState]))
    2.42 +
    2.43 +(println (take 100 (drop 0x045B7 (rom))))
    2.44 +
    2.45 +(println
    2.46 + (partition-by
    2.47 +  (partial = 0x50)
    2.48 +  (take 100 (drop 0x045B7 (rom)))))
    2.49 +
    2.50 +(println
    2.51 + (map character-codes->str
    2.52 +      (partition-by
    2.53 +       (partial = 0x50)
    2.54 +       (take 100 (drop 0x045B7 (rom))))))
    2.55 +
    2.56 +
    2.57 +#+end_src
    2.58 +
    2.59 +#+results:
    2.60 +: (140 128 146 147 132 145 127 129 128 139 139 80 148 139 147 145 128 127 129 128 139 139 80 134 145 132 128 147 127 129 128 139 139 80 143 142 138 186 127 129 128 139 139 80 147 142 150 141 127 140 128 143 80 129 136 130 152 130 139 132 80 230 230 230 230 230 80 146 128 133 128 145 136 127 129 128 139 139 80 143 142 138 186 131 132 151 80 140 142 142 141 127 146 147 142 141 132 80 128 141)
    2.61 +: ((140 128 146 147 132 145 127 129 128 139 139) (80) (148 139 147 145 128 127 129 128 139 139) (80) (134 145 132 128 147 127 129 128 139 139) (80) (143 142 138 186 127 129 128 139 139) (80) (147 142 150 141 127 140 128 143) (80) (129 136 130 152 130 139 132) (80) (230 230 230 230 230) (80) (146 128 133 128 145 136 127 129 128 139 139) (80) (143 142 138 186 131 132 151) (80) (140 142 142 141 127 146 147 142 141 132) (80) (128 141))
    2.62 +: (MASTER BALL # ULTRA BALL # GREAT BALL # POKé BALL # TOWN MAP # BICYCLE # ????? # SAFARI BALL # POKéDEX # MOON STONE # AN)
    2.63 +
    2.64 +*** Automatically grab the data
    2.65  #+name: item-names
    2.66  #+begin_src clojure
    2.67  
    2.68 @@ -572,6 +604,55 @@
    2.69  #+end_src
    2.70  
    2.71  ** Item prices
    2.72 +
    2.73 +***
    2.74 +#+begin_src clojure :exports both :results output 
    2.75 +(ns com.aurellem.gb.hxc
    2.76 +  (:use (com.aurellem.gb assembly characters gb-driver util mem-util
    2.77 +                         constants))
    2.78 +  (:import [com.aurellem.gb.gb_driver SaveState]))
    2.79 +
    2.80 +(println (take 90 (drop 0x4495 (rom))))
    2.81 +
    2.82 +(println
    2.83 + (partition 3
    2.84 +            (take 90 (drop 0x4495 (rom)))))
    2.85 +
    2.86 +(println
    2.87 + (partition 3
    2.88 +            (map hex
    2.89 +                 (take 90 (drop 0x4495 (rom))))))
    2.90 +
    2.91 +(println
    2.92 + (map decode-bcd
    2.93 +      (map butlast
    2.94 +           (partition 3
    2.95 +                      (take 90 (drop 0x4495 (rom)))))))
    2.96 +
    2.97 +(println
    2.98 + (map
    2.99 +  vector
   2.100 +  (hxc-items (rom))
   2.101 +  (map decode-bcd
   2.102 +       (map butlast
   2.103 +            (partition 3
   2.104 +                       (take 90 (drop 0x4495 (rom))))))))
   2.105 + 
   2.106 +
   2.107 +
   2.108 +
   2.109 +
   2.110 +#+end_src
   2.111 +
   2.112 +#+results:
   2.113 +: (0 0 0 18 0 0 6 0 0 2 0 0 0 0 0 0 0 0 0 0 0 16 0 0 0 0 0 0 0 0 1 0 0 2 80 0 2 80 0 2 0 0 2 0 0 48 0 0 37 0 0 21 0 0 7 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 80 0 3 80 0)
   2.114 +: ((0 0 0) (18 0 0) (6 0 0) (2 0 0) (0 0 0) (0 0 0) (0 0 0) (16 0 0) (0 0 0) (0 0 0) (1 0 0) (2 80 0) (2 80 0) (2 0 0) (2 0 0) (48 0 0) (37 0 0) (21 0 0) (7 0 0) (3 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (5 80 0) (3 80 0))
   2.115 +: ((0x0 0x0 0x0) (0x12 0x0 0x0) (0x6 0x0 0x0) (0x2 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x10 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x1 0x0 0x0) (0x2 0x50 0x0) (0x2 0x50 0x0) (0x2 0x0 0x0) (0x2 0x0 0x0) (0x30 0x0 0x0) (0x25 0x0 0x0) (0x15 0x0 0x0) (0x7 0x0 0x0) (0x3 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x0 0x0 0x0) (0x5 0x50 0x0) (0x3 0x50 0x0))
   2.116 +: (0 1200 600 200 0 0 0 1000 0 0 100 250 250 200 200 3000 2500 1500 700 300 0 0 0 0 0 0 0 0 550 350)
   2.117 +: ([:master-ball 0] [:ultra-ball 1200] [:great-ball 600] [:poké-ball 200] [:town-map 0] [:bicycle 0] [:????? 0] [:safari-ball 1000] [:pokédex 0] [:moon-stone 0] [:antidote 100] [:burn-heal 250] [:ice-heal 250] [:awakening 200] [:parlyz-heal 200] [:full-restore 3000] [:max-potion 2500] [:hyper-potion 1500] [:super-potion 700] [:potion 300] [:boulderbadge 0] [:cascadebadge 0] [:thunderbadge 0] [:rainbowbadge 0] [:soulbadge 0] [:marshbadge 0] [:volcanobadge 0] [:earthbadge 0] [:escape-rope 550] [:repel 350])
   2.118 +
   2.119 +
   2.120 +***
   2.121  #+name: item-prices
   2.122  #+begin_src clojure
   2.123  (defn hxc-item-prices
   2.124 @@ -635,6 +716,33 @@
   2.125  
   2.126  * Types
   2.127  ** Names of types
   2.128 +***
   2.129 +#+begin_src clojure :exports both :results output 
   2.130 +(ns com.aurellem.gb.hxc
   2.131 +  (:use (com.aurellem.gb assembly characters gb-driver util mem-util
   2.132 +                         constants))
   2.133 +  (:import [com.aurellem.gb.gb_driver SaveState]))
   2.134 +
   2.135 +(println (take 90 (drop 0x27D99 (rom))))
   2.136 +
   2.137 +(println
   2.138 + (partition-by (partial = 0x50)
   2.139 +               (take 90 (drop 0x27D99 (rom)))))
   2.140 +
   2.141 +(println
   2.142 + (map character-codes->str
   2.143 +      (partition-by (partial = 0x50)
   2.144 +                    (take 90 (drop 0x27D99 (rom))))))
   2.145 +
   2.146 +#+end_src
   2.147 +
   2.148 +#+results:
   2.149 +: (141 142 145 140 128 139 80 133 136 134 135 147 136 141 134 80 133 139 152 136 141 134 80 143 142 136 146 142 141 80 133 136 145 132 80 150 128 147 132 145 80 134 145 128 146 146 80 132 139 132 130 147 145 136 130 80 143 146 152 130 135 136 130 80 136 130 132 80 134 145 142 148 141 131 80 145 142 130 138 80 129 136 145 131 80 129 148 134 80 134)
   2.150 +: ((141 142 145 140 128 139) (80) (133 136 134 135 147 136 141 134) (80) (133 139 152 136 141 134) (80) (143 142 136 146 142 141) (80) (133 136 145 132) (80) (150 128 147 132 145) (80) (134 145 128 146 146) (80) (132 139 132 130 147 145 136 130) (80) (143 146 152 130 135 136 130) (80) (136 130 132) (80) (134 145 142 148 141 131) (80) (145 142 130 138) (80) (129 136 145 131) (80) (129 148 134) (80) (134))
   2.151 +: (NORMAL # FIGHTING # FLYING # POISON # FIRE # WATER # GRASS # ELECTRIC # PSYCHIC # ICE # GROUND # ROCK # BIRD # BUG # G)
   2.152 +
   2.153 +
   2.154 +***
   2.155  #+name: type-names
   2.156  #+begin_src clojure
   2.157  (def hxc-types
   2.158 @@ -645,6 +753,64 @@
   2.159  #+end_src
   2.160  
   2.161  ** Type effectiveness
   2.162 +***
   2.163 +#+begin_src clojure :exports both :results output 
   2.164 +(ns com.aurellem.gb.hxc
   2.165 +  (:use (com.aurellem.gb assembly characters gb-driver util mem-util
   2.166 +                         constants))
   2.167 +  (:import [com.aurellem.gb.gb_driver SaveState]))
   2.168 +
   2.169 +
   2.170 +;; POKEMON TYPES
   2.171 +
   2.172 +(println pkmn-types) ;; these are the pokemon types
   2.173 +(println (map vector (range) pkmn-types)) ;; each type has an id number.
   2.174 +
   2.175 +(newline)
   2.176 +
   2.177 +
   2.178 +
   2.179 +
   2.180 +;;; TYPE EFFECTIVENESS
   2.181 +
   2.182 +(println (take 15 (drop 0x3E62D (rom))))
   2.183 +(println (partition 3 (take 15 (drop 0x3E62D (rom)))))
   2.184 +
   2.185 +(println
   2.186 + (map
   2.187 +  (fn [[atk-type def-type multiplier]]
   2.188 +    (list atk-type def-type (/ multiplier 10.)))
   2.189 +
   2.190 +  (partition 3
   2.191 +             (take 15 (drop 0x3E62D (rom))))))
   2.192 +
   2.193 +
   2.194 +(println
   2.195 + (map
   2.196 +  (fn [[atk-type def-type multiplier]]
   2.197 +    [
   2.198 +     (get pkmn-types atk-type)
   2.199 +     (get pkmn-types def-type)
   2.200 +     (/ multiplier 10.)
   2.201 +    ])
   2.202 +  
   2.203 +  (partition 3
   2.204 +             (take 15 (drop 0x3E62D (rom))))))
   2.205 +
   2.206 +#+end_src
   2.207 +
   2.208 +#+results:
   2.209 +: [:normal :fighting :flying :poison :ground :rock :bird :bug :ghost :A :B :C :D :E :F :G :H :I :J :K :fire :water :grass :electric :psychic :ice :dragon]
   2.210 +: ([0 :normal] [1 :fighting] [2 :flying] [3 :poison] [4 :ground] [5 :rock] [6 :bird] [7 :bug] [8 :ghost] [9 :A] [10 :B] [11 :C] [12 :D] [13 :E] [14 :F] [15 :G] [16 :H] [17 :I] [18 :J] [19 :K] [20 :fire] [21 :water] [22 :grass] [23 :electric] [24 :psychic] [25 :ice] [26 :dragon])
   2.211 +: 
   2.212 +: (0 5 5 0 8 0 8 8 20 20 7 20 20 5 5)
   2.213 +: ((0 5 5) (0 8 0) (8 8 20) (20 7 20) (20 5 5))
   2.214 +: ((0 5 0.5) (0 8 0.0) (8 8 2.0) (20 7 2.0) (20 5 0.5))
   2.215 +: ([:normal :rock 0.5] [:normal :ghost 0.0] [:ghost :ghost 2.0] [:fire :bug 2.0] [:fire :rock 0.5])
   2.216 +
   2.217 +
   2.218 +***
   2.219 +
   2.220  #+name: type-advantage
   2.221  #+begin_src clojure
   2.222  (defn hxc-advantage
   2.223 @@ -669,6 +835,36 @@
   2.224  
   2.225  * Moves
   2.226  ** Names of moves
   2.227 +*** See the data
   2.228 +#+begin_src clojure :exports both :results output 
   2.229 +(ns com.aurellem.gb.hxc
   2.230 +  (:use (com.aurellem.gb assembly characters gb-driver util mem-util
   2.231 +                         constants))
   2.232 +  (:import [com.aurellem.gb.gb_driver SaveState]))
   2.233 +
   2.234 +(println (take 100 (drop 0xBC000 (rom))))
   2.235 +
   2.236 +(println
   2.237 + (partition-by
   2.238 +  (partial = 0x50)
   2.239 +  (take 100 (drop 0xBC000 (rom)))))
   2.240 +
   2.241 +(println
   2.242 + (map character-codes->str
   2.243 +      (partition-by
   2.244 +       (partial = 0x50)
   2.245 +       (take 100 (drop 0xBC000 (rom))))))
   2.246 +
   2.247 +
   2.248 +#+end_src
   2.249 +
   2.250 +#+results:
   2.251 +: (143 142 148 141 131 80 138 128 145 128 147 132 127 130 135 142 143 80 131 142 148 129 139 132 146 139 128 143 80 130 142 140 132 147 127 143 148 141 130 135 80 140 132 134 128 127 143 148 141 130 135 80 143 128 152 127 131 128 152 80 133 136 145 132 127 143 148 141 130 135 80 136 130 132 127 143 148 141 130 135 80 147 135 148 141 131 132 145 143 148 141 130 135 80 146 130 145 128 147 130)
   2.252 +: ((143 142 148 141 131) (80) (138 128 145 128 147 132 127 130 135 142 143) (80) (131 142 148 129 139 132 146 139 128 143) (80) (130 142 140 132 147 127 143 148 141 130 135) (80) (140 132 134 128 127 143 148 141 130 135) (80) (143 128 152 127 131 128 152) (80) (133 136 145 132 127 143 148 141 130 135) (80) (136 130 132 127 143 148 141 130 135) (80) (147 135 148 141 131 132 145 143 148 141 130 135) (80) (146 130 145 128 147 130))
   2.253 +: (POUND # KARATE CHOP # DOUBLESLAP # COMET PUNCH # MEGA PUNCH # PAY DAY # FIRE PUNCH # ICE PUNCH # THUNDERPUNCH # SCRATC)
   2.254 +
   2.255 +*** Automatically grab the data
   2.256 +
   2.257  #+name: move-names
   2.258  #+begin_src clojure
   2.259  (def hxc-move-names
   2.260 @@ -743,7 +939,38 @@
   2.261  #+end_src
   2.262  
   2.263  ** TM and HM moves
   2.264 +***
   2.265 +#+begin_src clojure :exports both :results output 
   2.266 +(ns com.aurellem.gb.hxc
   2.267 +  (:use (com.aurellem.gb assembly characters gb-driver util mem-util
   2.268 +                         constants))
   2.269 +  (:import [com.aurellem.gb.gb_driver SaveState]))
   2.270  
   2.271 +
   2.272 +(println (hxc-move-names))
   2.273 +(println (map vector (rest(range)) (hxc-move-names)))
   2.274 +
   2.275 +(newline)
   2.276 +
   2.277 +(println (take 55 (drop 0x1232D (rom))))
   2.278 +
   2.279 +(println
   2.280 + (interpose "."
   2.281 +            (map
   2.282 +             (zipmap (rest (range)) (hxc-move-names))
   2.283 +             (take 55 (drop 0x1232D (rom))))))
   2.284 +
   2.285 +#+end_src
   2.286 +
   2.287 +#+results:
   2.288 +: (POUND KARATE CHOP DOUBLESLAP COMET PUNCH MEGA PUNCH PAY DAY FIRE PUNCH ICE PUNCH THUNDERPUNCH SCRATCH VICEGRIP GUILLOTINE RAZOR WIND SWORDS DANCE CUT GUST WING ATTACK WHIRLWIND FLY BIND SLAM VINE WHIP STOMP DOUBLE KICK MEGA KICK JUMP KICK ROLLING KICK SAND-ATTACK HEADBUTT HORN ATTACK FURY ATTACK HORN DRILL TACKLE BODY SLAM WRAP TAKE DOWN THRASH DOUBLE-EDGE TAIL WHIP POISON STING TWINEEDLE PIN MISSILE LEER BITE GROWL ROAR SING SUPERSONIC SONICBOOM DISABLE ACID EMBER FLAMETHROWER MIST WATER GUN HYDRO PUMP SURF ICE BEAM BLIZZARD PSYBEAM BUBBLEBEAM AURORA BEAM HYPER BEAM PECK DRILL PECK SUBMISSION LOW KICK COUNTER SEISMIC TOSS STRENGTH ABSORB MEGA DRAIN LEECH SEED GROWTH RAZOR LEAF SOLARBEAM POISONPOWDER STUN SPORE SLEEP POWDER PETAL DANCE STRING SHOT DRAGON RAGE FIRE SPIN THUNDERSHOCK THUNDERBOLT THUNDER WAVE THUNDER ROCK THROW EARTHQUAKE FISSURE DIG TOXIC CONFUSION PSYCHIC HYPNOSIS MEDITATE AGILITY QUICK ATTACK RAGE TELEPORT NIGHT SHADE MIMIC SCREECH DOUBLE TEAM RECOVER HARDEN MINIMIZE SMOKESCREEN CONFUSE RAY WITHDRAW DEFENSE CURL BARRIER LIGHT SCREEN HAZE REFLECT FOCUS ENERGY BIDE METRONOME MIRROR MOVE SELFDESTRUCT EGG BOMB LICK SMOG SLUDGE BONE CLUB FIRE BLAST WATERFALL CLAMP SWIFT SKULL BASH SPIKE CANNON CONSTRICT AMNESIA KINESIS SOFTBOILED HI JUMP KICK GLARE DREAM EATER POISON GAS BARRAGE LEECH LIFE LOVELY KISS SKY ATTACK TRANSFORM BUBBLE DIZZY PUNCH SPORE FLASH PSYWAVE SPLASH ACID ARMOR CRABHAMMER EXPLOSION FURY SWIPES BONEMERANG REST ROCK SLIDE HYPER FANG SHARPEN CONVERSION TRI ATTACK SUPER FANG SLASH SUBSTITUTE STRUGGLE)
   2.289 +: ([1 POUND] [2 KARATE CHOP] [3 DOUBLESLAP] [4 COMET PUNCH] [5 MEGA PUNCH] [6 PAY DAY] [7 FIRE PUNCH] [8 ICE PUNCH] [9 THUNDERPUNCH] [10 SCRATCH] [11 VICEGRIP] [12 GUILLOTINE] [13 RAZOR WIND] [14 SWORDS DANCE] [15 CUT] [16 GUST] [17 WING ATTACK] [18 WHIRLWIND] [19 FLY] [20 BIND] [21 SLAM] [22 VINE WHIP] [23 STOMP] [24 DOUBLE KICK] [25 MEGA KICK] [26 JUMP KICK] [27 ROLLING KICK] [28 SAND-ATTACK] [29 HEADBUTT] [30 HORN ATTACK] [31 FURY ATTACK] [32 HORN DRILL] [33 TACKLE] [34 BODY SLAM] [35 WRAP] [36 TAKE DOWN] [37 THRASH] [38 DOUBLE-EDGE] [39 TAIL WHIP] [40 POISON STING] [41 TWINEEDLE] [42 PIN MISSILE] [43 LEER] [44 BITE] [45 GROWL] [46 ROAR] [47 SING] [48 SUPERSONIC] [49 SONICBOOM] [50 DISABLE] [51 ACID] [52 EMBER] [53 FLAMETHROWER] [54 MIST] [55 WATER GUN] [56 HYDRO PUMP] [57 SURF] [58 ICE BEAM] [59 BLIZZARD] [60 PSYBEAM] [61 BUBBLEBEAM] [62 AURORA BEAM] [63 HYPER BEAM] [64 PECK] [65 DRILL PECK] [66 SUBMISSION] [67 LOW KICK] [68 COUNTER] [69 SEISMIC TOSS] [70 STRENGTH] [71 ABSORB] [72 MEGA DRAIN] [73 LEECH SEED] [74 GROWTH] [75 RAZOR LEAF] [76 SOLARBEAM] [77 POISONPOWDER] [78 STUN SPORE] [79 SLEEP POWDER] [80 PETAL DANCE] [81 STRING SHOT] [82 DRAGON RAGE] [83 FIRE SPIN] [84 THUNDERSHOCK] [85 THUNDERBOLT] [86 THUNDER WAVE] [87 THUNDER] [88 ROCK THROW] [89 EARTHQUAKE] [90 FISSURE] [91 DIG] [92 TOXIC] [93 CONFUSION] [94 PSYCHIC] [95 HYPNOSIS] [96 MEDITATE] [97 AGILITY] [98 QUICK ATTACK] [99 RAGE] [100 TELEPORT] [101 NIGHT SHADE] [102 MIMIC] [103 SCREECH] [104 DOUBLE TEAM] [105 RECOVER] [106 HARDEN] [107 MINIMIZE] [108 SMOKESCREEN] [109 CONFUSE RAY] [110 WITHDRAW] [111 DEFENSE CURL] [112 BARRIER] [113 LIGHT SCREEN] [114 HAZE] [115 REFLECT] [116 FOCUS ENERGY] [117 BIDE] [118 METRONOME] [119 MIRROR MOVE] [120 SELFDESTRUCT] [121 EGG BOMB] [122 LICK] [123 SMOG] [124 SLUDGE] [125 BONE CLUB] [126 FIRE BLAST] [127 WATERFALL] [128 CLAMP] [129 SWIFT] [130 SKULL BASH] [131 SPIKE CANNON] [132 CONSTRICT] [133 AMNESIA] [134 KINESIS] [135 SOFTBOILED] [136 HI JUMP KICK] [137 GLARE] [138 DREAM EATER] [139 POISON GAS] [140 BARRAGE] [141 LEECH LIFE] [142 LOVELY KISS] [143 SKY ATTACK] [144 TRANSFORM] [145 BUBBLE] [146 DIZZY PUNCH] [147 SPORE] [148 FLASH] [149 PSYWAVE] [150 SPLASH] [151 ACID ARMOR] [152 CRABHAMMER] [153 EXPLOSION] [154 FURY SWIPES] [155 BONEMERANG] [156 REST] [157 ROCK SLIDE] [158 HYPER FANG] [159 SHARPEN] [160 CONVERSION] [161 TRI ATTACK] [162 SUPER FANG] [163 SLASH] [164 SUBSTITUTE] [165 STRUGGLE])
   2.290 +: 
   2.291 +: (5 13 14 18 25 92 32 34 36 38 61 55 58 59 63 6 66 68 69 99 72 76 82 85 87 89 90 91 94 100 102 104 115 117 118 120 121 126 129 130 135 138 143 156 86 149 153 157 161 164 15 19 57 70 148)
   2.292 +: (MEGA PUNCH . RAZOR WIND . SWORDS DANCE . WHIRLWIND . MEGA KICK . TOXIC . HORN DRILL . BODY SLAM . TAKE DOWN . DOUBLE-EDGE . BUBBLEBEAM . WATER GUN . ICE BEAM . BLIZZARD . HYPER BEAM . PAY DAY . SUBMISSION . COUNTER . SEISMIC TOSS . RAGE . MEGA DRAIN . SOLARBEAM . DRAGON RAGE . THUNDERBOLT . THUNDER . EARTHQUAKE . FISSURE . DIG . PSYCHIC . TELEPORT . MIMIC . DOUBLE TEAM . REFLECT . BIDE . METRONOME . SELFDESTRUCT . EGG BOMB . FIRE BLAST . SWIFT . SKULL BASH . SOFTBOILED . DREAM EATER . SKY ATTACK . REST . THUNDER WAVE . PSYWAVE . EXPLOSION . ROCK SLIDE . TRI ATTACK . SUBSTITUTE . CUT . FLY . SURF . STRENGTH . FLASH)
   2.293 +
   2.294 +
   2.295 +***
   2.296  #+name: machines
   2.297  #+begin_src clojure
   2.298  (defn hxc-machines
   2.299 @@ -927,13 +1154,14 @@
   2.300  below. Here are some notes for reading it:
   2.301  
   2.302  - Whenever an effect has a chance of doing something (like a chance of
   2.303 -  poisoning the opponent), I list the chance as a hexadecimal amount out of 256 to avoid rounding errors. To convert the hex amount into a percentage, divide by 256.
   2.304 +  poisoning the opponent), I list the chance as a hexadecimal amount
   2.305 +  out of 256; this is to avoid rounding errors. To convert the hex amount into a percentage, divide by 256.
   2.306  - For some effects, the description is too cumbersome to
   2.307    write. Instead, I just write a move name
   2.308    in parentheses, like: (leech seed). That move gives a characteristic example
   2.309    of the effect.
   2.310  - I use the abbreviations =atk=, =def=, =spd=, =spc=, =acr=, =evd= for
   2.311 -  attack, defense, speed, special, accuracy, and evasion. 
   2.312 +  attack, defense, speed, special, accuracy, and evasiveness. 
   2.313  .
   2.314  
   2.315  
   2.316 @@ -1339,6 +1567,24 @@
   2.317  ;; 0x251A (in indexable mem): image decompression routine seems to begin here.
   2.318  
   2.319  
   2.320 +;; Note: There are two tile tables, one from 8000-8FFF, the other from
   2.321 +;; 8800-97FF. The latter contains symbols, possibly map tiles(?), with some japanese chars and stuff at the end. 
   2.322 +(defn print-pixel-letters!
   2.323 +  "The pixel tiles representing letters. Neat!"
   2.324 + ([] (print-pixel-letters! (read-state "oak-speaks"))) 
   2.325 +([state] 
   2.326 +   (map
   2.327 +    (comp
   2.328 +     println
   2.329 +     (partial map #(if (zero? %) \space 0))
   2.330 +     #(if (< (count %) 8)
   2.331 +        (recur (cons 0 %))
   2.332 +        %)
   2.333 +     reverse bit-list)
   2.334 +    
   2.335 +    (take 0xFFF (drop 0x8800 (memory state))))))
   2.336 +
   2.337 +
   2.338  (comment 
   2.339  
   2.340  (def hxc-later
     3.1 Binary file save-states/oak-speaks.sav has changed