Thread: Research: Hex codes in Advance Text
View Single Post
  #1    
Old June 20th, 2013 (1:10 PM).
InMooseWeTrust's Avatar
InMooseWeTrust InMooseWeTrust is offline
Jack of All Trades
     
    Join Date: Jul 2007
    Location: Lansdale, Pennsylvania, USA
    Age: 25
    Gender: Male
    Nature: Careful
    Posts: 814

    Hi all! I'm not sure how to get a thread approved by mods so here goes.

    I was messing around with hex codes in Advance Text yesterday and discovered some peculiar things that I was hoping some people here could help me with. Specifically, I was trying to change text colors when I noticed the colors didn't match up to what everyone else was saying.

    So I did some investigating, and that led me to this.

    Hex "FC" (appears as "\c") is supposed to be the color modifier, right? Well, it does more. Look here:

    Code:
     FC calls for formatting (\c)
    FC01xx        text colors
    FC02xx        text highlight colors
    FC03xx         shadow colors
    FC04xxxxxx        –-
    FC05xx        –-
    FC06xx        font modifier
    FC07            –-
    FC08            –-
    FC09            hides the rest of this line until you press A
    FC0A            --
    FC0Bxxxx        --
    FC0Cxx        replace xx with next character in text
    FC0Dxx        --
    FC0E        ?    skips over text box too fast for me to tell
    FC0F            skips over previous line
    FC10xxxx        --
    FC11xx        --
    FC12xx        --
    FC13xx        --
    FC14xx        --
    FC15            switches to Japanese font (from Latin)
    FC16            switches to Latin font (from Japanese)
    FC17            –-
    FC18            –-
    The "--" means I couldn't find any visible effect. The xx at the end of the hex code is how many bytes the function calls on.

    FC 00 and 19 onwards, no effect. So FC19 would give you index 19 on the character map (ç in English font, Hiragana “no” in Japanese font). The ones I couldn't figure out I left as “--” but they could have some effect. If anybody wants to study this, please let me know what you find.

    Here are the modifiers from the previous list:

    Code:
    Color modifier:
    x0            no color
    x1            no color
    x2            black
    x3 gray?
    x4            red
    x5            orange
    x6            green
    x7            light green
    x8    [blue]    blue
    x9            light blue
    xA            no color
    xB            steel blue
    xC            steel blue
    xD            steel blue
    xE            light blue
    xF            blue

    Font modifier: 00 small Latin characters (this font can be used to fit more text in small space) 01 –- 02 same as [small] in Advance-Text, not sure what it does in English version 03 onwards apparently no effect

    I don't know if anyone else has dicovered that you can not only change text colors, but also highlight and shadow colors.

    We all know that 3rd generation games are compatible with international trades, right? Well, in order for that compatibility to happen, both the Latin and Japanese fonts need to exist in the game code. Apparently HEX FC15 and FC16 switches between both of them. I'm sure there's a way this can be useful for more than just translation.

    I'm going to experiment some more the next few days, especially with the Japanese font now that I know how to access it.

    This might be really useful for ROM translators (I want to try translating Pokémon Altair, Sirius, Vega, Deneb and Procyon). I think people working on Pokémon Debug Ruby might also want to take a look at this.

    Here's the character table for the fonts:

    Code:
    Character Map for fonts
     Hex    EN font    JP font
    00    (space)    (space)
    01    À        a  (hiragana)
    02    Á        i
    03    Â        u
    04    Ç        e
    05    È        o
    06    É        ka
    07    Ê        ki
    08    Ë        ku
    09    Ì        ke
    0A    nothing?    ko
    0B    Î        sa
    0C    Ï        si
    0D    Ò        su
    0E    Ó        se
    0F    Ô        so

    10 Æ ta 11 Ù ti 12 Ú tu 13 Û te 14 Ñ to 15 ß na 16 à ni 17 á nu 18 nothing? ne 19 ç no 1A è ha 1B é hi 1C ê hu (?) 1D ë he 1E ì ho 1F nothing? ma

    20 î mi 21 ï mu 22 ò me 23 ó mo 24 ô ya 25 æ yu 26 ù yo 27 ú ra 28 û ri 29 ñ ru 2A °(degree) re 2B ª ro 2C · (dot) wa 2D & wo 2E + n 2F nothing? a small

    30 nothing? i small 31 nothing? u small 32 nothing? e small 33 nothing? o small 34 [LV] ya small 35 = yu small 36 ; yo small 37 nothing? ga 38 nothing? gi 39 nothing? gu 3A nothing? ge 3B nothing? go 3C nothing? za 3D nothing? zi 3E nothing? zu 3F nothing? ze

    40 nothing? zo 41 nothing? da 42 nothing? di 43 nothing? du 44 nothing? de 45 nothing? do 46 nothing? ba 47 nothing? bi 48 nothing? bu 49 nothing? be 4A nothing? bo 4B nothing? pa 4C nothing? pi 4D nothing? pu 4E nothing? pe 4F nothing? po

    50 nothing? tu small? 51 ¿ a (katakana) 52 ¡ I 53 [PK] u 54 [MN] e 55 [PO] o 56 [Ke] ka 57 [BL] ki 58 [OC] ku 59 [K] ke 5A Í ko 5B % sa 5C ( si 5D ) su 5E nothing? se 5F nothing? so

    60 nothing? ta 61 nothing? ti 62 nothing? tu 63 nothing? te 64 nothing? to 65 nothing? na 66 nothing? ni 67 nothing? nu 68 â ne 69 nothing? no 6A nothing? ha 6B nothing? hi 6C nothing? hu 6D nothing? he 6E nothing? ho 6F î ma

    70 nothing? mi 71 nothing? mu 72 nothing? me 73 nothing? mo 74 nothing? ya 75 nothing? yu 76 nothing? yo 77 nothing? ra 78 nothing? ri 79 U arrow ru 7A D arrow re 7B L arrow ro 7C R arrow wa 7D nothing? wo 7E nothing? n 7F nothing? a small

    80 nothing? i small 81 nothing? u small 82 nothing? e small 83 nothing? o small 84 nothing? ya small 85 nothing? yu small 86 nothing? yo small 87 nothing? ga 88 nothing? gi 89 nothing? gu 8A nothing? ge 8B nothing? go 8C nothing? za 8D nothing? zi 8E nothing? zu 8F nothing? ze

    90 nothing? zo 91 nothing? da 92 nothing? di 93 nothing? du 94 nothing? de 95 nothing? do 96 nothing? ba 97 nothing? bi 98 nothing? bu 99 nothing? be 9A nothing? bo 9B nothing? pa 9C nothing? pi 9D nothing? pu 9E nothing? pe 9F nothing? po

    A0 nothing? tu small A1 0 0 A2 1 1 A3 2 2 A4 3 3 A5 4 4 A6 5 5 A7 6 6 A8 7 7 A9 8 8 AA 9 9 AB ! ! AC ? ? AD . . AE - - AF · dot · dot

    B0 [...] [···] raised B1 " "open B2 " "open B3 ' 'open B4 ' 'close B5 [m] [m] B6 [f] [f] B7 $ $ B8 , . B9 [x] [x] BA / / BB A A BC B B BD C C BE D D BF E E

    C0 F F C1 G G C2 H H C3 I I C4 J J C5 K K C6 L L C7 M M C8 N N C9 O O CA P P CB Q Q CC R R CD S S CE T T CF U U

    D0 V V D1 W W D2 X X D3 Y Y D4 Z Z D5 a a D6 b b D7 c c D8 d d D9 e e DA f f DB g g DC h h DD i I DE j j DF k k

    E0 l l E1 m m E2 n n E3 o o E4 p p E5 q q E6 r r E7 s s E8 t t E9 u u EA v v EB w w EC x x ED y y EE z z EF [>] [>]

    F0 : : F1 Ä Ä F2 Ö Ö F3 Ü Ü F4 ä ä F5 ö ö F6 ü ü F7 [u] nothing? F8 [d] nothing? F9 [l] big space? FA line break FB page break FC \c FD \v FE line break? FF end of text

    If it says "nothing?" it's not actually nothing. Looking at how the hex codes are used elsewhere, they call on certain commands or texts (like ____ gained ____ EXP. Points). I'll post any new information as I get it.

    I'm wondering if in the ROM, for something like a move name, you could just replace the name of the move "Scratch" with \c (format hex FC,japanese font hex 15, text "ひっかく hikaku" with the hex values from the Japanese character map) and if that would appear correctly.

    Just an FYI, you CAN load English save states of Fire Red into Japanese and vice versa. Everything appears correctly, which shows that both versions use the same RAM data structure. There's some kind of flag built into the ROM that sets the region and the Pokémon's nickname. Maybe the Name Rater's script has some clue?

    An up to date version of my findings can be found on Google Docs.
    https://docs.google.com/document/d/1bhsNwf52y4eg_2T5u02tcV7AaezckEpo28XqoCL78-4/edit?usp=sharing

    __________________

    Pokémon: Battles of the Past
    Site Thread
    Black2 FC: 5072 6059 9635

    Reply With Quote