Line 73:
Line 73:
| 0x78
| 0x78
| Reserved
| Reserved
+
|}
+
+
For ticket.db different pre header is used:
+
+
{| class="wikitable"
+
|-
+
! Start
+
! Length
+
! Description
+
|-
+
| 0x00
+
| 4
+
| Database Type "Magic" (see below)
+
|-
+
| 0x04
+
| 0x04
+
| Unknown (always 0x00000001 ?)
+
|-
+
| 0x08
+
| 0x04
+
| Unknown
+
|-
+
| 0x0C
+
| 0x04
+
| Unknown (0x30 smaller than previous one)
|}
|}
Line 81:
Line 106:
! Database Type
! Database Type
! Magic
! Magic
+
|-
+
| CTR-NAND ticket.db
+
| TICK
|-
|-
| CTR-NAND import.db
| CTR-NAND import.db
Line 206:
Line 234:
! Length
! Length
! Description
! Description
+
! ticket.db only
|-
|-
| 0x0
| 0x0
| 4
| 4
| Unknown
| Unknown
+
| Unknown (0)
|-
|-
| 0x4
| 0x4
| 4
| 4
| Active Flag. If this isn't = 0x1, then this entry slot is unused
| Active Flag. If this isn't = 0x1, then this entry slot is unused
+
| same
|-
|-
| 0x8
| 0x8
| 0x8
| 0x8
| Title ID
| Title ID
+
| same
|-
|-
| 0x10
| 0x10
| 4
| 4
| Title Entry Index
| Title Entry Index
+
| same
|-
|-
| 0x14
| 0x14
| 4
| 4
| Relative Title Info Offset, in blocks (see next field)
| Relative Title Info Offset, in blocks (see next field)
+
| Unknown
|-
|-
| 0x18
| 0x18
| 0x4
| 0x4
| Block Size (Usually 0x80; 0x200 for ticket.db)
| Block Size (Usually 0x80; 0x200 for ticket.db)
+
| Relative Title Info Offset, in BDRI blocks
|-
|-
| 0x1c
| 0x1c
| 4
| 4
| Reserved
| Reserved
+
| Title Info size, in bytes
|-
|-
| 0x20
| 0x20
| 4
| 4
| Unknown, occasionally this value is the title's "Title ID lower"
| Unknown, occasionally this value is the title's "Title ID lower"
+
| Unknown (0)
|-
|-
| 0x24
| 0x24
| 0x4
| 0x4
| Unknown
| Unknown
+
| same
|-
|-
| 0x28
| 0x28
| 0x4
| 0x4
| Unknown
| Unknown
+
| same
|}
|}
Line 315:
Line 354:
| 0x2c
| 0x2c
| Reserved
| Reserved
+
|}
+
+
For ticket.db title info contains a small header and actual ticket data:
+
{| class="wikitable"
+
|-
+
! Start
+
! Length
+
! Description
+
|-
+
| 0x0
+
| 4
+
| Unknown (always 0x00000001?)
+
|-
+
| 0x4
+
| 4
+
| Ticket data size X (=0x530)
+
|-
+
| 0x8
+
| X
+
| [[Ticket|Ticket]] data
|}
|}