This chapter describes restrictions common to both save data and extra data (extended save data). The specifications for card-based applications and downloadable applications are unified as much as possible for Nintendo 3DS systems. As a result, unless noted otherwise, the required restrictions for save data and extra data are the same for both card-based applications and downloadable applications.
This chapter employs the phrase "while writing" a great deal. In addition to referring to points when a write is actually being carried out (for example when a write function is being called), in the process of manual saving this phrase indicates the entire span of time from when the user chooses to save, until when the save completes.
3.4.1 Handling a Power Shutdown While Writing Data
If the system performs shutdown processing while the application is writing extra data or save data without automatic redundancy (in other words, before the write operation has finished), the data will be incomplete and may not be readable when the application tries to load it later. Consequently, if at all possible while avoiding inconvenience to the user, keep any processing after the POWER Button is pressed to within the 4-second period that is the smallest amount of time always provided to the application. Possible ways of accomplishing this include:
- Applying automatic data redundancy to all important data, even if it is extra data.
- Minimizing the size of the files which absolutely must finish being updated.
When the HOME Button is pressed from the POWER Menu, the application is given the necessary time to close normally. There is no way to entirely prevent data from being corrupted when the user forcibly terminates the application by holding down the POWER Button, but it is possible to guarantee that data writes are completed when the application closes normally.
If your application is writing save data without automatic redundancy and it receives a notification that the POWER Button was pressed, it must finish writing the data before it closes.
Here, it is enough to say the application has “finished writing the data” as long as the data has been put in a state where the application can load it later without any conflicts. For example, consider an application that writes a large amount of data in multiple files. If the application is closed between calls to functions that write this data, the application will ultimately not finish writing the data. The application must not close until it has finished calling every function that it uses to write data.
Note that this guideline is not telling you to finish writing data before displaying the POWER Menu. Applications are given processing time even after the POWER Menu has been displayed.
Applications are not required to attempt to decrease transition time to the HOME Menu while formatting corrupted save data in a manner that would not inconvenience the user, or while creating initial save data immediately after formatting corrupt save data.
This guideline only applies to save data that does not have automatic redundancy. However, Nintendo still recommends displaying a "writing in progress" indication for extra data or for save data that does have automatic redundancy. Due to application specifications or user playstyle, it is possible for fatal errors to be caused by the corruption of extra data or the rollback of save data. Following the recommendation can help avoid such errors.
3.4.1.1 Handling Shutdown from the POWER Menu While Writing Data
Guideline Item |
If an application is in the middle of writing save data when the HOME Button is pressed from the POWER Menu, the application must finish writing data before it closes.
|
---|---|
Software to Be Tested |
Applications that write to save data without automatic data redundancy.
|
Exceptions |
While formatting save data, or while creating initial save data immediately after formatting save data.
|
Test Method |
|
Pass/Fail Determination |
Passes if in step 2 you can successfully use the data that was saved when the application closed.
|
3.4.2 Sleep Requests While Writing Data
While the application is in sleep mode due to the Nintendo 3DS being closed, it is possible that the user could mistakenly remove the Game Card or that the battery could run out. This could result in data corruption if a write to save data or extra data was interrupted by the sleep request when the system was closed. Although you can use automatic data redundancy to prevent complete data corruption, the interrupted data writes will still fail. For this reason, if your application is writing save data or extra data and it receives a sleep request, it must finish writing the data before it transitions to Sleep Mode, regardless of whether automatic data redundancy is used. For the definition of what it means to "finish writing the data," see section 3.4.1 Handling a Power Shutdown While Writing Data.
Applications are not required to comply with this item in the cases below, where either having corrupt save data would not inconvenience the user, or where the write is not likely to finish.
- While formatting save data, or while creating initial save data immediately after formatting save data.
- While creating initial extra data.
- When the in-progress write fails either before or after the sleep request is detected.
It is not required to transition to Sleep Mode after the write operation finishes, but if possible Nintendo recommends transitioning to Sleep Mode in accordance with section 2.17.1 Sleep.
3.4.2.1 Handling Sleep Requests While Writing Data
Guideline Item |
When there is a sleep request while writing data, the application must wait to transition to Sleep Mode until it is finished writing the data.
|
---|---|
Software to Be Tested |
Applications that support Sleep Mode and write to save data or extra data.
|
Exceptions |
|
Test Method |
If the application writes to backup memory:
|
If the application writes to an SD Card:
|
|
Pass/Fail Determination |
Passes if in all applicable instances of step 5 you can successfully use the data that was saved when the application closed.
|
3.4.3 Transitioning to the HOME Menu While Writing Data
As explained in section 2.5.2 Launching the HOME Menu, it is acceptable to display the HOME Menu Disabled icon while writing save data or extra data, in order to prevent the user from opening the HOME Menu during the write. This section provides information on what to do if your application allows the user to open the HOME Menu even while the application is writing data.
Just as when the system has been closed, several causes—including removal of the Game Card—could force the application to close suddenly while the application has been suspended by the HOME Menu. As a result, regardless of whether you use automatic data redundancy, you must finish writing data in the background if the HOME Menu is opened while your application is writing save data or extra data. For the definition of what it means to "finish writing the data," see section 3.4.1 Handling a Power Shutdown While Writing Data.
Applications are not required to comply with this item in the cases below, where having corrupt save data would not inconvenience the user.
- While formatting save data, or while creating initial save data immediately after formatting save data.
- While creating initial extra data.
3.4.3.1 Opening the HOME Menu While Writing Data
Guideline Item |
If data is being written when the HOME Menu is opened, the write operation must finish in the background.
|
---|---|
Software to Be Tested |
Applications that allow the HOME Menu to be opened while writing to save data or extra data.
|
Exceptions |
While formatting save data or extra data, or while creating initial data immediately after either formatting operation.
|
Test Method |
|
Pass/Fail Determination |
Passes if in steps 3 and 7 you can successfully use the data that was saved when the application closed.
|