diff org/rom.org @ 406:8eb674700f15

Found in-game pointers to type names; ready to remove manually-coded list.
author Dylan Holmes <ocsenave@gmail.com>
date Thu, 12 Apr 2012 22:18:46 -0500
parents a6f212ae29a3
children 03ade2a04458
line wrap: on
line diff
     1.1 --- a/org/rom.org	Fri Apr 13 07:30:11 2012 -0500
     1.2 +++ b/org/rom.org	Thu Apr 12 22:18:46 2012 -0500
     1.3 @@ -716,6 +716,13 @@
     1.4  
     1.5  * Types
     1.6  ** Names of types
     1.7 +
     1.8 +*** COMMENT Pointers to type names
     1.9 +#+begin_src clojure :exports both :results output
    1.10 +(map (comp character-codes->str #(take-while (partial not= 80) (drop % (rom))) (partial + 0x20000) (partial apply low-high)) (partition 2 (take 54 (drop 0x27D63 (rom)))))
    1.11 +#+end_src
    1.12 +
    1.13 +
    1.14  ***
    1.15  #+begin_src clojure :exports both :results output 
    1.16  (ns com.aurellem.gb.hxc
    1.17 @@ -1081,6 +1088,9 @@
    1.18  | 1195C-1196A       | The two terms for being able/unable to learn a TM/HM. | Variable-length strings separated by 0x50. | ABLE#NOT ABLE#  |
    1.19  | 119C0-119CE       | The two terms for being able/unable to evolve using the current stone. | Variable-length strings separated by 0x50. | ABLE#NOT ABLE#  |
    1.20  | 1232D-12364       | Which moves are taught by the TMs and HMs | A list of 55 move ids (50 TMs, plus 5 HMs). First, the move that will be taught by TM01; second, the move that will be taught by TM02; and so on. The last five entries are the moves taught by HMs 1-5. (See also, BC000 below) | The first few entries are (5 13 14 18 ...) corresponding to Mega Punch (TM01), Razor Wind (TM02), Swords Dance (TM03), Whirlwind (TM04), ... |
    1.21 +|-------------------+-----------------+-----------------+-----------------|
    1.22 +| 27D56 & 27D57.    | Pointer to the list of type pointers. |                 |                 |
    1.23 +| 27D63-27D99       | Pointers to type names. | Each point is a low-byte, high-byte pair. The names of types follows immediately after this section; see below. | The first pointer is [0x99 0x7D], corresponding to the location 0x2.7D.99, the NORMAL type. |
    1.24  | 27D99-27DFF       | Names of the Pok\eacute{}mon types. | Variable-length type names (strings of character codes). Names are separated by a single 0x80 character. | NORMAL#FIGHTING#... |
    1.25  | 27E77-            | Trainer title names. | Variable-length names separated by 0x80. | YOUNGSTER#BUG CATCHER#LASS#... |
    1.26  | 34000-            |                 |                 |                 |
    1.27 @@ -1585,6 +1595,23 @@
    1.28      (take 0xFFF (drop 0x8800 (memory state))))))
    1.29  
    1.30  
    1.31 +(defn test-2 []
    1.32 +  (loop [n 0
    1.33 +         pc-1 (pc-trail (-> state-defend (tick) (step [:a]) (step [:a]) (step []) (nstep 100)) 100000)
    1.34 +         pc-2 (pc-trail (-> state-speed (tick) (step [:a]) (step [:a])
    1.35 +  (step []) (nstep 100)) 100000)]
    1.36 +    (cond (empty? (drop n pc-1)) [pc-1 n]
    1.37 +          (not= (take 10 (drop n pc-1)) (take 10 pc-2))
    1.38 +          (recur  pc-1 pc-2 (inc n))
    1.39 +          :else
    1.40 +          [(take 1000 pc-2) n])))
    1.41 +
    1.42 +
    1.43 +
    1.44 +
    1.45 +
    1.46 +
    1.47 +
    1.48  (comment 
    1.49  
    1.50  (def hxc-later