Difference between revisions of "Icon.bin"
|Line 18:||Line 18:|
| File Version/Magic (should be
| File Version/Magic (should be )
| 4 CRC checksums (polynominal
| 4 CRC checksums (polynominal 0xA001)
Revision as of 13:16, 27 April 2009
These are the banners you'll see in various places in the System Menu. They have the dimension 32x32 pixels.
These are converted by a tool bLAStY wrote. Icon files were supplied by loopy.
Basic File Structure
|0x0000||2||File Version/Magic (should be 0x0103)|
|0x0002||2*4||4 CRC checksums (polynominal 0xA001)|
|0x0220||32||Palette for above|
|0x0240||256*8||Application Title (in 8 languages), wide chars|
|0x1240||512*8||8 Bitmaps (for animation)|
Languages (in correct order) are: Japanese, English, French, German, Italian, Spanish, Unknown, Unknown.
The sequence is represented by 2-byte tokens, in the following format (we're now talking bits, from left to right):
|8||Frame Duration (in frames (one frame = 1/60sec))||0x00FF|
Both bytes being zero indicates the end of the sequence. If the first token is zero, the non-animated default image is shown.
The bitmap is tiled 8x8 pixels (Nintendo tends to do this). Each pixel contain 4 bits of data, being the index into the palette specified by the current sequence-token.
Each color in the palette is in the standard 2-byte RGB5551 format (used since GBA).
The conversion to RGB888 is made like this (C):
u8 r = ((color ) & 0x1f)<<3; u8 g = ((color >> 5) & 0x1f)<<3; u8 b = ((color >> 10) & 0x1f)<<3;
The CRC-output is not bitwise inverted after the calculation, but it is byte-swapped to big-endian. Polynominal used is: 0xA001, same for all.