Skip to content

Conversation

leiradel
Copy link
Contributor

@leiradel leiradel commented Jun 5, 2025

This thread at World of Spectrum says that it's valid to write to invalid AY registers, and that you can read back the value, which decays over time.

This PR doesn't implement the decay, but makes it possible to set the register address to an invalid one, and makes reading back from it return 0, as if it instantly decays.

I made this change because there's this SZX snapshot that has the last AY register address set to 16, and it was causing an assert. Instead of making it a special case in my code, I thought it would be nice if it was at least partially implemented in ay38910.h.

@floooh
Copy link
Owner

floooh commented Jun 6, 2025

Thanks, I'll try to look in detail into the PR 'soon-ish'...

In the meantime, don't mind the CI errors, looks like those are unrelated to your PR (I guess trying to use designated initialization in the C++ code was a mistake lol - not sure why those problems haven't shown up earlier though).

@leiradel
Copy link
Contributor Author

leiradel commented Jun 6, 2025

Yeah I saw that some passed and thought the errors shouldn't be related to my changes.

@floooh floooh self-assigned this Jun 6, 2025
@floooh floooh added this to sokol todo Jun 6, 2025
@floooh floooh moved this to Todo in sokol todo Jun 6, 2025
@floooh floooh moved this from Todo to In Progress in sokol todo Aug 25, 2025
@floooh floooh merged commit ca2253b into floooh:master Aug 25, 2025
6 of 8 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in sokol todo Aug 25, 2025
@floooh
Copy link
Owner

floooh commented Aug 25, 2025

Ok, finally got around to merge this one. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants