cdrom: tune and log stat hack
authornotaz <notasas@gmail.com>
Thu, 27 Dec 2012 00:24:06 +0000 (02:24 +0200)
committernotaz <notasas@gmail.com>
Tue, 1 Jan 2013 21:33:47 +0000 (23:33 +0200)
libpcsxcore/cdrom.c

index 61e1e7a..d7e36cc 100644 (file)
@@ -650,6 +650,11 @@ static void cdrPlayInterrupt_Autopause()
 void cdrPlayInterrupt()
 {
        if (cdr.Seeked == SEEK_DOING_CMD) {
+               if (cdr.Stat) {
+                       SysPrintf("cdrom: seek stat hack\n");
+                       CDRMISC_INT(0x1000);
+                       return;
+               }
                SetResultSize(1);
                cdr.StatP |= STATUS_ROTATING;
                cdr.StatP &= ~STATUS_SEEK;
@@ -704,7 +709,8 @@ void cdrInterrupt() {
 
        // Reschedule IRQ
        if (cdr.Stat) {
-               CDR_INT( 0x100 );
+               SysPrintf("cdrom: stat hack: %02x %x\n", cdr.Irq, cdr.Stat);
+               CDR_INT(0x1000);
                return;
        }
 
@@ -1294,7 +1300,8 @@ void cdrReadInterrupt() {
                return;
 
        if (cdr.Irq || cdr.Stat) {
-               CDREAD_INT(0x100);
+               SysPrintf("cdrom: read stat hack %02x %x\n", cdr.Irq, cdr.Stat);
+               CDREAD_INT(0x1000);
                return;
        }