Advertisement
Guest User

Untitled

a guest
Dec 31st, 2010
1,710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. This is Apple's iPod 6G SilverDB file format (BIN file)
  2. Everything LSB first (x86-style), so mac users need to pay extra attention.
  3.  
  4.  
  5. *** Header (28 bytes) ***
  6.  
  7. Datatype Description Comment
  8. -------- -------------------- -------------------------------------------------
  9. int32 Magic? Format?always 3h
  10. int32 Character code page? Differs only for Russian language and image packs
  11. int32 DB Table type? 1h for iamge pack, 2h for language pack
  12. char[4] DB Table type? "paMB" for image pack, "mTDL" for language pack
  13. int32 numFiles Number of files in this pack
  14. int32 Unknown always 1h
  15. int32 Unknown 1Ch for image pack, 2Ch for language pack
  16.  
  17.  
  18. *** File table format (12 bytes for each file) ***
  19. (Applies to the image pack (SilverImagesDB.LE.bin) only)
  20.  
  21. Datatype Description Comment
  22. -------- ----------- -----------------------------------------------------
  23. int32 File serial number
  24. int32 File offset Starts counting at the address after this table,
  25. so add 28+12*numFiles to this number for file offset.
  26. int32 File size
  27.  
  28.  
  29.  
  30. *** Each image file starts with a fixed header. (32 bytes) ***
  31.  
  32. Datatype Description Comment
  33. -------- --------------- ----------------------------
  34. int16 Format See next table*
  35. int16 Unknown always 1h
  36. int16 Width of sprite (pixels)
  37. int16 Flags? I've only seen instances with just 1 bit set
  38. int32 Unused?
  39. int32 Unused?
  40. int32 Height of frame (pixels)
  41. int32 Width of frame (pixels)
  42. int32 Serial Same as serial in file table
  43. int32 Size Same as size in file table
  44.  
  45. Note that an image describes a frame size and a (possibly smaller) sprite size.
  46. Only the sprite contains data and what happens to the letterboxing is unknown
  47. (maybe one of the unknown fields defines it? Where I stumbled upon letterboxing,
  48. it was supposed to be black)
  49.  
  50.  
  51.  
  52. *** File format table ***
  53.  
  54. Value Description Detail
  55. ----- ---------------------------------- ---------------------------------------------------------
  56. 0004h 4 BPP Grayscale, 2 pixels per byte, first pixel in upper nibble
  57. 0008h 8 BPP Grayscale
  58. 0565h 16 BPP (RGB565) Byte2:Byte1 = RRRRRGGG:GGGBBBBB
  59. 1888h 32 BPP (ARGB8888) Byte4:Byte3:Byte2:Byte1 = A:R:G:B
  60. 0064h 8 BPP Paletted (256 colors max) One int32 for palette size,
  61. then 4 times that amount of ARGB8888 bytes,
  62. then 8 BPP image data
  63. 0065h 16 BPP Paletted (65536 colors max) One int32 for palette size,
  64. then 4 times that amount of ARGB8888 bytes,
  65. then 16 BPP image data (LSB first)
  66.  
  67. Feel free to update this if you find new information.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement