Changes

1,099 bytes added ,  19:25, 4 December 2014
no edit summary
Line 1: Line 1: −
The Nintendo 3DS has a 1GB NAND Flash chip. Due to the NCSD header, the actual used size of the NAND is 0x3AF00000.
+
The Nintendo 3DS has a 1GB NAND Flash chip. Due to the NCSD header, the actual used size of the Old3DS NAND is 0x3AF00000-bytes(943MiB). On New3DS, the actual NAND size and the total size used by the partitions, is 0x4D800000-bytes(1240MiB).
    
===Format===
 
===Format===
Line 6: Line 6:  
===Encryption===
 
===Encryption===
   −
The NAND file system is encrypted using [[AES|AES-CTR]]. The TWL regions of NAND use the TWL NAND [[AES|keyslot]], while the CTR regions use the CTR NAND [[AES|keyslots]]. The keyslot used for CTR-NAND partitions is determined by the NCSD partition FS type. The TWL/CTR NAND regions are specified by the NCSD header. The NCSD partition encryption flag for each partition indicates whether the TWL keyslot or the CTR keyslots are used for encryption: 0x01=TWL, 0x02=CTR. The first 0x0B100000 bytes of NAND is encrypted with the TWL keyslot, however before 0x00012E00 only the MBR partition table is encrypted with the TWL keyslot. That region contains the TWL partitions listed below.
+
The NAND file system is encrypted using [[AES|AES-CTR]]. The TWL regions of NAND use the TWL NAND [[AES|keyslot]], while the CTR regions use the CTR NAND [[AES|keyslots]]. The keyslot used for each partition is determined by the NCSD partition FS type and encryption type. The TWL/CTR NAND regions are specified by the NCSD header. The first 0x0B100000 bytes of NAND is encrypted with the TWL keyslot, however before 0x00012E00 only the MBR partition table is encrypted with the TWL keyslot. That region contains the TWL partitions listed below.
 +
 
 +
The New3DS CTRNAND partition uses a [[AES|keyslot]] separate from the Old3DS one.
    
Note that re-encrypting a NAND image alone from another 3DS for use on a different 3DS is not enough to use that NAND image on a different 3DS: certain files in the "nand" partition would need modified/replaced as well.
 
Note that re-encrypting a NAND image alone from another 3DS for use on a different 3DS is not enough to use that NAND image on a different 3DS: certain files in the "nand" partition would need modified/replaced as well.
Line 13: Line 15:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 +
!  Old3DS
 +
!  New3DS
 
!  Partition name
 
!  Partition name
 
!  Offset
 
!  Offset
 
!  Size
 
!  Size
 
!  NCSD partition FS type
 
!  NCSD partition FS type
 +
!  NCSD partition encryption type
 
!  NCSD partition index
 
!  NCSD partition index
 
!  Description
 
!  Description
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: green" | Yes
 
|   
 
|   
 
|  0x0
 
|  0x0
 
|  0x200
 
|  0x200
 +
 
|   
 
|   
 
|  
 
|  
 
|  NCSD header, this contains the offsets/sizes of the below CTR-NAND partitions. This block also contains the TWL-NAND MBR partition table.
 
|  NCSD header, this contains the offsets/sizes of the below CTR-NAND partitions. This block also contains the TWL-NAND MBR partition table.
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: green" | Yes
 
|   
 
|   
 
|  0x00000000
 
|  0x00000000
 
|  0x0B100000
 
|  0x0B100000
0x1
+
0x01
 +
|  0x01
 
|  0x00
 
|  0x00
 
|  TWL NAND region
 
|  TWL NAND region
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: green" | Yes
 
|  twln
 
|  twln
 
|  0x00012E00
 
|  0x00012E00
 
|  0x08FB5200
 
|  0x08FB5200
 +
 
|   
 
|   
 
|  
 
|  
 
|  TWL-NAND FAT16 File System. (DSi)
 
|  TWL-NAND FAT16 File System. (DSi)
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: green" | Yes
 
|  twlp
 
|  twlp
 
|  0x09011A00
 
|  0x09011A00
 
|  0x020B6600
 
|  0x020B6600
 +
 
|   
 
|   
 
|  
 
|  
 
|  TWL-NAND PHOTO FAT12 File System. (DSi)
 
|  TWL-NAND PHOTO FAT12 File System. (DSi)
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: green" | Yes
 
|   
 
|   
 
|  0x0B100000
 
|  0x0B100000
 
|  0x00030000
 
|  0x00030000
 
|  0x04
 
|  0x04
 +
|  0x02
 
|  0x01
 
|  0x01
 
|  By default this partition is empty(only contains 0x00/0xFF bytes since it was never written to), when AGB_FIRM was never launched. This contains the AGB_FIRM GBA savegame.
 
|  By default this partition is empty(only contains 0x00/0xFF bytes since it was never written to), when AGB_FIRM was never launched. This contains the AGB_FIRM GBA savegame.
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: green" | Yes
 
|  firm0
 
|  firm0
 
|  0x0B130000
 
|  0x0B130000
 
|  0x00400000
 
|  0x00400000
 
|  0x03
 
|  0x03
 +
|  0x02
 
|  0x02
 
|  0x02
 
|  [[FIRM|Firmware]] partition.
 
|  [[FIRM|Firmware]] partition.
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: green" | Yes
 
|  firm1
 
|  firm1
 
|  0x0B530000
 
|  0x0B530000
 
|  0x00400000
 
|  0x00400000
 
|  0x03
 
|  0x03
 +
|  0x02
 
|  0x03
 
|  0x03
 
|  [[FIRM|Firmware]] partition.(Backup partition, same as above)
 
|  [[FIRM|Firmware]] partition.(Backup partition, same as above)
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: red" | No
 
|   
 
|   
 
|  0x0B930000
 
|  0x0B930000
 
|  0x2F5D0000
 
|  0x2F5D0000
 
|  0x01
 
|  0x01
 +
|  0x02
 
|  0x04
 
|  0x04
 
|  CTR-NAND partition. (3DS)
 
|  CTR-NAND partition. (3DS)
 
|-
 
|-
 +
|  style="background: green" | Yes
 +
|  style="background: red" | No
 
|  nand
 
|  nand
 
|  0x0B95CA00
 
|  0x0B95CA00
 
|  0x2F3E3600
 
|  0x2F3E3600
 +
 
|   
 
|   
 
|   
 
|   
 
|  CTR-NAND FAT16 File System.
 
|  CTR-NAND FAT16 File System.
 +
|-
 +
|  style="background: red" | No
 +
|  style="background: green" | Yes
 +
 +
|  0x0B930000
 +
|  0x41ED0000
 +
|  0x01
 +
|  0x03
 +
|  0x04
 +
|  CTR-NAND partition. (New3DS)
 +
|-
 +
|  style="background: red" | No
 +
|  style="background: green" | Yes
 +
|  nand
 +
|  0x0B95AE00
 +
|  0x41D2D200
 +
 +
 +
 +
|  CTR-NAND FAT16 File System.
 
|}
 
|}
   Line 88: Line 140:  
NAND sectors which were never written to before only contain plaintext 0x00 or 0xFF bytes.
 
NAND sectors which were never written to before only contain plaintext 0x00 or 0xFF bytes.
   −
None of the above physical NAND partitions are normally accessible from the ARM11, except for twlp. CTR/TWL NAND FS can only be accessed when the exheader access control descriptor for those are enabled. Normally the CTR/TWL NAND descriptors are never enabled for retail ARM11 [[NCCH#CXI|CXI]] processes. The ARM11 can only access "nand:/rw/" mounted as the nandrw [[FS:OpenArchive|archive]], and "nand:/ro/" mounted as the nandro archive below.
+
None of the NAND partitions are normally accessible from the ARM11, except for twlp. CTR/TWL NAND FS can only be accessed when the exheader access control descriptor for those are enabled. Normally the CTR/TWL NAND descriptors are never enabled for retail ARM11 [[NCCH#CXI|CXI]] processes. The ARM11 can only access "nand:/rw/" mounted as the nandrw [[FS:OpenArchive|archive]], and "nand:/ro/" mounted as the nandro archive below.
    
==== 0x4000 ====
 
==== 0x4000 ====