tomaz / zx-next-dev-guide

Guide for ZX Spectrum Next assembler developer. Available as free to download PDF from releases page, or printed coil bound book at https://bit.ly/zx-next-assembler-dev-guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing "1" in COPPER_WAIT Macro

AidyCC opened this issue · 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

commented

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

commented

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