jsspeccy2 icon indicating copy to clipboard operation
jsspeccy2 copied to clipboard

Implements the floating bus effect

Open rastersoft opened this issue 3 years ago • 0 comments

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 https://github.com/gasman/jsspeccy2/issues/14

rastersoft avatar Apr 23 '21 12:04 rastersoft