From a02ee86fc0e356c99516bb0d1e76c88a907a796f Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 14 Nov 2012 01:33:27 +0200 Subject: cdrom: some subq hacks --- libpcsxcore/cdrom.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index ce0d66b..1d581e4 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -557,6 +557,8 @@ static void cdrPlayInterrupt_Autopause() Tomb Raider 1 ($7) */ + // .. + 1 is probably wrong, but deals with corrupted subq + good checksum + // (how does real thing handle those?) if( cdr.CurTrack + 1 == btoi( subq->TrackNumber ) ) track_changed = 1; } else { @@ -586,13 +588,14 @@ static void cdrPlayInterrupt_Autopause() StopCdda(); } - if (cdr.Mode & MODE_REPORT) { + else if (cdr.Mode & MODE_REPORT) { if (subq != NULL) { #ifdef CDR_LOG CDR_LOG( "REPPLAY SUB - %X:%X:%X\n", subq->AbsoluteAddress[0], subq->AbsoluteAddress[1], subq->AbsoluteAddress[2] ); #endif - cdr.CurTrack = btoi( subq->TrackNumber ); + // breaks when .sub doesn't have index 0 for some reason (bad rip?) + //cdr.CurTrack = btoi( subq->TrackNumber ); if (subq->AbsoluteAddress[2] & 0xf) return; @@ -783,7 +786,7 @@ void cdrInterrupt() { cdr.SetSectorPlay[2] = cdr.ResultTD[0]; // reset data - Set_Track(); + //Set_Track(); Find_CurTrack(); ReadTrack( cdr.SetSectorPlay ); -- cgit v1.2.3