From 4feed8d3c6c867a45cae54fa7399041c3b5dd2c1 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 27 Jun 2011 18:51:27 +0300 Subject: cdrom: make read reschedule optional Some really nasty timing issues, I guess can only be resolved for good when general timing is good and BIAS is gone. --- libpcsxcore/cdrom.c | 7 ++++--- libpcsxcore/psxcommon.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 87a7c19..33b76fa 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -1905,9 +1905,10 @@ void cdrWrite3(unsigned char rt) { if (cdr.Reading && !cdr.ResultReady) { int left = psxRegs.intCycle[PSXINT_CDREAD].sCycle + psxRegs.intCycle[PSXINT_CDREAD].cycle - psxRegs.cycle; int time = (cdr.Mode & MODE_SPEED) ? (cdReadTime / 2) : cdReadTime; - if (left < time / 2) { // rearmed guesswork hack - //printf("-- resched %d -> %d\n", left, time / 2); - CDREAD_INT(time / 2); + if (Config.CdrReschedule != 2) + if (left < time / 2 || Config.CdrReschedule) { // rearmed guesswork hack + //printf("-- resched %d -> %d\n", left, time); + CDREAD_INT(time); } } diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index 500c44a..9f12e3b 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -127,6 +127,7 @@ typedef struct { boolean RCntFix; boolean UseNet; boolean VSyncWA; + boolean CdrReschedule; u8 Cpu; // CPU_DYNAREC or CPU_INTERPRETER u8 PsxType; // PSX_TYPE_NTSC or PSX_TYPE_PAL #ifdef _WIN32 -- cgit v1.2.3