Skip to content

Commit

Permalink
maple: don't assert dma interrupt if using hardware dma trigger
Browse files Browse the repository at this point in the history
Fixes Virtua Cop 2 pause when shooting. Regression due to ecce915
Issue #474
  • Loading branch information
flyinghead committed Aug 17, 2024
1 parent 00f60a3 commit cb0b667
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions core/hw/maple/maple_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cb0b667

Please sign in to comment.