Icon.bin: Difference between revisions

No edit summary
Ludo6431 (talk | contribs)
 
(One intermediate revision by one other user not shown)
Line 26: Line 26:
| 0x0002
| 0x0002
| 2*4
| 2*4
| 4 CRC checksums (polynominal 0xA001)
| 4 CRC checksums (polynomial 0xA001)
|-
|-
| 0x000A
| 0x000A
Line 95: Line 95:


The conversion to RGB888 is made like this (C):
The conversion to RGB888 is made like this (C):
<source lang="c">
   u8 r = ((color      ) & 0x1f)<<3;
   u8 r = ((color      ) & 0x1f)<<3;
   u8 g = ((color >>  5) & 0x1f)<<3;
   u8 g = ((color >>  5) & 0x1f)<<3;
   u8 b = ((color >> 10) & 0x1f)<<3;
   u8 b = ((color >> 10) & 0x1f)<<3;
</source>


== Checksums ==
== Checksums ==
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.
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"
{| class="wikitable"