Difference between revisions of "Private/ds/app/484E94*/pit.bin"

From DSiBrew
< Private‎ | ds‎ | app‎ | 484E94*
Jump to navigation Jump to search
(Undo revision 1876 by Remark (Talk))
m
 
(21 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{| border=1
+
'''If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ?'''
|Offset (hex)
+
 
|Meaning
+
 
|Length (bytes)
+
== File Header ==
|Value (ascii)
+
{| class="wikitable" border="1"
|HEX
+
|-
 +
!  OFFSET (bytes)
 +
!  SIZE (bytes)
 +
!  DESCRIPTION (common value)
 +
|-
 +
| 0x00
 +
|  4
 +
|  Magic ("0TIP")
 +
|-
 +
|  0x04
 +
|  4
 +
|  UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)
 +
|-
 +
|  0x08
 +
|  2
 +
|  # slots in the file (3000)
 +
|-
 +
|  0x0A
 +
|  2
 +
|  Folder counter; hundreds' digit (?)
 +
|-
 +
|  0x0C
 +
|  2
 +
|  Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)
 +
|-
 +
|  0x0E
 +
|  2
 +
|  Photo counter (i.e. : next photo's number will be ++photocounter)
 +
|-
 +
|  0x10
 +
|  2
 +
|  UNKNOWN (0x0000)
 
|-
 
|-
|0x0 - 0x7
+
| 0x12
|??
+
| 2
|7
+
| Frame counter (i.e. : next frame's number will be ++framecounter)
|0TIP00_1
 
|0x30 0x54 0x49 0x50 0x30 0x30 0x5F 0x31
 
 
|-
 
|-
|0x8 - 0x13
+
| 0x14
|??
+
| 2
|12
+
| CRC16 of whole file
|
 
|0xB8 0x0B 0x01 0x00 0x01 0x00 0x01 0x00 0x00 0x00 0x02 0x00
 
 
|-
 
|-
|0x14 - 0x15
+
| 0x16
|Checksum ??
+
| 2
|2
+
| Size of header (0x0018)
|
 
|
 
 
|}
 
|}
 +
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.
 +
 +
== Each entry (16 bytes) ==
 +
{| class="wikitable" border="1"
 +
|-
 +
!  OFFSET (bytes)
 +
!  SIZE (bytes)
 +
!  DESCRIPTION (common value)
 +
|-
 +
|  0x00
 +
|  4
 +
|  Date (# seconds since Jan/1/2000)
 +
|-
 +
|  0x04
 +
|  8
 +
|  UNKNOWN (0x00 8 times)
 +
|-
 +
|  0x0C
 +
|  4
 +
|  flags (see below)
 +
|}
 +
 +
=== flags field ===
 +
{| class="wikitable" border="1"
 +
|-
 +
!  OFFSET (bits)
 +
!  SIZE (bits)
 +
!  DESCRIPTION (common value)
 +
|-
 +
|  0
 +
|  1
 +
|  # folder where the photo is; hundreds' digit (?)
 +
|-
 +
|  1
 +
|  7
 +
|  # folder where the photo is; tens' digits
 +
|-
 +
|  8
 +
|  3
 +
|  UNKNOWN (000b)
 +
|-
 +
|  11
 +
|  7
 +
|  Photo's number minus 1
 +
|-
 +
|  18
 +
|  2
 +
|  Sticker (0: None, 1: Star, 2: Clover, 3: Heart)
 +
|-
 +
|  20
 +
|  1
 +
|  Type of the entry (0: Photo, 1: Frame)
 +
|-
 +
|  21
 +
|  11
 +
|  UNKNOWN (0b 11 times)
 +
|}
 +
 +
== Misc information ==
 +
Photos are stored in:
 +
* SD:\DCIM\100NIN01
 +
* SD:\DCIM\100NIN02
 +
Frames are stored in:
 +
* SD:\private\ds\app\484E494A\DCIM\100NIN01
 +
* SD:\private\ds\app\484E494A\DCIM\100NIN02
  
{{stub}}
+
== See also ==
 +
* [[User:Ludo6431/pit-read.c | pit.bin file reader]]
 +
* [[User:Remark/Pit-fixcrc.c | pit.bin crc fixer]]

Latest revision as of 01:59, 31 January 2011

If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ?


File Header

OFFSET (bytes) SIZE (bytes) DESCRIPTION (common value)
0x00 4 Magic ("0TIP")
0x04 4 UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)
0x08 2 # slots in the file (3000)
0x0A 2 Folder counter; hundreds' digit (?)
0x0C 2 Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)
0x0E 2 Photo counter (i.e. : next photo's number will be ++photocounter)
0x10 2 UNKNOWN (0x0000)
0x12 2 Frame counter (i.e. : next frame's number will be ++framecounter)
0x14 2 CRC16 of whole file
0x16 2 Size of header (0x0018)

It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.

Each entry (16 bytes)

OFFSET (bytes) SIZE (bytes) DESCRIPTION (common value)
0x00 4 Date (# seconds since Jan/1/2000)
0x04 8 UNKNOWN (0x00 8 times)
0x0C 4 flags (see below)

flags field

OFFSET (bits) SIZE (bits) DESCRIPTION (common value)
0 1 # folder where the photo is; hundreds' digit (?)
1 7 # folder where the photo is; tens' digits
8 3 UNKNOWN (000b)
11 7 Photo's number minus 1
18 2 Sticker (0: None, 1: Star, 2: Clover, 3: Heart)
20 1 Type of the entry (0: Photo, 1: Frame)
21 11 UNKNOWN (0b 11 times)

Misc information

Photos are stored in:

  • SD:\DCIM\100NIN01
  • SD:\DCIM\100NIN02

Frames are stored in:

  • SD:\private\ds\app\484E494A\DCIM\100NIN01
  • SD:\private\ds\app\484E494A\DCIM\100NIN02

See also