-
Notifications
You must be signed in to change notification settings - Fork 84
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
TI drifts in NTSC mode #733
Comments
Something seems to be wrong here... if I change NTSC/PAL with freezer, then do clr ti, I always end up with 193 in DD0E. This seems to be wrong. Tested with development head and 920385. Edit: and I know that TOD50 does work, as I discovered the problem while working on RTC tick detection in freezer... |
And it's 50Hz vs. 60Hz, which means if you have the wrong TOD50 setting you should be loosing a just over a second every ten seconds (this is what I was seeing in my 14 sec RTC tick test). |
In freezer TOD50 is manipulated correctly. The freezer switch function also manipulates frozen memory... but when I exit freezer, the restored system again has the old settings... but CIAs are saved to frozen memory, so it should be possible to manipulate them. What confuses me is that ROM seems to set CIA1 and CIA2 TOD50 differently. Or is CIA1 not used as a timer and because of this the flag has no meaning? |
I only see references to CIA2 in the ROM code for TI, I don't know why. |
Test Environment (required)
Platform: MEGA65
ROM Release: 920385
Core Commit: cae3b0b
Describe the bug
The TI timer variable counts inaccurately in NTSC mode.
To Reproduce
Run this along with a stopwatch. In PAL mode, it matches. In NTSC mode, it drifts by about a second per minute.
Additional context
This was originally filed as MEGA65/mega65-rom-public#78 to research whether the ROM is setting registers correctly. We fixed an issue where TOD50 was not being set correctly in NTSC mode, but this didn't fix the drift, and would not have adequately explained the drift anyway. I don't know enough about expected behavior of the CIA to know if this is a core issue, but I don't have any active leads on changes that could be made in the ROM, so I'm creating a corresponding core issue for further research.
The text was updated successfully, but these errors were encountered: