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

gb: Improve RTC accuracy with MBC3 #90

Closed
deltabeard opened this issue May 26, 2023 · 3 comments
Closed

gb: Improve RTC accuracy with MBC3 #90

deltabeard opened this issue May 26, 2023 · 3 comments
Assignees
Labels
bug Something isn't working diff: complex A difficult issue; may require significant planning. help wanted Extra attention is needed
Milestone

Comments

@deltabeard
Copy link
Owner

No description provided.

@deltabeard deltabeard added bug Something isn't working diff: intermediate Medium difficulty labels May 26, 2023
@deltabeard deltabeard added this to the v1.3.0 milestone May 26, 2023
@deltabeard
Copy link
Owner Author

Since the RTC is updated every second, and currently only during VSYNC, RTC latching for each read/write may not be required as the RTC is guaranteed to not be updated during VSYNC. The only instance that there could be an issue is when the game has latched the RTC on the last CPU instruction before VSYNC occurs, causing the RTC to be updated whilst the game is reading/writing to it.

Hence, whenever the front end is updating the RTC, Peanut-GB should check whether the RTC has been latched first and only update the RTC if it is not latched.

@deltabeard
Copy link
Owner Author

RTC latching is emulated on the https://github.com/deltabeard/Peanut-GB/tree/fix-rtc2 branch, but the rtc3test at https://github.com/aaaaaa123456789/rtc3test still does not pass.

@deltabeard deltabeard changed the title gb: RTC latching is not emulated gb: Improve RTC accuracy with MBC3 Nov 6, 2023
@deltabeard deltabeard added help wanted Extra attention is needed diff: complex A difficult issue; may require significant planning. and removed diff: intermediate Medium difficulty labels Nov 6, 2023
@deltabeard deltabeard self-assigned this Nov 8, 2023
@deltabeard
Copy link
Owner Author

RTC emulation greatly improved in 97548ef but still not perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working diff: complex A difficult issue; may require significant planning. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant