Character encoding (Generation II): Difference between revisions

This could potentially go runaway very easily... But let's try making a place for detailing where the character encoding is used (esp if it's not on another page already). These indices are iffy tho..
m (→‎Character sets: +Korean link)
(This could potentially go runaway very easily... But let's try making a place for detailing where the character encoding is used (esp if it's not on another page already). These indices are iffy tho..)
Line 206: Line 206:
| 0x5F || colspan=2 | Prints a period (0xE8) and simultaneously functions as a string terminator. ''(Only used in Japanese Pokédex entries.)''
| 0x5F || colspan=2 | Prints a period (0xE8) and simultaneously functions as a string terminator. ''(Only used in Japanese Pokédex entries.)''
|}
|}
==Uses==
Strings using this character encoding are found in various places, including the [[Save data structure in Generation II|save data structure]] in RAM and the [[Trainer data structure in Generation II|Trainer data structure]] and the below examples in ROM.
===Species names===
The names of all the Pokémon are stored in a simple list of 256 strings. In international versions, each entry is 10 bytes, while in Japanese versions, they are 5 bytes. If a name takes less than its full allotted length, it is terminated by <code>0x50</code>. The first name is Bulbasaur (index number 1), and the last (256th) name is that of the glitch Pokémon [[Five question marks#Hex 00|????? at index 0]].
These names are used for a variety of things, such as naming wild Pokémon and diplaying the species name in the Pokédex and on summary screens.
The following are ROM offsets for the first name (Bulbasaur) in each game:
{| class="roundy" style="text-align: center; background: #C0C0FF; border: 3px solid blue; margin-bottom: 10px"
! Game || English || Japanese
|- style="background:#F8F8FF"
| '''{{color2|{{gold color}}|Pokémon Gold and Silver Versions|Gold}}'''
| <code>0x1B0B74</code>
| <code>0x053A09</code>
|- style="background:#F8F8FF"
| '''{{color2|{{silver color}}|Pokémon Gold and Silver Versions|Silver}}'''
| <code>0x1B0B74</code>
| <code>0x053A09</code>
|- style="background:#F8F8FF"
| '''{{color2|{{crystal color}}|Pokémon Crystal Version|Crystal}}'''
| <code>0x053384</code>
| <code>0x05341A</code>
|}


{{data structure}}<br>
{{data structure}}<br>
{{Project Games notice|data structure}}
{{Project Games notice|data structure}}