Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n64: step rsp dma during rsp execution #1722

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

invertego
Copy link
Contributor

Instead of advancing RSP DMA only after each CPU basic block, allow it to run between each RSP block. This prevents the RSP from racing with the DMAs it initiates in the event of a long running CPU block (which can trigger multiple consecutive blocks of RSP execution).

This fixes hangs in Tarzan and possibly other games that use MusyX.

Another observable side effect of this change is that when the RSP is halted, it no longer risks falling increasingly behind the CPU, because ares will now step multiple times if needed instead of just once.

Instead of advancing RSP DMA only after each CPU basic block, allow it
to run between each RSP block. This prevents the RSP from racing with
the DMAs it initiates in the event of a long running CPU block (which
can trigger multiple consecutive blocks of RSP execution).

This fixes hangs in Tarzan and possibly other games that use MusyX.

Another observable side effect of this change is that when the RSP is
halted, it no longer risks falling increasingly behind the CPU, because
ares will now step multiple times if needed instead of just once.
@invertego invertego requested a review from rasky December 15, 2024 04:40
Copy link
Collaborator

@rasky rasky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch is fine

I always find confusing that we keep clocks centered at 0, while they are 64 bit numbers anyway so we could just let them count up. Anyway this is just the status quo.

@LukeUsher LukeUsher merged commit a752b85 into ares-emulator:master Dec 15, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants