Trainer Card Signature: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
m (Reverted edits by Atofeqoly (Talk) to last version by CuleX)
No edit summary
Line 35: Line 35:


[[Category:Technical References]]
[[Category:Technical References]]
[[Category:Gen 4]]
[[Category:Save Data]]

Revision as of 00:31, 3 February 2017

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.