android
  #1  
Old 12-17-2009, 07:23 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default RES.BIN File format white paper

Code:
RES.BIN File Format Deconstruction

[Header]
  [NumberOfFiles - 4 Bytes]        = 0x1C 0x00 0x00 0x00 (0x1C,    28)
  [Bin Header Size - 4 Bytes]      = 0xFA 0x02 0x00 0x00 (0x2FA,   762)
    [File 1 Record Size - 4 Bytes] = 0x0E 0x00 0x00 0x00 (0xE,     14)
      [File Size - 4 Bytes]        = 0x77 0x0E 0x00 0x00 (0xE77,   3703)
      [Unknown - 4 Bytes]          = 0x00 0x00 0x00 0x00 (0x00,    0)
      [File Name - Variant(6)]     = 0x62 0x67 0x2E 0x70
                                     0x6E 0x67           ("bg.png")
    . . .
    [File N Record Size - 4 Bytes] = 0x20 0x00 0x00 0x00 (0x20,    32)
      [File Size - 4 Bytes]        = 0x36 0x0F 0x00 0x00 (0xF36,   3894)
      [Unknown - 4 Bytes]          = 0x5B 0x92 0x03 0x00 (0x3925B, 234075)
      [File Name - Variant(24)]    = 0x73 0x75 0x62 0x5F
                                     0x6D 0x65 0x6E 0x75
                                     0x5F 0x62 0x75 0x74
                                     0x74 0x6F 0x6E 0x5F
                                     0x68 0x69 0x67 0x68
                                     0x2E 0x70 0x6E 0x67 ("sub_menu_button_high.png")
[File 1 Data]
. . .
[File N Data]
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 12-17-2009, 07:37 PM
Jan_DK's Avatar
Jan_DK Jan_DK is offline
Junior Member
 
Join Date: Mar 2009
Location: Denmark
Posts: 88
Default

The question is, why use a RES.BIN file in application programming ?

Is it not just a way to group a bunch of bitmaps and to make normal png editing impossible(a form of image protection.)
Reply With Quote

  #3  
Old 12-17-2009, 10:42 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

It might, but it seems that you can use it like a tilemap. eg Load the bin file with image.setresource and cycle through them.

Edit: I was thinking, if it was just for image protection I doubt that they wouldn't have some sort of encryption, or even a checksum. As you found out they don't do that for the firmware updates either.

Last edited by ThievingSix; 12-18-2009 at 12:40 AM.
Reply With Quote

  #4  
Old 12-18-2009, 12:56 AM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

Yes I know double post.

Anyway thanks to Jan_DK finding the calculator application(!) figured out exactly how this is used:

image.setresource("res.bin")
img_button01 = image.load("res/button_01.png")

Not exactly how I imagined it but still useful if you use a lot of images.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:21 PM.