gte_neon: hook into recompiler
[pcsx_rearmed.git] / libpcsxcore / cdrom.c
index 4ca27e2..ee74835 100644 (file)
@@ -269,11 +269,12 @@ static void Check_Shell( int Irq )
                        i = stat.Status;
                        if (CDR_getStatus(&stat) != -1)
                        {
-                               if (stat.Type == 0xff)
-                                       cdr.Stat = DiskError;
+                               // BIOS hangs + BIOS error messages
+                               //if (stat.Type == 0xff)
+                                       //cdr.Stat = DiskError;
 
                                // case now open
-                               else if (stat.Status & STATUS_SHELLOPEN)
+                               if (stat.Status & STATUS_SHELLOPEN)
                                {
                                        // Vib Ribbon: pre-CD swap
                                        StopCdda();
@@ -860,7 +861,17 @@ void cdrInterrupt() {
                        cdr.Result[0] = cdr.StatP;
                        cdr.Stat = Acknowledge;
 
-                       AddIrqQueue(CdlPause + 0x20, 0x800);
+                       /*
+                       Gundam Battle Assault 2: much slower (*)
+                       - Fixes boot, gameplay
+
+                       Hokuto no Ken 2: slower
+                       - Fixes intro + subtitles
+
+                       InuYasha - Feudal Fairy Tale: slower
+                       - Fixes battles
+                       */
+                       AddIrqQueue(CdlPause + 0x20, cdReadTime * 3);
                        cdr.Ctrl |= 0x80;
                        break;
 
@@ -977,10 +988,9 @@ void cdrInterrupt() {
                        }
 
                        // redump.org - wipe time
-                       /*if( !cdr.Play && CheckSBI(cdr.Result+5) ) {
+                       if( !cdr.Play && CheckSBI(cdr.Result+5) ) {
                                memset( cdr.Result+2, 0, 6 );
                        }
-                       */
 
                        cdr.Stat = Acknowledge;
                        break;
@@ -1601,31 +1611,15 @@ void cdrWrite1(unsigned char rt) {
                /*
                   GameShark CD Player: save time for resume
 
-                  Twisted Metal - World Tour: don't save times for DATA reads
-                  - Only get 1 chance to do this right
-                  */
-               if( cdr.Play && CDR_getStatus(&stat) != -1 ) {
-                       cdr.SetSectorPlay[0] = stat.Time[0];
-                       cdr.SetSectorPlay[1] = stat.Time[1];
-                       cdr.SetSectorPlay[2] = stat.Time[2];
-               }
+                  Twisted Metal - World Tour: don't mix Setloc / CdlPlay cursors
+               */
 
                StopCdda();
                StopReading();
                cdr.Ctrl |= 0x80;
                cdr.Stat = NoIntr;
 
-               /*
-                  Gundam Battle Assault 2: much slower (*)
-                  - Fixes boot, gameplay
-
-                  Hokuto no Ken 2: slower
-                  - Fixes intro + subtitles
-
-                  InuYasha - Feudal Fairy Tale: slower
-                  - Fixes battles
-                  */
-               AddIrqQueue(cdr.Cmd, cdReadTime * 3);
+               AddIrqQueue(cdr.Cmd, 0x800);
                break;
 
        case CdlReset:
@@ -1899,9 +1893,15 @@ void cdrWrite3(unsigned char rt) {
                        return;
                }
 
+               // XA streaming - incorrect timing because of this reschedule
+               // - Final Fantasy Tactics
+               // - various other games
+
+               /*
                if (cdr.Reading && !cdr.ResultReady) {
                        CDREAD_INT((cdr.Mode & MODE_SPEED) ? (cdReadTime / 2) : cdReadTime);
                }
+               */
 
                return;
        }