Match CMemoryCardDriver::StartCardFormat

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-11 15:30:49 +03:00
parent bab26cf95f
commit 408d89630c
No known key found for this signature in database
GPG Key ID: E224F951761145F8
4 changed files with 11 additions and 4 deletions

View File

@ -1129,8 +1129,8 @@ GetNumFreeBytes__14CMemoryCardSysFQ214CMemoryCardSys15EMemoryCardPortRUi:
/* 8034E340 0034B2A0 38 21 00 20 */ addi r1, r1, 0x20
/* 8034E344 0034B2A4 4E 80 00 20 */ blr
.global FormatCard__14CMemoryCardSysFQ214CMemoryCardSys15EMemoryCardPort
FormatCard__14CMemoryCardSysFQ214CMemoryCardSys15EMemoryCardPort:
.global FormatCard__14CMemoryCardSysF15EMemoryCardPort
FormatCard__14CMemoryCardSysF15EMemoryCardPort:
/* 8034E348 0034B2A8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8034E34C 0034B2AC 7C 08 02 A6 */ mflr r0
/* 8034E350 0034B2B0 38 80 00 00 */ li r4, 0

View File

@ -1345,7 +1345,7 @@ StartCardFormat__17CMemoryCardDriverFv:
/* 8024D3FC 0024A35C 38 00 00 25 */ li r0, 0x25
/* 8024D400 0024A360 90 03 00 10 */ stw r0, 0x10(r3)
/* 8024D404 0024A364 80 63 00 00 */ lwz r3, 0(r3)
/* 8024D408 0024A368 48 10 0F 41 */ bl FormatCard__14CMemoryCardSysFQ214CMemoryCardSys15EMemoryCardPort
/* 8024D408 0024A368 48 10 0F 41 */ bl FormatCard__14CMemoryCardSysF15EMemoryCardPort
/* 8024D40C 0024A36C 7C 64 1B 79 */ or. r4, r3, r3
/* 8024D410 0024A370 41 82 00 0C */ beq lbl_8024D41C
/* 8024D414 0024A374 7F E3 FB 78 */ mr r3, r31

View File

@ -75,6 +75,7 @@ public:
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 FormatCard(EMemoryCardPort port);
static ProbeResults IsMemoryCardInserted(EMemoryCardPort);
static ECardResult GetSerialNo(EMemoryCardPort port, long long& serialOut);

View File

@ -630,7 +630,13 @@ void CMemoryCardDriver::StartFileDeleteAltTransactional() {
UpdateFileAltDeleteTransactional(result);
}
void CMemoryCardDriver::StartCardFormat() {}
void CMemoryCardDriver::StartCardFormat() {
x14_error = kE_OK;
x10_state = kS_CardFormat;
ECardResult result = CMemoryCardSys::FormatCard(x0_cardPort);
if (result != kCR_READY)
UpdateCardFormat(result);
}
void CMemoryCardDriver::InitializeFileInfo() {}