From: kub Date: Mon, 16 Dec 2024 19:52:23 +0000 (+0100) Subject: mcd, fix cdd delayed commands while in seek latency wait X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b168f3063e2b595e4f92c2c30f5d5fbadf5998ba;p=picodrive.git mcd, fix cdd delayed commands while in seek latency wait --- diff --git a/pico/cd/cdd.c b/pico/cd/cdd.c index 4ec5f1d2..edabfe83 100644 --- a/pico/cd/cdd.c +++ b/pico/cd/cdd.c @@ -742,6 +742,12 @@ void cdd_update(void) cdc_decoder_update(header); } + if (Pico_mcd->m.state_flags & PCD_ST_CDD_CMD) { + /* pending delayed command */ + cdd_process(); + Pico_mcd->m.state_flags &= ~PCD_ST_CDD_CMD; + } + /* drive latency */ if (cdd.latency > 0) { @@ -829,12 +835,6 @@ void cdd_update(void) Pico_mcd->s68k_regs[0x36+0] = 0x01; } } - - if (Pico_mcd->m.state_flags & PCD_ST_CDD_CMD) { - /* pending delayed command */ - cdd_process(); - Pico_mcd->m.state_flags &= ~PCD_ST_CDD_CMD; - } } #define set_reg16(r, v) { \