Flash Filesystem: Difference between revisions

Neobrain (talk | contribs)
Reorder and rephase for clarity
Plailect (talk | contribs)
added all known NAND flash sizes
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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).
The Nintendo 3DS has several differently sized NAND flash chips. 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).
 
===Physical Size===
{| class="wikitable" border="1"
! Device
! Manufacturer
! Size
|-
| 2DS
| Toshiba
| 0x3AF00000
|-
| 2DS
| Toshiba
| 0x76000000
|-
| 2DS
| Samsung
| 0x3BA00000
|-
| 2DS
| Samsung
| 0x4D800000
|-
| Old3DS
| Toshiba
| 0x3AF00000
|-
| Old3DS
| Samsung
| 0x3BA00000
|-
| New3DS
| Toshiba
| 0x76000000
|-
| New3DS
| Samsung
| 0x4D800000
|-
| New3DS
| Samsung
| 0x74800000
|}


===Format===
===Format===
Line 32: Line 75:
!  Description
!  Description
|-
|-
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|   
|   
|  0x0
|  0x0
Line 43: Line 86:
|  [[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: #ccffbb" | Yes
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|   
|   
|  0x00000000
|  0x00000000
Line 54: Line 97:
|  TWL NAND region
|  TWL NAND region
|-
|-
|  style="background: red" | No
|  style="background: #ffccbb" | No
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  
|  
| 0x00012C00
| 0x00012C00
Line 65: Line 108:
| Console-unique encrypted New3DS key-storage, see below.
| Console-unique encrypted New3DS key-storage, see below.
|-
|-
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  twln
|  twln
|  0x00012E00
|  0x00012E00
Line 76: Line 119:
|  TWL-NAND FAT16 File System. (DSi)
|  TWL-NAND FAT16 File System. (DSi)
|-
|-
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  twlp
|  twlp
|  0x09011A00
|  0x09011A00
Line 87: Line 130:
|  TWL-NAND PHOTO FAT12 File System. (DSi)
|  TWL-NAND PHOTO FAT12 File System. (DSi)
|-
|-
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|   
|   
|  0x0B100000
|  0x0B100000
Line 98: Line 141:
|  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: #ccffbb" | Yes
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  firm0
|  firm0
|  0x0B130000
|  0x0B130000
Line 109: Line 152:
|  [[FIRM|Firmware]] partition.
|  [[FIRM|Firmware]] partition.
|-
|-
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  firm1
|  firm1
|  0x0B530000
|  0x0B530000
Line 120: Line 163:
|  [[FIRM|Firmware]] partition.(Backup partition, same as above)
|  [[FIRM|Firmware]] partition.(Backup partition, same as above)
|-
|-
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  style="background: red" | No
|  style="background: #ffccbb" | No
|   
|   
|  0x0B930000
|  0x0B930000
Line 131: Line 174:
|  CTR-NAND partition. (3DS)
|  CTR-NAND partition. (3DS)
|-
|-
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  style="background: red" | No
|  style="background: #ffccbb" | No
|  nand
|  nand
|  0x0B95CA00
|  0x0B95CA00
Line 142: Line 185:
|  CTR-NAND FAT16 File System.
|  CTR-NAND FAT16 File System.
|-
|-
|  style="background: red" | No
|  style="background: #ffccbb" | No
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|   
|   
|  0x0B930000
|  0x0B930000
Line 153: Line 196:
|  CTR-NAND partition. (New3DS)
|  CTR-NAND partition. (New3DS)
|-
|-
|  style="background: red" | No
|  style="background: #ffccbb" | No
|  style="background: green" | Yes
|  style="background: #ccffbb" | Yes
|  nand
|  nand
|  0x0B95AE00
|  0x0B95AE00
Line 196: Line 239:
This 0x200-byte sector contains New3DS keys, this entire sector is encrypted with a console-unique keyX+keyY. The keyX+keyY for this is generated by the New3DS [[FIRM|arm9bin-loader]]. Once the arm9bin-loader finishes decrypting this data, the keyX+keyY in the keyslot are then cleared, then the memory used for generating the keydata is disabled(after it finishes using it for TWL key init).
This 0x200-byte sector contains New3DS keys, this entire sector is encrypted with a console-unique keyX+keyY. The keyX+keyY for this is generated by the New3DS [[FIRM|arm9bin-loader]]. Once the arm9bin-loader finishes decrypting this data, the keyX+keyY in the keyslot are then cleared, then the memory used for generating the keydata is disabled(after it finishes using it for TWL key init).


This entire sector is encrypted with AES-ECB, the entire plaintext sector is identical for all retail New3DS systems(unknown for devunits).
This entire sector is encrypted with AES-ECB, the entire plaintext sector is identical for all retail and dev New3DS systems (differing between the two).


=CTR partition=
=CTR partition=