Icon.bin: Difference between revisions

No edit summary
Ludo6431 (talk | contribs)
 
(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 bLAStY wrote. Icon files were supplied by loopy.
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
| 2
| 1
| File Version/Magic (should be 0x0301)
| 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
|-
|-
| 0x0230
| 0x0220
| 32
| 32
| Palette for above
| Palette for above
|-
|-
| 0x0250
| 0x0240
| 256*8
| 256*16
| Application Title (in 8 languages), wide chars
| Application Titles, wide chars
|-
| 0x0A40
| 2048
| Padding (00's)
|-
|-
| 0x1240
| 0x1240
Line 53: Line 53:
|-
|-
| 0x2340
| 0x2340
| 80
| 128
| Animation Sequence
| Animation Sequence
|}
|}
Languages (in correct order) are: Japanese, English, French, German, Italian, Spanish, Unknown, Unknown.
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;
  r = (r << 3) | (r >> 2);
   u8 b = ((color >> 10) & 0x1f)<<3;
  g = (g << 3) | (g >> 2);
</source>
  b = (b << 3) | (b >> 2);
 
== 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
|}