Match CMemoryCardDriver::StartFileDeleteAltTransactional

Former-commit-id: bab26cf95f
This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-11 15:29:57 +03:00
parent d8b79aa4c1
commit db146fb35e
4 changed files with 12 additions and 4 deletions

View File

@ -870,8 +870,8 @@ FastDeleteFile__14CMemoryCardSysFQ214CMemoryCardSys15EMemoryCardPorti:
/* 8034DFA8 0034AF08 38 21 00 10 */ addi r1, r1, 0x10 /* 8034DFA8 0034AF08 38 21 00 10 */ addi r1, r1, 0x10
/* 8034DFAC 0034AF0C 4E 80 00 20 */ blr /* 8034DFAC 0034AF0C 4E 80 00 20 */ blr
.global DeleteFile__14CMemoryCardSysFiPCc .global "DeleteFile__14CMemoryCardSysF15EMemoryCardPortRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>"
DeleteFile__14CMemoryCardSysFiPCc: "DeleteFile__14CMemoryCardSysF15EMemoryCardPortRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>":
/* 8034DFB0 0034AF10 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8034DFB0 0034AF10 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8034DFB4 0034AF14 7C 08 02 A6 */ mflr r0 /* 8034DFB4 0034AF14 7C 08 02 A6 */ mflr r0
/* 8034DFB8 0034AF18 38 A0 00 00 */ li r5, 0 /* 8034DFB8 0034AF18 38 A0 00 00 */ li r5, 0

View File

@ -1378,7 +1378,7 @@ StartFileDeleteAltTransactional__17CMemoryCardDriverFv:
/* 8024D470 0024A3D0 4B DB 78 49 */ bl string_l__4rstlFPCc /* 8024D470 0024A3D0 4B DB 78 49 */ bl string_l__4rstlFPCc
/* 8024D474 0024A3D4 80 7E 00 00 */ lwz r3, 0(r30) /* 8024D474 0024A3D4 80 7E 00 00 */ lwz r3, 0(r30)
/* 8024D478 0024A3D8 38 81 00 08 */ addi r4, r1, 8 /* 8024D478 0024A3D8 38 81 00 08 */ addi r4, r1, 8
/* 8024D47C 0024A3DC 48 10 0B 35 */ bl DeleteFile__14CMemoryCardSysFiPCc /* 8024D47C 0024A3DC 48 10 0B 35 */ bl "DeleteFile__14CMemoryCardSysF15EMemoryCardPortRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>"
/* 8024D480 0024A3E0 7C 60 1B 78 */ mr r0, r3 /* 8024D480 0024A3E0 7C 60 1B 78 */ mr r0, r3
/* 8024D484 0024A3E4 38 61 00 08 */ addi r3, r1, 8 /* 8024D484 0024A3E4 38 61 00 08 */ addi r3, r1, 8
/* 8024D488 0024A3E8 7C 1F 03 78 */ mr r31, r0 /* 8024D488 0024A3E8 7C 1F 03 78 */ mr r31, r0

View File

@ -73,6 +73,7 @@ public:
static ECardResult MountCard(EMemoryCardPort port); static ECardResult MountCard(EMemoryCardPort port);
static ECardResult CheckCard(EMemoryCardPort port); static ECardResult CheckCard(EMemoryCardPort port);
static ECardResult GetStatus(EMemoryCardPort port, int fileNo, CardStat& statOut); static ECardResult GetStatus(EMemoryCardPort port, int fileNo, CardStat& statOut);
static ECardResult DeleteFile(EMemoryCardPort port, const rstl::string& name);
static ECardResult FastDeleteFile(EMemoryCardPort port, int fileNo); static ECardResult FastDeleteFile(EMemoryCardPort port, int fileNo);
static ProbeResults IsMemoryCardInserted(EMemoryCardPort); static ProbeResults IsMemoryCardInserted(EMemoryCardPort);

View File

@ -621,7 +621,14 @@ void CMemoryCardDriver::StartFileWriteTransactional() {
UpdateFileWriteTransactional(result); UpdateFileWriteTransactional(result);
} }
void CMemoryCardDriver::StartFileDeleteAltTransactional() {} void CMemoryCardDriver::StartFileDeleteAltTransactional() {
x14_error = kE_OK;
x10_state = kS_FileAltDeleteTransactional;
int bidx = x194_fileIdx == 0 ? 1 : 0;
ECardResult result = CMemoryCardSys::DeleteFile(x0_cardPort, rstl::string_l(skSaveFileNames[bidx]));
if (result != kCR_READY)
UpdateFileAltDeleteTransactional(result);
}
void CMemoryCardDriver::StartCardFormat() {} void CMemoryCardDriver::StartCardFormat() {}