diff --git a/core/hw/maple/maple_if.cpp b/core/hw/maple/maple_if.cpp index 69321e308..168edeb35 100644 --- a/core/hw/maple/maple_if.cpp +++ b/core/hw/maple/maple_if.cpp @@ -47,34 +47,29 @@ void maple_vblank() { if (SB_MDEN & 1) { - if (SDCKBOccupied) + if (SB_MDTSEL == 1) { - maple_schd(0, 0, 0, nullptr); - SDCKBOccupied = false; - } - else - { - if (SB_MDTSEL == 1) - { - if (maple_ddt_pending_reset) - { - DEBUG_LOG(MAPLE, "DDT vblank ; reset pending"); - } - else - { - DEBUG_LOG(MAPLE, "DDT vblank"); - SB_MDST = 1; - maple_DoDma(); - // if trigger reset is manual, mark it as pending - if ((SB_MSYS >> 12) & 1) - maple_ddt_pending_reset = true; - } + // Hardware trigger on vblank + if (maple_ddt_pending_reset) { + DEBUG_LOG(MAPLE, "DDT vblank ; reset pending"); } else { - maple_ddt_pending_reset = false; + DEBUG_LOG(MAPLE, "DDT vblank"); + SB_MDST = 1; + maple_DoDma(); + // if trigger reset is manual, mark it as pending + if ((SB_MSYS >> 12) & 1) + maple_ddt_pending_reset = true; } } + else + { + maple_ddt_pending_reset = false; + if (SDCKBOccupied) + maple_schd(0, 0, 0, nullptr); + } + SDCKBOccupied = false; } if (settings.platform.isConsole()) maple_handle_reconnect();