From f96ca9213c0da0151eef84bf22a59c3da77a6b0e Mon Sep 17 00:00:00 2001 From: gameblabla Date: Sat, 25 Sep 2021 15:20:52 +0200 Subject: [PATCH] CdlSync should be NULL and return an error. This has been confirmed by both Mednafen and nocash's documentation. --- libpcsxcore/cdrom.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 93d2fa45..c1ba796e 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -48,7 +48,7 @@ cdrStruct cdr; static unsigned char *pTransfer; /* CD-ROM magic numbers */ -#define CdlSync 0 +#define CdlSync 0 /* nocash documentation : "Uh, actually, returns error code 40h = Invalid Command...?" */ #define CdlNop 1 #define CdlSetloc 2 #define CdlPlay 3 @@ -576,10 +576,6 @@ void cdrInterrupt() { cdr.Irq = 0; switch (Irq) { - case CdlSync: - // TOOD: sometimes/always return error? - break; - case CdlNop: if (cdr.DriveState != DRIVESTATE_LID_OPEN) cdr.StatP &= ~STATUS_SHELLOPEN; @@ -1003,6 +999,7 @@ void cdrInterrupt() { start_rotating = 1; break; + case CdlSync: default: CDR_LOG_I("Invalid command: %02x\n", Irq); error = ERROR_INVALIDCMD; -- 2.39.5