cdrom: an acked response no longer holds back the next one

An acked response whose bytes were never read kept its slot, so the next one was never delivered. OpenBIOS's shell acks GetID's INT3 without reading it and sat waiting for INT2 forever; no disc booted. The unread bytes stay readable until the next response replaces them.
This commit is contained in:
Rix
2026-10-10 02:04:11 -07:00
parent 6f4e4b8709
commit 139b5e27e2
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -293,13 +293,15 @@ class CDRomImpl final : public PCSX::CDRom {
void scheduleDMA(uint32_t cycles) { PCSX::g_emulator->m_cpu->schedule(PCSX::Schedule::CDRDMA, cycles); }
void scheduleDMA(std::chrono::nanoseconds delay) { scheduleDMA(PCSX::psxRegisters::durationToCycles(delay)); }
// An acknowledged response no longer holds its slot: its unread bytes stay readable
// until the next response replaces them.
bool maybeEnqueueResponse(QueueElement &response) {
if (m_responseFifo[0].valueEmpty() && !m_responseFifo[1].empty()) {
m_responseFifo[0] = m_responseFifo[1];
m_responseFifo[1] = response;
return true;
}
if (m_responseFifo[0].empty()) {
if (m_responseFifo[0].valueEmpty()) {
m_responseFifo[0] = response;
return true;
} else if (m_responseFifo[1].empty()) {
+1 -1
View File
@@ -221,7 +221,7 @@ class CDRom {
QueueElement m_commandFifo;
QueueElement m_commandExecuting;
QueueElement m_responseFifo[2];
bool responseFifoFull() { return !m_responseFifo[0].empty() && !m_responseFifo[1].empty(); }
bool responseFifoFull() { return !m_responseFifo[0].valueEmpty() && !m_responseFifo[1].empty(); }
private:
friend class Widgets::IsoBrowser;