SD Filesystem

From 3dbrew
Jump to navigation Jump to search

The 3DS uses an SD Card for general storage of additional game data, music and photos taken with the 3DS.

/DCIM - Photos and images downloaded with the Internet Browser
/Music - Music Files
/Nintendo 3DS - Game Data

Additional game data is stored here:

/Nintendo 3DS/<SomeID>/<SomeID>/extdata/00000000
0000008f - Some 2.0.0-2 data, unknown doesn't appear in extdata management.
00000098 - eShop - EUR (Unconfirmed)
00000207 - Mii Maker - JPN 
0000020d - Face Raiders - JPN
00000210 - Some 2.0.0-2 data, unknown doesn't appear in extdata management.
00000217 - Mii Maker - USA
00000219 - eShop USA
0000021d - Face Raiders - USA
00000227 - Mii Maker - EUR
0000022d - Face Raiders - EUR
0000030c - Nintendogs + Cats - EUR
00000326 - Pokédex 3D - EUR
0000032d - Super Street Fighter IV 3D - USA
0000033b - Ridge Racer 3D - EUR
0000033c - Super Street Fighter IV 3D - EUR
0000034d - Samurai Warriors Chronicles - USA
00000358 - Ridge Racer 3D - USA

All "extra data" under extdata is encrypted. Although these files use 0xFF blocks similar to FLASH saves, extdata can't be decrypted with the xorpad fail like FLASH saves. All "extra data" files can't be copied to other 3DS SD cards, they are locked to the console.

With the introduction of the June update the folder structure changed slightly. You will now find "dbs" and "title" folders located in /Nintendo 3DS/<SomeID>/<SomeID>/ along with the extdata folder. "dbs" contains two files, import.db and title.db - usage currently unknown.

/title/00040000/ Contains eshop downloads (can someone verify these and add for different regions?):
00032600 - Pokedex 3D - EUR (verified)
00042a00 - Legend of Zelda - Link's Awakening - EUR
00054300 - 3D Classics Excitebike - USA
00054e00 - 3D Classics Excitebike - EUR (verified)
00054300 - 3D Classics Excitebike - USA
00045C00 - 3D Classics Excitebike - JPN
For more IDs, see the 00040000 titles on the Title_list.

The above title directories contain two dirs: content and data. content contains 00000000.tmd, .app files, and some cmd dir containing 00000001.cmd, all of which are encrypted with a console-unique key. The data dir contains 00000001.sav, this is the title's encrypted savegame. Although these saves look similar to FLASH savegames, these savegames use proper unique CTR for each AES block in the file, and the CTR properly changes for each savegame write. Renaming these savegames causes home-menu to hang while launching titles, modifying saves throws the usual checksum/hash corruption like gamecard flash saves.

When renaming _any_ of these files/dir under content, the icon in home-menu is still displayed. Modifying any of these files has same result as renaming them. When renaming the cmd dir/cmd file, or 00000000.app, the 3D banner isn't displayed. When renaming the cmd dir or the file contained in that dir, home-menu will refuse to run the title, and the manual will not work.(will display the black screen saying sdcard isn't inserted) Manual won't load when 00000001.app is renamed, so that .app might be the manual? When the main 00000000.app binary is renamed, the title will not launch and in the manual placeholder text is used for the title name/icon. Home-menu doesn't care at all when tmd is renamed. So the manual does not read the data from the same address of the .app file like the the menu. If the manual does not find the name/icon at the correct location in the file, it will display the placeholder text too.

"Private" data is stored here:

/Nintendo 3DS/Private/<Title ID Low>/
00020400 - Nintendo 3DS Camera 
00020500 - Nintendo 3DS Sound


"Private" data for 3DS Sound/Camera are cleartext. Under the camera priv dir is phtcache.bin, this seems to list the pictures on SD card? Under the sound priv dir is: voice/XX/*.m4a. Where XX is 01-10, with sound saved as .m4a.