Icon.bin: Difference between revisions
No edit summary |
|||
| (10 intermediate revisions by 5 users not shown) | |||
| Line 7: | Line 7: | ||
[[Image:icon_5.gif]] | [[Image:icon_5.gif]] | ||
These are converted by a tool | These are converted by a tool blasty wrote. Icon files were supplied by loopy. | ||
== Basic File Structure == | == Basic File Structure == | ||
| Line 17: | Line 17: | ||
|- | |- | ||
| 0x0000 | | 0x0000 | ||
| | | 1 | ||
| | | Number of titles (5+N) | ||
|- | |||
| 0x0001 | |||
| 1 | |||
| Animated (1=contains animated icon at 0x1240) | |||
|- | |- | ||
| 0x0002 | | 0x0002 | ||
| 2*4 | | 2*4 | ||
| 4 CRC checksums | | 4 CRC checksums (polynomial 0xA001) | ||
|- | |- | ||
| 0x000A | | 0x000A | ||
| Line 32: | Line 36: | ||
| Default Bitmap | | Default Bitmap | ||
|- | |- | ||
| | | 0x0220 | ||
| 32 | | 32 | ||
| Palette for above | | Palette for above | ||
|- | |- | ||
| | | 0x0240 | ||
| 256* | | 256*16 | ||
| Application | | Application Titles, wide chars | ||
|- | |- | ||
| 0x1240 | | 0x1240 | ||
| Line 53: | Line 53: | ||
|- | |- | ||
| 0x2340 | | 0x2340 | ||
| | | 128 | ||
| Animation Sequence | | Animation Sequence | ||
|} | |} | ||
Languages (in correct order) are: Japanese, English, French, German, Italian, Spanish, | Languages (in correct order) are: Japanese, English, French, German, Italian, Spanish, ?Chinese?, Korean. | ||
== Animation Sequence == | == Animation Sequence == | ||
| Line 83: | Line 83: | ||
|- | |- | ||
| 8 | | 8 | ||
| Frame Duration (in frames) | | Frame Duration (in frames (one frame = 1/60sec)) | ||
| 0x00FF | | 0x00FF | ||
|} | |} | ||
| Line 95: | Line 95: | ||
The conversion to RGB888 is made like this (C): | The conversion to RGB888 is made like this (C): | ||
u8 r = (color ) & 0x1f; | <source lang="c"> | ||
u8 g = (color >> 5) & 0x1f; | u8 r = ((color ) & 0x1f)<<3; | ||
u8 b = (color >> 10) & 0x1f; | u8 g = ((color >> 5) & 0x1f)<<3; | ||
u8 b = ((color >> 10) & 0x1f)<<3; | |||
</source> | |||
== Checksums == | |||
The CRC-output is not bitwise inverted after the calculation, but it is byte-swapped to big-endian. Polynomial used is: 0xA001, same for all. | |||
{| class="wikitable" | |||
|- style="background-color: #ddd;" | |||
! Number | |||
! Range | |||
|- | |||
| 0 | |||
| 020-83F | |||
|- | |||
| 1 | |||
| 020-93F | |||
|- | |||
| 2 | |||
| 020-A3F | |||
|- | |||
| 3 | |||
| 1240-23C0 | |||
|} | |||