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

Implements the floating bus effect #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rastersoft
Copy link

When reading an inexistent I/O port in the Sinclair Spectrum, the value read not always is 255. That only happens when the ULA is painting the BORDER. When painting the PAPER, the bus presents the current value being read by the ULA from the video memory.

This effect is used by some games to synchronize with the beam. They can use a naive way, by just waiting for a non-255 value to appear in the bus, thus knowing that now the beam has started painting the PAPER, or checking that value and waiting for an specific one (usually a color attribute value), thus being able to detect when an specific line is being painted.

This patch emulates this behavior, thus allowing these games to run in the emulator.

Tested with Escape from M.O.N.J.A.S. (https://www.rastersoft.com/programas/monjas.html )

Fixes #14

When reading an inexistent I/O port in the Sinclair Spectrum,
the value read not always is 255. That only happens when the
ULA is painting the BORDER. When painting the PAPER, the bus
presents the current value being read by the ULA from the
video memory.

This effect is used by some games to synchronize with the beam.
They can use a naive way, by just waiting for a non-255 value
to appear in the bus, thus knowing that now the beam has
started painting the PAPER, or checking that value and waiting
for an specific one (usually a color attribute value), thus
being able to detect when an specific line is being painted.

This patch emulates this behavior, thus allowing these games
to run in the emulator.

Fixes gasman#14
gasman added a commit to gasman/jsspeccy3 that referenced this pull request Aug 17, 2021
Thanks to @rastersoft for providing the equivalent fix for JSSpeccy 2: gasman/jsspeccy2#15
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 this pull request may close these issues.

Floating bus seems to not be implemented
1 participant