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

MEGA65: check and fix hotreg behaviour #382

Closed
lgblgblgb opened this issue Aug 4, 2023 · 0 comments
Closed

MEGA65: check and fix hotreg behaviour #382

lgblgblgb opened this issue Aug 4, 2023 · 0 comments

Comments

@lgblgblgb
Copy link
Owner

lgblgblgb commented Aug 4, 2023

It seems current Xemu implementation is wrong: indeed, trigger being set in disabled mode as well and 'played back' when enabled again. However new change in the core, that you can clear possible pending trigger with re-write zero to hotreg enable bit ($D05D bit 7) when it was zero again, so the 0->0 case.

Also the $D031 behaviour must be checked in Xemu as well. The $D018 (recent change in Xemu) behaviour should be-checked again now: #381

UPDATE

Actually the behaviour of hotregs is much more easy than I thought. No previous value or transition need to be changed.

Setting hotregs to disabled always disable hotregs and clear possible pending triggers. Enabling hotregs always take trigger (if it's not clear of course). No need to check any "transition" or things like that.

@lgblgblgb lgblgblgb self-assigned this Aug 4, 2023
lgblgblgb added a commit that referenced this issue Aug 7, 2023
* writing zero to bit 7 of $D054 clears possible stored triggers
* enabling bit 7 of $D054 activates trigger (if any)
* $D031 is fully hotreg (no check for "same value" and things like that)
@lgblgblgb lgblgblgb removed the WIP label Aug 7, 2023
lgblgblgb added a commit that referenced this issue Aug 13, 2023
* writing zero to bit 7 of $D054 clears possible stored triggers
* enabling bit 7 of $D054 activates trigger (if any)
* $D031 is fully hotreg (no check for "same value" and things like that)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant