diff --git a/core/cd_hw/cdc.c b/core/cd_hw/cdc.c index 3425931..dd75a59 100644 --- a/core/cd_hw/cdc.c +++ b/core/cd_hw/cdc.c @@ -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)); diff --git a/core/cd_hw/cdc.h b/core/cd_hw/cdc.h index 463a8f0..651f992 100644 --- a/core/cd_hw/cdc.h +++ b/core/cd_hw/cdc.h @@ -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: diff --git a/core/cd_hw/cdd.c b/core/cd_hw/cdd.c index 20fc9e5..47fc8fe 100644 --- a/core/cd_hw/cdd.c +++ b/core/cd_hw/cdd.c @@ -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 */