The color variable on C64 is limited to 0-15, so the location is always positive. The original C64 source code was using bpl as an unconditional branch. The X16 uses the high nibble for the background color (or colors >= $80 in T256C mode), so this is no longer a good assumption.
In the course of X16 development, the branch became too far away, so the sense was inverted, but the logic was still incorrect.
The original C64 code did this
The
color
variable on C64 is limited to 0-15, so the location is always positive. The original C64 source code was usingbpl
as an unconditional branch. The X16 uses the high nibble for the background color (or colors >= $80 in T256C mode), so this is no longer a good assumption.In the course of X16 development, the branch became too far away, so the sense was inverted, but the logic was still incorrect.
Changed it to a
jmp
instead.Closes #338