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

HW: Pass System to MMIO handlers. #11166

Merged
merged 2 commits into from Nov 24, 2022

Conversation

AdmiralCurtiss
Copy link
Contributor

De-globalizing the MMIO handlers.

I'd like some input here on if this is a good way to do it. The only other approach I can think of would be to capture the system instance in every single complex handler, which IMO is worse, but ymmv.

@AdmiralCurtiss
Copy link
Contributor Author

Uuh, need some help with the ARM ASM here.

Copy link
Member

@lioncash lioncash left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just one tiny nit

Fifo::SyncGPUForRegisterAccess();
WriteHigh(fifo.CPReadPointer, val & WMASK_HI_RESTRICT);
}));
mmio->Register(
Copy link
Member

Choose a reason for hiding this comment

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

Kind of a pre-existing thing, but maybe extract the lambdas into const locals, so the formatting is a little nicer to read (if it can be done). If it can't be done nicely, then I wouldn't worry about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

545fee9 is the best I can come up with, is that better? It definitely formats nicer at least.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that's perfect. Thanks!

@AdmiralCurtiss AdmiralCurtiss changed the title [RFC] HW: Pass System to MMIO handlers. HW: Pass System to MMIO handlers. Nov 23, 2022
@lioncash lioncash merged commit 7be4c90 into dolphin-emu:master Nov 24, 2022
11 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the mmio-system branch November 24, 2022 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants