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

Emulate non-initialized TIA #249

Closed
thrust26 opened this issue Nov 9, 2017 · 4 comments
Closed

Emulate non-initialized TIA #249

thrust26 opened this issue Nov 9, 2017 · 4 comments
Assignees
Milestone

Comments

@thrust26
Copy link
Member

thrust26 commented Nov 9, 2017

On most(?) consoles types, the TIA registers seem to have initial values != 0. Without initialization, the console then produces a picture which is not all black.

@thrust26 thrust26 added this to the Prio 3 milestone Nov 9, 2017
@DirtyHairy
Copy link
Member

For the record, I think I just head a nice idea for a cheap and reliable way to do this. We can just spin the TIA for a fixed number of cycles in which we do random writes to its registers. The result will be an initial state that is both legal and random. The same approach could be adapted for the RIOT.

@thrust26
Copy link
Member Author

TIA randomization fixed with #126.

@DirtyHairy
How about the RIOT? I am sure many (most) games will break, especially SWACNT/SWBCNT are rarely initialized.

@ale-79
Copy link

ale-79 commented Sep 20, 2021

The I/O registers (SWCHA/SWACNT/SWCHB/SWBCNT) are guaranteed to be zeroed at power on, so initialization isn't needed and I don't think an option to randomize them would be useful.
The only reason for a rom to initialize those registers is if it can be run without power-cycling the console, like happens for the PlusCart menu when using the "emulation-exit" function, but that's a really special case.

The 6532 datasheet also states that the hardware interrupts are disabled (no effect on a 2600), and the "PA7" is set to "negative" (high to low) transition edge detection.

It seems that INTIM is already random at startup in Stella, so only the initial divide ratio and TIMINT flags might be left to consider.
I guess it doesn't really makes much difference, anyway: a game that uses the timer will initialize it to some value and with the appropriate divider.

@thrust26
Copy link
Member Author

Thanks for the info. And I agree.

Also PA7 is a different issue (#108.) So I think we can close this one.

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

3 participants