Game Save Demos

Description

The SAVE demo programs can be found in the following location in the SDK:

$CAFE_ROOT/system/src/demo/save/

The following table contains descriptions of each demo. We recommend examining the demos in the listed order.

1. Save file access demo (save_read_write_file.c) Demonstrates accessing save data for the current account.
2. Volume state callback demo (save_state_change_callback.c) Demonstrates notification for the change in volume state. The change in state is indicated by the callback function.
NOTE:
This demo intentionally generates a fatal file system error by passing an invalid argument. There is no cause for alarm if the word "fatal" appears in the log.
3. Volume state polling demo (save_state_change_polling.c) Demonstrates polling for the change in volume state. The change in state is indicated by the polling function.
NOTE:
This demo intentionally generates a fatal file system error by passing an invalid argument. There is no cause for alarm if the word "fatal" appears in the log.
4. Read save directory demo (save_read_dir.c) Demonstrates reading a directory and listing file and directory names in the save directory.
5. Make save directory demo (save_make_dir.c) Demonstrates how to make a save directory and a save subdirectory. If the directory exists, a new directory is not made.
6. Get save file status demo (save_get_stat.c) Demonstrates how to get the status of a save file. This code checks for the existence of the file in the range from /vol/save/data00.txt through /vol/save/data07.txt. If no file exists, the new file is created.
7. Access other accounts save files demo (save_read_write_multi_accounts_files.c) Demonstrates accessing other save data for the current account.
8. Access other application save files demo (save_read_other.cpp) Introduces how to access save data files that were created in another application with save_read_write_file.

Revision History

2013-05-08 Automated cleanup pass.
2012-09-24 Added save_read_other.
2012-03-29 Initial version.


CONFIDENTIAL