mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-24 02:01:48 +01:00
[Core/CD] improved CDC emulation (fixes random freezes during Jeopardy & ESPN Sunday Night NFL intro)
This commit is contained in:
parent
a07f7a3d24
commit
304219da58
@ -2,7 +2,7 @@
|
||||
* Genesis Plus
|
||||
* CD data controller (LC89510 compatible)
|
||||
*
|
||||
* Copyright (C) 2012 Eke-Eke (Genesis Plus GX)
|
||||
* Copyright (C) 2012-2015 Eke-Eke (Genesis Plus GX)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
@ -376,8 +376,8 @@ void cdc_reg_w(unsigned char data)
|
||||
/* start data transfer if data output is enabled */
|
||||
if (cdc.ifctrl & BIT_DOUTEN)
|
||||
{
|
||||
/* set !DTBSY */
|
||||
cdc.ifstat &= ~BIT_DTBSY;
|
||||
/* set !DTBSY and !DTEN */
|
||||
cdc.ifstat &= ~(BIT_DTBSY | BIT_DTEN);
|
||||
|
||||
/* clear DBCH bits 4-7 */
|
||||
cdc.dbc.byte.h &= 0x0f;
|
||||
@ -391,10 +391,7 @@ void cdc_reg_w(unsigned char data)
|
||||
case 2: /* MAIN-CPU host read */
|
||||
case 3: /* SUB-CPU host read */
|
||||
{
|
||||
/* set !DTEN */
|
||||
cdc.ifstat &= ~BIT_DTEN;
|
||||
|
||||
/* set DSR bit (register $04) */
|
||||
/* set DSR bit (SCD register $04) */
|
||||
scd.regs[0x04>>1].byte.h |= 0x40;
|
||||
break;
|
||||
}
|
||||
@ -645,7 +642,7 @@ unsigned char cdc_reg_r(void)
|
||||
unsigned short cdc_host_r(void)
|
||||
{
|
||||
/* check if data is available */
|
||||
if (!(cdc.ifstat & BIT_DTEN))
|
||||
if (scd.regs[0x04>>1].byte.h & 0x40)
|
||||
{
|
||||
/* read data word from CDC RAM buffer */
|
||||
uint16 data = *(uint16 *)(cdc.ram + (cdc.dac.w & 0x3ffe));
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Genesis Plus
|
||||
* CD data controller (LC89510 compatible)
|
||||
*
|
||||
* Copyright (C) 2012 Eke-Eke (Genesis Plus GX)
|
||||
* Copyright (C) 2012-2015 Eke-Eke (Genesis Plus GX)
|
||||
*
|
||||
* Redistribution and use of this code or any derivative works are permitted
|
||||
* provided that the following conditions are met:
|
||||
|
@ -1561,10 +1561,9 @@ void cdd_process(void)
|
||||
{
|
||||
/* Fixes a few games hanging during intro because they expect data to be read with some delay */
|
||||
/* Radical Rex needs at least one interrupt delay */
|
||||
/* Wolf Team games (Anet Futatabi, Cobra Command, Road Avenger & Time Gal) need at least 6 interrupts delay */
|
||||
/* Space Adventure Cobra (2nd morgue scene) needs at least 13 interrupts delay (incl. seek time, so 6 is OK) */
|
||||
/* Jeopardy & ESPN Sunday Night NFL are picky about this as well: 10 interrupts delay (+ seek time) seems OK */
|
||||
cdd.latency = 10;
|
||||
/* Wolf Team games (Anet Futatabi, Cobra Command, Road Avenger & Time Gal) need at least 7 interrupts delay */
|
||||
/* Space Adventure Cobra (2nd morgue scene) needs at least 13 interrupts delay (incl. seek time, so 7 is OK) */
|
||||
cdd.latency = 7;
|
||||
}
|
||||
|
||||
/* CD drive seek time */
|
||||
|
Loading…
Reference in New Issue
Block a user