12 Appendix

12.1 How to Trigger File System Access Errors

This chapter outlines methods of triggering specific errors when accessing save data or other files, in order to check whether the application is handling these errors properly.

12.1.1 Card-Based Applications

When Mounting CARD1 Save Data Archives

Error Trigger Method
nn::fs::ResultNotFormatted

Perform the following steps.

  1. Insert the Nintendo 3DS Game Card of the application being tested into a PARTNER-CTR Debugger.
  2. Go to CTRBackup Device and open the Backup device of the CTR FLASH CARD dialog box.
  3. Select Fill specified data in the backup memory, then select Reset the backup device to its factory default state in the drop-down.
  4. Click the Start button.
nn::fs::ResultBadFormat

Perform the following steps.

  1. Insert the Nintendo 3DS Game Card of the application being tested into a PARTNER-CTR Debugger.
  2. Go to CTRBackup Device and open the Backup device of the CTR FLASH CARD dialog box.
  3. Select Fill specified data in the backup memory, then select to invalidate the format of the backup device in the drop-down.
  4. Click the Start button.
nn::fs::ResultVerificationFailed

Perform the following steps.

  1. Insert the Nintendo 3DS Game Card of the application being tested into a PARTNER-CTR Debugger.
  2. Go to CTRBackup Device and open the Backup device of the CTR FLASH CARD dialog box.
  3. Select Write a file to backup memory (File -> Backup Device). For the File name of the file, specify 1MbitVerificationFailed.bin or 4MbitVerificationFailed.bin. These are special save data files that will return nn::fs::ResultVerificationFailed when mounted.
  4. Click the Start button.
Unexpected Error (Under investigation)

When Mounting CARD2 Save Data Archives

Error Trigger Method
nn::fs::ResultNotFormatted (Under investigation)
nn::fs::ResultBadFormat (Under investigation)
nn::fs::ResultVerificationFailed

Perform the following steps.

  1. Load the CCI file of an application in a PARTNER-CTR Debugger unit.
  2.  Execute the following commands in order to output the file: CTRCard operationsCard emulation controlBackup area operations (CARD2)Output backup data in emulation memory to file (Debugger->File).
  3. Open the output file with a hex editor and tamper with the first 4 KB of data.
  4. In PARTNER-CTR Debugger, execute Load file data into emulation memory backup region (File->Debugger), then launch the application.
Unexpected Error (Under investigation)

When Mounting Save Data Archives of Other Applications

Error Trigger Method
nn::fs::ResultNotFound

Perform any of the following:

  • Use SaveDataFiler to delete the relevant save data archive.
  • Remove the media containing the relevant save data archive.

When Mounting Extra Data Archives

Error Trigger Method
nn::fs::ResultNotFound

Perform any of the following:

  • Insert an SD card that has just been formatted.
  • Delete the extra data archive.
nn::fs::ResultMediaNotFound

Perform any of the following:

  • Remove the SD card.
  • Insert an empty miniSD adapter or microSD adapter into the SD Card slot.
nn::fs::ResultNotFormatted

Insert an SD card containing the application’s extra data into a computer. Delete the following directory or file on the SD Card.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 (directory)
  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultBadFormat (Under investigation)
nn::fs::ResultVerificationFailed

Insert an SD card containing the extra data into a computer. Open the following file on the SD card in a hex editor, and tamper with the first 4 KB of data.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultOperationDenied

Insert an SD card containing the application’s extra data into a computer. Set the following directory or file on the SD card to read-only.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 (directory)
  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultWriteProtected Slide the write-prevention tab on the SD card to "lock" the card.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace Make the amount of free space on the SD card extremely low (TBD bytes or less available).
Unexpected Error (Under investigation)

When Mounting Write-Only sdmc Archives

Error Trigger Method
nn::fs::ResultMediaNotFound

Perform any of the following:

  • Remove the SD card.
  • Insert an empty miniSD adapter or microSD adapter into the SD Card slot.
nn::fs::ResultBadFormat (Under investigation)
nn::fs::ResultOperationDenied (Under investigation)
nn::fs::ResultWriteProtected This error does not occur.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
Unexpected Error (Under investigation)

When Operating on Files or Directories in Save Data Archives

Error Trigger Method
nn::fs::ResultNotFound

Perform the following steps.

  1. Launch the application with its save data in the factory-default state, and complete the formatting of save data and creation of initial data.
  2. Use the SaveDataFiler tool to delete all of the save data files.
nn::fs::ResultAlreadyExists (Under investigation)
nn::fs::ResultVerificationFailed

Use the SaveDataFiler tool to tamper with save data and cause an nn::fs::ResultVerificationFailed error to be returned during file and directory operations.

Note: Depending on the state of the save data itself, it might not be possible to corrupt it using the SaveDataFiler tool.

nn::fs::ResultOperationDenied (Under investigation)
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace (Under investigation)
Unexpected Error (Under investigation)

When Operating on Files or Directories in Extra Data Archives

Error Trigger Method
nn::fs::ResultNotFound Use SaveDataFiler to delete the file.
nn::fs::ResultMediaNotFound There is no way to reliably trigger this error.
nn::fs::ResultAlreadyExists (Under investigation)
nn::fs::ResultVerificationFailed

Insert an SD card containing the extra data into a computer. Open the following file on the SD card in a hex editor, and tamper with the first 4 KB of data.

  • All files except 00000001 and 00000002 in the Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 directory.
nn::fs::ResultArchiveInvalidated Remove the SD card.
nn::fs::ResultOperationDenied

Insert an SD card containing the application’s extra data into a computer. Set the following directory or file on the SD card to read-only.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 (directory)
  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultWriteProtected Slide the write-prevention tab on the SD card to "lock" the card.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace Reduce the amount of free space on the SD card until it is less than the size of the file you are attempting to write.
Unexpected Error (Under investigation)

When Operating on Files or Directories in Write-Only sdmc Archives

Error Trigger Method
nn::fs::ResultNotFound (Under investigation)
nn::fs::ResultMediaNotFound

Perform any of the following:

  • Remove the SD card.
  • Insert an empty miniSD adapter or microSD adapter into the SD Card slot.
nn::fs::ResultAlreadyExists (Under investigation)
nn::fs::ResultArchiveInvalidated Remove the SD card.
nn::fs::ResultOperationDenied (Under investigation)
nn::fs::ResultWriteProtected Slide the write-prevention tab on the SD card to "lock" the card.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace Reduce the amount of free space on the SD card until it is less than the size of the file you are attempting to write.
Unexpected Error (Under investigation)

12.1.2 Downloadable Applications

When Mounting Save Data Archives

Error Trigger Method
nn::fs::ResultNotFormatted Use SaveDataFiler to delete the save data archive.
nn::fs::ResultBadFormat (Under investigation)
nn::fs::ResultVerificationFailed

Insert an SD Card with the application into a computer. Open the following file on the SD Card in a hex editor and tamper with the first 4 KB of data.

  • Nintendo 3DS/…/title/<ProgramID Hi32>/<ProgramID Lo32>/data/00000001.sav
Unexpected Error (Under investigation)

When Mounting Save Data Archives of Other Applications

Error Trigger Method
nn::fs::ResultNotFound

Perform any of the following:

  • Use SaveDataFiler to delete the relevant save data archive.
  • If the relevant save data archive is on a Nintendo 3DS Game Card, remove the Game Card.

When Mounting Extra Data Archives

Error Trigger Method
nn::fs::ResultNotFound Delete the extra data archive.
nn::fs::ResultMediaNotFound (Under investigation)
nn::fs::ResultNotFormatted

Insert an SD card containing the application’s extra data into a computer. Delete the following directory or file on the SD Card.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 (directory)
  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultBadFormat (Under investigation)
nn::fs::ResultVerificationFailed

Insert an SD card containing the extra data into a computer. Open the following file on the SD card in a hex editor, and tamper with the first 4 KB of data.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultOperationDenied

Insert an SD card containing the application’s extra data into a computer. Set the following directory or file on the SD card to read-only.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 (directory)
  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultWriteProtected Slide the write-prevention tab on the SD card to "lock" the card.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace Make the amount of free space on the SD card extremely low (TBD bytes or less available).
Unexpected Error (Under investigation)

When Mounting Write-Only sdmc Archives

Error Trigger Method
nn::fs::ResultMediaNotFound (Under investigation)
nn::fs::ResultBadFormat (Under investigation)
nn::fs::ResultOperationDenied (Under investigation)
nn::fs::ResultWriteProtected This error does not occur.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
Unexpected Error (Under investigation)

When Operating on Files or Directories in Save Data Archives

Error Trigger Method
nn::fs::ResultNotFound

Perform the following steps.

  1. Launch the application with its save data in the factory-default state, and complete the formatting of save data and creation of initial data.
  2. Use the SaveDataFiler tool to delete all of the save data files.
nn::fs::ResultAlreadyExists (Under investigation)
nn::fs::ResultVerificationFailed

Use the SaveDataFiler tool to tamper with save data and cause an nn::fs::ResultVerificationFailed error to be returned during file and directory operations.

Note: Depending on the state of the save data itself, it might not be possible to corrupt it using the SaveDataFiler tool.

nn::fs::ResultOperationDenied (Under investigation)
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace (Under investigation)
Unexpected Error (Under investigation)

When Operating on Files or Directories in Extra Data Archives

Error Trigger Method
nn::fs::ResultNotFound Use SaveDataFiler to delete the file.
nn::fs::ResultMediaNotFound There is no way to reliably trigger this error.
nn::fs::ResultAlreadyExists (Under investigation)
nn::fs::ResultVerificationFailed

Insert an SD card containing the extra data into a computer. Open the following file on the SD card in a hex editor, and tamper with the first 4 KB of data.

  • All files except 00000001 and 00000002 in the Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 directory.
nn::fs::ResultArchiveInvalidated (Under investigation)
nn::fs::ResultOperationDenied

Insert an SD card containing the application’s extra data into a computer. Set the following directory or file on the SD card to read-only.

  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000 (directory)
  • Nintendo 3DS/…/extdata/<StorageID Hi32>/<StorageID Lo32>/00000000/00000001
nn::fs::ResultWriteProtected Slide the write-prevention tab on the SD card to "lock" the card.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace Reduce the amount of free space on the SD card until it is less than the size of the file you are attempting to write.
Unexpected Error (Under investigation)

When Operating on Files or Directories in Write-Only sdmc Archives

Error Trigger Method
nn::fs::ResultNotFound (Under investigation)
nn::fs::ResultMediaNotFound (Under investigation)
nn::fs::ResultAlreadyExists (Under investigation)
nn::fs::ResultArchiveInvalidated (Under investigation)
nn::fs::ResultOperationDenied (Under investigation)
nn::fs::ResultWriteProtected Slide the write-prevention tab on the SD card to "lock" the card.
nn::fs::ResultMediaAccessError This error occurs when hardware is the cause, such as when the media is making bad contact, but there is no way to reliably trigger it.
nn::fs::ResultNotEnoughSpace Reduce the amount of free space on the SD card until it is less than the size of the file you are attempting to write.
Unexpected Error (Under investigation)

 


CONFIDENTIAL