CDROM: Implement 0x60 test command

Apparently needed for unirom.
This commit is contained in:
Stenzek 2024-05-30 22:34:04 +10:00
parent 7bc42495fa
commit 3063101274
No known key found for this signature in database

View file

@ -2151,6 +2151,23 @@ void CDROM::ExecuteTestCommand(u8 subcommand)
return; return;
} }
case 0x60:
{
if (s_param_fifo.GetSize() < 2) [[unlikely]]
{
SendErrorResponse(STAT_ERROR, ERROR_REASON_INCORRECT_NUMBER_OF_PARAMETERS);
EndCommand();
return;
}
const u16 addr = ZeroExtend16(s_param_fifo.Peek(0)) | ZeroExtend16(s_param_fifo.Peek(1));
WARNING_LOG("Read memory from 0x{:04X}, returning zero", addr);
s_response_fifo.Push(0x00); // NOTE: No STAT here.
SetInterrupt(Interrupt::ACK);
EndCommand();
return;
}
default: default:
[[unlikely]] [[unlikely]]
{ {