# HG changeset patch # User Dylan Holmes # Date 1334287126 18000 # Node ID 8eb674700f153b4ea6e63c8143921e53174dae75 # Parent 1b9137ef7380a63491bed5b44c54b72cb011d6a9 Found in-game pointers to type names; ready to remove manually-coded list. diff -r 1b9137ef7380 -r 8eb674700f15 org/rom.org --- a/org/rom.org Fri Apr 13 07:30:11 2012 -0500 +++ b/org/rom.org Thu Apr 12 22:18:46 2012 -0500 @@ -716,6 +716,13 @@ * Types ** Names of types + +*** COMMENT Pointers to type names +#+begin_src clojure :exports both :results output +(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))))) +#+end_src + + *** #+begin_src clojure :exports both :results output (ns com.aurellem.gb.hxc @@ -1081,6 +1088,9 @@ | 1195C-1196A | The two terms for being able/unable to learn a TM/HM. | Variable-length strings separated by 0x50. | ABLE#NOT ABLE# | | 119C0-119CE | The two terms for being able/unable to evolve using the current stone. | Variable-length strings separated by 0x50. | ABLE#NOT ABLE# | | 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), ... | +|-------------------+-----------------+-----------------+-----------------| +| 27D56 & 27D57. | Pointer to the list of type pointers. | | | +| 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. | | 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#... | | 27E77- | Trainer title names. | Variable-length names separated by 0x80. | YOUNGSTER#BUG CATCHER#LASS#... | | 34000- | | | | @@ -1585,6 +1595,23 @@ (take 0xFFF (drop 0x8800 (memory state)))))) +(defn test-2 [] + (loop [n 0 + pc-1 (pc-trail (-> state-defend (tick) (step [:a]) (step [:a]) (step []) (nstep 100)) 100000) + pc-2 (pc-trail (-> state-speed (tick) (step [:a]) (step [:a]) + (step []) (nstep 100)) 100000)] + (cond (empty? (drop n pc-1)) [pc-1 n] + (not= (take 10 (drop n pc-1)) (take 10 pc-2)) + (recur pc-1 pc-2 (inc n)) + :else + [(take 1000 pc-2) n]))) + + + + + + + (comment (def hxc-later