X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fcd%2Fmcd.c;h=33553613c395f6a4a205cb616bc93bf3c1972816;hb=3f23709ef37c5b3511c1445cbed7b447b56a37e0;hp=24e99e4474b61eadb67ad31e04d90bd1888b538a;hpb=a6523294e28d7e6c119a578eb65b91af8da77f8d;p=picodrive.git diff --git a/pico/cd/mcd.c b/pico/cd/mcd.c index 24e99e4..3355361 100644 --- a/pico/cd/mcd.c +++ b/pico/cd/mcd.c @@ -46,6 +46,7 @@ PICO_INTERNAL void PicoPowerMCD(void) memset(&Pico_mcd->pcm, 0, sizeof(Pico_mcd->pcm)); memset(&Pico_mcd->m, 0, sizeof(Pico_mcd->m)); + cdc_init(); Reset_CD(); // cold reset state (tested) @@ -59,7 +60,9 @@ void pcd_soft_reset(void) { // Reset_CD(); // breaks Fahrenheit CD swap - LC89510_Reset(); + Pico_mcd->m.s68k_pend_ints = 0; + cdc_reset(); + CDD_Reset(); #ifdef _ASM_CD_MEMORY_C //PicoMemResetCDdecode(1); // don't have to call this in 2M mode #endif @@ -150,8 +153,7 @@ static void pcd_int3_timer_event(unsigned int now) static void pcd_dma_event(unsigned int now) { - int ddx = Pico_mcd->s68k_regs[4] & 7; - Update_CDC_TRansfer(ddx); + cdc_dma_update(); } typedef void (event_cb)(unsigned int now); @@ -355,9 +357,6 @@ void pcd_state_loaded(void) if (Pico_mcd->s68k_regs[0x31]) pcd_event_schedule(SekCycleAimS68k, PCD_EVENT_TIMER3, Pico_mcd->s68k_regs[0x31] * 384); - - if (Pico_mcd->scd.Status_CDC & 0x08) - Update_CDC_TRansfer(Pico_mcd->s68k_regs[4] & 7); } diff = cycles - Pico_mcd->pcm.update_cycles;