tomaz/zx-next-dev-guide

Missing "1" in COPPER_WAIT Macro

Closed this issue · 2 comments

Hi

After a bit of debugging, I found an issue with the COPPER_WAIT macro. The issue only manifests itself when passing "ver" values higher than 256..

Original:-

MACRO COPPER_WAIT hor, ver DB %10000000 | ((hor/8) << 1) | ((ver & $FF) >> 8) ; %1hhhhhhv (bit 9 of vertical) DB (ver & $FF) ; %vvvvvvvv (lsb of vertical) ENDM

Revised Version:-

MACRO COPPER_WAIT hor, ver DB %10000000 | ((hor/8) << 1) | ((ver & $1FF) >> 8) ; %1hhhhhhv (bit 9 of vertical) DB (ver & $FF) ; %vvvvvvvv (lsb of vertical) ENDM

Thanks,

-Adrian

tomaz commented

Thanks, good catch! Will fix, probably in the following days.

tomaz commented

Took a "bit" longer than couple days 😅 but finally fixed... Thanks again for the tip!