From 792f1697d5f83d03020533d694c545b29d5f6602 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 12 Jul 2023 02:21:26 +0300 Subject: [PATCH 1/1] cdrom: moar hacks libretro/pcsx_rearmed#714 --- libpcsxcore/cdrom.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 5f4ce60e..c092f2ca 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1318,7 +1318,7 @@ static void cdrReadInterrupt(void) } memcpy(cdr.LocL, buf, 8); - if (!cdr.Irq1Pending) + if (!cdr.Stat && !cdr.Irq1Pending) cdrUpdateTransferBuf(buf); if ((!cdr.Muted) && (cdr.Mode & MODE_STRSND) && (!Config.Xa) && (cdr.FirstSector != -1)) { // CD-XA @@ -1515,8 +1515,11 @@ void cdrWrite3(unsigned char rt) { // note: Croc, Shadow Tower (more) vs Discworld Noir (<993) if (!pending && (cdr.CmdInProgress || cdr.Irq1Pending)) { - s32 c = 2048 - (psxRegs.cycle - nextCycle); - c = MAX_VALUE(c, 512); + s32 c = 2048; + if (cdr.CmdInProgress) { + c = 2048 - (psxRegs.cycle - nextCycle); + c = MAX_VALUE(c, 512); + } CDR_INT(c); } } -- 2.39.5