| 508 | } |
| 509 | |
| 510 | s32 FileMemoryCard::EraseBlock(uint slot, u32 adr) |
| 511 | { |
| 512 | std::FILE* mcfp = m_file[slot]; |
| 513 | if (!mcfp) |
| 514 | { |
| 515 | DevCon.Error("MemoryCard: Ignoring erase for disabled slot."); |
| 516 | return 1; |
| 517 | } |
| 518 | |
| 519 | if (!Seek(mcfp, adr)) |
| 520 | return 0; |
| 521 | |
| 522 | u8 buf[MC2_ERASE_SIZE]; |
| 523 | std::memset(buf, 0xff, sizeof(buf)); |
| 524 | return std::fwrite(buf, sizeof(buf), 1, mcfp) == 1; |
| 525 | } |
| 526 | |
| 527 | u64 FileMemoryCard::GetCRC(uint slot) |
| 528 | { |
no test coverage detected