diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceSD.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceSD.cpp index 9a1cabbe28..7a3d585a5b 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceSD.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceSD.cpp @@ -480,7 +480,7 @@ u8 CEXISD::ReadForBlockRead() { INFO_LOG_FMT(EXPANSIONINTERFACE, "SD read succeeded at {:#x}", address); block_position = 0; - block_state = BlockState::Block; + block_state = BlockState::Token; block_crc = Common::HashCrc16(block_buffer); } @@ -491,9 +491,11 @@ u8 CEXISD::ReadForBlockRead() // A bit awkward of a setup; a data error token is only read on an actual error. // For now only use the generic error, not e.g. out of bounds // (which can be handled in the main response... why are there 2 ways?) - state = State::ReadyForCommand; - block_state = BlockState::Nothing; - return DATA_ERROR_ERROR; + // state = State::ReadyForCommand; + // block_state = BlockState::Nothing; + // return DATA_ERROR_ERROR; + block_state = BlockState::Block; + return START_BLOCK; case BlockState::Block: { u8 result = block_buffer[block_position++]; @@ -527,7 +529,7 @@ u8 CEXISD::ReadForBlockRead() { INFO_LOG_FMT(EXPANSIONINTERFACE, "SD read succeeded at {:#x}", address); block_position = 0; - block_state = BlockState::Block; + block_state = BlockState::Token; block_crc = Common::HashCrc16(block_buffer); } } @@ -560,7 +562,9 @@ void CEXISD::WriteForBlockRead(u8 byte) // Finish transmitting the current block and then stop if (state == State::MultipleBlockRead) { - INFO_LOG_FMT(EXPANSIONINTERFACE, "Assuming stop transmission; doing nothing currently"); + INFO_LOG_FMT(EXPANSIONINTERFACE, + "Assuming stop transmission; changing to single block read to finish"); + state = State::SingleBlockRead; // JANK, but I think this will work right response.push_back(0); // R1 - for later }