Thanks for pointing this out. I tested it with ZEsarUX in ZX-Uno mode with new graphics modes enabled and it worked. However on a ZX-Go+ it does not. My other game that uses the Timex mode does work on the ZX-Go+ so I guess there is another problem with it. I was not aware of the eLeMeNt ZX is there an emulator for it?
BTW my code was already using:
in a, (0xFF)
or a, 2
out (0xFF), a
Changing this to just:
ld a, 2
out (0xFF), a
did not make any difference.