X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=libpcsxcore%2Fcdrom.c;h=28471e2bef2410873d1144d766c0c015276a72ec;hb=b44231721e9094ff3a55fada01b5a5b9d6718632;hp=6d8e631e4be8944bae856d6253a0cb1f26679820;hpb=8a20e961740222fc34d48b8e7a0c6fd7c6909350;p=pcsx_rearmed.git diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 6d8e631e..28471e2b 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -715,6 +715,7 @@ void cdrInterrupt(void) { int read_ok; u16 not_ready = 0; u8 IrqStat = Acknowledge; + u8 DriveStateOld; u16 Cmd; int i; @@ -964,7 +965,16 @@ void cdrInterrupt(void) { second_resp_time = (((cdr.Mode & MODE_SPEED) ? 1 : 2) * 1097107); } SetPlaySeekRead(cdr.StatP, 0); + DriveStateOld = cdr.DriveState; cdr.DriveState = DRIVESTATE_PAUSED; + if (DriveStateOld == DRIVESTATE_SEEK) { + // According to Duckstation this fails, but the + // exact conditions and effects are not clear. + // Moto Racer World Tour seems to rely on this. + // For now assume pause works anyway, just errors out. + error = ERROR_NOTREADY; + goto set_error; + } break; case CdlPause + CMD_PART2: @@ -1625,6 +1635,7 @@ void psxDma3(u32 madr, u32 bcr, u32 chcr) { switch (chcr & 0x71000000) { case 0x11000000: + madr &= ~3; ptr = getDmaRam(madr, &max_words); if (ptr == INVALID_PTR) { CDR_LOG_I("psxDma3() Log: *** DMA 3 *** NULL Pointer!\n");