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

RTC testrom fails #61

Closed
CasualPokePlayer opened this issue Sep 13, 2020 · 2 comments · Fixed by #102
Closed

RTC testrom fails #61

CasualPokePlayer opened this issue Sep 13, 2020 · 2 comments · Fixed by #102

Comments

@CasualPokePlayer
Copy link
Member

I talked a bit about this in the PSR server, but essentially an RTC test rom fails under Gambatte-Speedrun. RTC register writes fail, cycle based RTC appears to be broken in DMG/SGB2 mode (RTC goes at half the speed it's supposed to, note this is specific to cycle based RTC, real time based RTC is not broken), among other things

test rom can be found here https://github.com/aaaaaa123456789/rtc3test/releases

@entrpntr
Copy link
Contributor

There was previously this preliminary MBC3 RTC testrom which we had failures on, not sure if the two test different things.

Reason for going half speed in DMG/SGB can be traced to this change in time.cpp. The initstate code sets the relevant bit in initial DMG ioamhram, hence why and'ing with CGB was necessary. The "best" solution would be to refactor double speed out to be its own thing to avoid checks like that throughout the code; alternatively we could just wire an isCgb() check into time.cpp.

@CasualPokePlayer
Copy link
Member Author

There was previously this preliminary MBC3 RTC testrom which we had failures on, not sure if the two test different things.

Oh yeah I remember that, looking at the failures on the prelim ROM, they appear to be TestRegisterOverflows (one subtest failed, not sure which), TestWrittenValueIsNotReadableUntilLatched, TestOutOfBoundsWriteAndIncrement, and TestRegisterSizes. Some of the fails seem to be tests within the ROM I linked (TestOutOfBoundsWriteAndIncrement and TestRegisterSizes have equivalent tests), but the ROM I linked just doesn't do the tests anyways due to other tests failing with it (in particular, all register write tests just fail... which seems horribly wrong as it supposedly means GSR is treating all RTC registers as read-only). Somewhat odd as the prelim test ROM has some indication GSR should be treating them as R/W?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants