Service/FS: Document and log some unknown values.

In CreateExtSaveData, DeleteExtSaveData and CreateSystemSaveData
This commit is contained in:
Subv 2015-03-19 17:39:00 -05:00
parent 1d61cd4460
commit b9612fe919

View File

@ -494,6 +494,14 @@ static void FormatThisUserSaveData(Service::Interface* self) {
* 1 : Media type (NAND / SDMC)
* 2 : Low word of the saveid to create
* 3 : High word of the saveid to create
* 4 : Unknown
* 5 : Unknown
* 6 : Unknown
* 7 : Unknown
* 8 : Unknown
* 9 : Unknown
* 10: Unknown
* 11: Unknown
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
@ -503,6 +511,13 @@ static void CreateExtSaveData(Service::Interface* self) {
MediaType media_type = static_cast<MediaType>(cmd_buff[1] & 0xFF);
u32 save_low = cmd_buff[2];
u32 save_high = cmd_buff[3];
LOG_WARNING(Service_FS, "(STUBBED) savedata_high=%08X savedata_low=%08X cmd_buff[3]=%08X "
"cmd_buff[4]=%08X cmd_buff[5]=%08X cmd_buff[6]=%08X cmd_buff[7]=%08X cmd_buff[8]=%08X "
"cmd_buff[9]=%08X cmd_buff[10]=%08X cmd_buff[11]=%08X", save_high, save_low,
cmd_buff[3], cmd_buff[4], cmd_buff[5], cmd_buff[6], cmd_buff[7], cmd_buff[8], cmd_buff[9],
cmd_buff[10], cmd_buff[11]);
cmd_buff[1] = CreateExtSaveData(media_type, save_high, save_low).raw;
}
@ -513,15 +528,20 @@ static void CreateExtSaveData(Service::Interface* self) {
* 1 : Media type (NAND / SDMC)
* 2 : Low word of the saveid to create
* 3 : High word of the saveid to create
* 4 : Unknown
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void DeleteExtSaveData(Service::Interface* self) {
// TODO(Subv): Figure out the other parameters.
u32* cmd_buff = Kernel::GetCommandBuffer();
MediaType media_type = static_cast<MediaType>(cmd_buff[1] & 0xFF);
u32 save_low = cmd_buff[2];
u32 save_high = cmd_buff[3];
u32 unknown = cmd_buff[4]; // TODO(Subv): Figure out what this is
LOG_WARNING(Service_FS, "(STUBBED) save_low=%08X save_high=%08X media_type=%08X unknown=%08X",
save_low, save_high, cmd_buff[1] & 0xFF, unknown);
cmd_buff[1] = DeleteExtSaveData(media_type, save_high, save_low).raw;
}
@ -579,6 +599,11 @@ static void CreateSystemSaveData(Service::Interface* self) {
u32 savedata_high = cmd_buff[1];
u32 savedata_low = cmd_buff[2];
LOG_WARNING(Service_FS, "(STUBBED) savedata_high=%08X savedata_low=%08X cmd_buff[3]=%08X "
"cmd_buff[4]=%08X cmd_buff[5]=%08X cmd_buff[6]=%08X cmd_buff[7]=%08X cmd_buff[8]=%08X "
"cmd_buff[9]=%08X", savedata_high, savedata_low, cmd_buff[3], cmd_buff[4], cmd_buff[5],
cmd_buff[6], cmd_buff[7], cmd_buff[8], cmd_buff[9]);
cmd_buff[1] = CreateSystemSaveData(savedata_high, savedata_low).raw;
}