Our 2014 Christmas Contests have begun! Check the Bulbagarden Forums to find out how you could win 1 of 30 copies of ORAS!
Please remember to follow the manual of style and code of conduct at all times.
Check BNN and Bulbanews for up-to-date Pokémon news and discuss it on the forums or in our IRC channel #bulbagarden on irc.systemnet.info.


From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to: navigation, search
Walda's room

Walda Pepper (Japanese: アヤノ Ayano) is a young girl in Rustboro City who is very sick. Her father bought her multiple Poké Dolls—such as Pikachu and the Hoenn starters—to cheer her up, but it has not worked. If the player is able to say something to make her laugh, her father will reward them with a new wallpaper for the Pokémon Storage System.

Words that will make Walda laugh usually consist of random characters and depend on the player's Trainer ID number.

Passphrase calculation

There are 256 different passphrases for every possible wallpaper Walda's father can grant. The primary components that go into a passphrase are:

  • The player's Trainer ID (this will be referred to as tid)
  • An index number for the pattern of the wallpaper (pat)
  • An index number for the icon in the wallpaper (ico)
  • A value for the background color, influencing the majority of the pattern (bcolor)
  • A value for the foreground color, influencing the icons and specific parts of the pattern (fcolor)

The final component can be any random number ranging from 0 to 255 (this will be referred to as key). Different values for this number can create vastly different passphrases, but they will all unlock the same wallpaper. This number simply masks and scrambles the other values.

This section will explain the process of creating a passphrase from the required components, but the game can easily reverse this process to create the proper wallpaper from a given passphrase.



The colors are 2-byte values that represent the five highest bits of the red, green, and blue values in an RGB color in the manner shown below:

00000000 00000000

As an example, if the green color used above—represented as "99FF99" in hexadecimal or 10011001 11111111 10011001 in binary—were chosen for the wallpaper's background, it would be encoded as 01001111 11110011 (0x4FF3 or 20,467) for bcolor.

Patterns and icons

There are 16 different possible patterns and 30 possible icons that can be placed within the patterns. They are described below as they are named in the filb.de generator linked at the bottom of this page. A sample of each of the patterns and some of the icons may be seen here.

Index Pattern
0 Zigzagoon
1 Screen
2 Horizontal
3 Diagonal
4 Block
5 Ribbon*
6 Pokémon Center
7 Frame
8 Symbol
9 Circle
10 Azumarill
11 Pikachu
12 Legendary
13 Dusclops
14 Ludicolo
15 Whiscash
Index Icon
0 Team Aqua
1 Heart
2 5-Star
3 Bricks
4 4-Star
5 Asterisk
6 Dot
7 Cross*
8 Line-Circle
9 Poké Ball
10 Maze
11 Footprint
12 Big Asterisk
13 Circle
14 Koffing
Index Icon
15 Ribbon
16 Bolt*
17 Four Circles
18 Lotad
19 Crystal
20 Pichu
21 Diglett
22 Luvdisc
23 Star in Circle
24 Spinda
25 Latias/Latios
26 Plusle*
27 Minun
28 Togepi
29 Team Magma

The icons that are marked with an asterisk (*) are only available in Japanese versions of Pokémon Emerald. If this index is used in an English passphrase, no icon will appear in the resulting wallpaper. This does not apply to the Ribbon wallpaper, however; that wallpaper can be unlocked in the English version of Emerald, but it is slightly different from the Japanese version.


tid, bcolor, and fcolor are all 2-byte values. However, this algorithm deals with the bytes in these values separately. tid1, bcolor1, and icolor1 will refer to the lowest byte of these values, while tid2, bcolor2, and icolor2 will refer to the highest byte. For example, if the value of tid is 511 (00000001 11111111), then tid1 is 255 (11111111) and tid2 is 1 (00000001).

The player's Trainer ID undergoes a transformation before it is used in the rest of the algorithm.

x = bcolor1 fcolor1icotid2
y = bcolor2fcolor2pattid1

A 9-byte string is then created by joining all of the current values together as follows:

U = (bcolor1) (bcolor2) (icolor1) (icolor2) (ico) (pat) (x) (y) (key)

Next, a bitmask is created using the highest four bits of key. These four bits are repeated to fill the highest 8 bytes of a 9-byte string, with the bits in the lowest byte remaining 0; this string is represented below as mask.

V = Umask

Then, the highest 8 bytes of V are treated as if they are a circular structure (with the lowest bit "connected" back around to the highest bit) and are shifted to the right by (key % 16) bit positions. After this, the whole 9-bytes are treated as a circular structure and shifted right by 21 bit positions. This result will be referred to below as W.

W is the string that will finally be used to create the passphrase. Since a passphrase requires inputting a full-length word and the maximum length of input differs between Japanese and English games, the method of interpreting W to arrive at the passphrase differs between Japanese and English games.

In English games, every 5 bits in W represent a letter in the passphrase. Since W is a 9-byte string (or 72 bits long), it contains enough bits for 14 full letters, with 2 bits left over. To form the last letter and reach the maximum 15-letter length for English input, the letter effectively wraps back to the top of W, using the two lowest bits of W for the letter's two highest bits and the three highest bits of W for the letter's three lowest bits. Letters can be determined by matching the value of each 5-bit number with a character below:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
B C D F G H J K L M N P Q R S T V W Z b c d f g h j k m n p q s

This is largely the first 32 capital and lowercase English letters without vowels, with a select few other letters excluded as well.

So, in an English game, if the first (highest) two bytes of W are 01110111 01011000, the first three letters of the passphrase will be "S" (01110, or 14), "p" (11101, or 29), and "Q" (01100, or 12). If the last (lowest) byte of W is also 00000001, then the last letter of the passphrase will be "P" (01011, or 11).

In Japanese games, every 6 bits in W represent a letter in the passphrase. Since W is a 9-byte string (or 72 bits long), this divides W evenly into a maximum length, 12-letter passphrase. Letters can be determined by matching the value of each 6-bit number with a character below:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

This corresponds to the first 64 characters in the game's Japanese character encoding, offset by 1 to skip the space in the 0 position.

So, in a Japanese game, if the first (highest) two bytes of W are 00001110 00011101, the first two letters of the passphrase will be "え" (000011, or 3) and "め" (100001, or 33).

Note that when the original 9-byte string U (and then V) was being manipulated, the random bitmask and shifting based on key avoided the part of the string (the lowest byte) that contained key itself. The only time key is manipulated is in the final, set shift by 21 bits. Because of this, the game can know exactly how to retrieve key from a passphrase and reverse the entire algorithm to extract the wallpaper components from the passphrase.


Language Name Origin
Japanese アヤノ (Ayano) From 文 aya, design.
English Walda Pepper From "wallpaper".
French Bercia From bercer, to rock.
German Tapetra From Tapete, wallpaper.
Italian Nina
Spanish Anapel From papel, paper.

External links

Pokémon Emerald Secret Word Generator on filb.de

Project CharacterDex logo.png This character related article is a stub. You can help Bulbapedia by expanding it.

Project CharacterDex logo.png This game character article is part of Project CharacterDex, a Bulbapedia project that aims to write comprehensive articles on each character found in the Pokémon games.