A86: Down-left fix
[Prev][Next][Index][Thread]
A86: Down-left fix
Aaron Curtis pointed out how to avoid the dreaded down-left bug yet still
use _get_key. _get_key (from the acz include files) is equivalent to
_getky, but a heck of a lot faster, because it doesn't convert the scan
codes into OP2, just A. Clem pointed that one out.
Down-left or other equivalent combos cause the hardware to trigger (or set
the interrupt mode?) an on interrupt instead of a timer interrupt. This
causes the wrong interrupt to get refreshed/reset. Bit 0 of port 3 will
have the current interrupt mode when read from inside an interrupt handler:
reset -- timer
set -- on (or down-left)
So, if it's set, you don't want to call $01a1 (patched) in your interrupt
handler. As he also pointed out, this info was on 86 Central the whole
time. And, as I just checked, it's in the Sqrxz source code. Being dumb, I
just never put two and two together and realized how to fix it. Simple,
fixes down-left and allows you to have 8 directional movement in your
programs.
I attached my modified grayscale interrupt handler that fixes this bug.
--
David Phillips <david@acz.org>
http://www.acz.org/
gray.asm