From: notaz Date: Tue, 21 Nov 2023 22:27:27 +0000 (+0200) Subject: cdrom: always error out on shell open X-Git-Tag: r24~43 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a20e961740222fc34d48b8e7a0c6fd7c6909350;p=pcsx_rearmed.git cdrom: always error out on shell open Duckstation claims it has been verified on console. libretro/pcsx_rearmed#804 --- diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index fac5fd39..6d8e631e 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -344,26 +344,22 @@ void cdrLidSeekInterrupt(void) // 02, 12, 10 if (!(cdr.StatP & STATUS_SHELLOPEN)) { + StopReading(); SetPlaySeekRead(cdr.StatP, 0); cdr.StatP |= STATUS_SHELLOPEN; // IIRC this sometimes doesn't happen on real hw // (when lots of commands are sent?) - if (cdr.Reading) { - StopReading(); - SetResultSize(2); - cdr.Result[0] = cdr.StatP | STATUS_SEEKERROR; - cdr.Result[1] = ERROR_SHELLOPEN; - setIrq(DiskError, 0x1006); - } + SetResultSize(2); + cdr.Result[0] = cdr.StatP | STATUS_SEEKERROR; + cdr.Result[1] = ERROR_SHELLOPEN; if (cdr.CmdInProgress) { psxRegs.interrupt &= ~(1 << PSXINT_CDR); cdr.CmdInProgress = 0; - SetResultSize(2); cdr.Result[0] = cdr.StatP | STATUS_ERROR; cdr.Result[1] = ERROR_NOTREADY; - setIrq(DiskError, 0x1007); } + setIrq(DiskError, 0x1006); set_event(PSXINT_CDRLID, cdReadTime * 30); break;