Trainer Card Signature

From ProjectPokemon Wiki
Revision as of 14:12, 30 April 2010 by CuleX (talk | contribs) (Added to Technical References)
Jump to navigation Jump to search

First, the offsets.

D/P: 1,536 bytes, starting at 0x00005904
Plat: 1,536 bytes, starting at 0x00005BA8

The signature area is 192 x 64 pixels, for a grand total of 12,288 pixels. This area is divided up into 8x8 groups of pixels. Every 8 bytes of the signature's memory block represents one of these boxes, the first being in the upper left, in the order left-to-right, top-to-bottom (just like reading English).

Within each of those 8 byte structures, each byte represents a row within the pixel group, the least significant byte being the topmost row. Each bit within each byte represents a pixel (1 = Black, 0 = White) in that row, with the least significant bit representing the leftmost pixel.

So, in order to make an 8x8 group with a one pixel black border, you would use the values: FF 81 81 81 81 81 81 FF. 2 dimensionally represented in binary, this gives you:

11111111
10000001
10000001
10000001
10000001
10000001
10000001
11111111

For a 2 pixel wide stripe down the left side, you use: 03 03 03 03 03 03 03 03

11000000
11000000
11000000
11000000
11000000
11000000
11000000
11000000

It's important to remember that the DS uses whichever Endian (I think it's Little) puts the bits in the reverse order that we read them, with the least significant bits to the left.

192 of these groups are assembled to form the image that makes your signature.