paulscottrobson / eris

Eris is an open source 16 bit retrocomputer design which can be built cheaply and easily
MIT License
11 stars 4 forks source link

Waggling keys returns joyx() 3 sometimes #22

Closed paulscottrobson closed 4 years ago

paulscottrobson commented 4 years ago

If you do repeat:x=joyx():until abs(x) > 1 and waggle left and right back and forth under certain circumstances it returns 3.

paulscottrobson commented 4 years ago

Also happens with joyy(). Check kernel code

paulscottrobson commented 4 years ago

Kernel code just returns port lines. Because it's a serial device (in practice) it is possible with waggling that the left down event comes before the right up event, so both keys are down (which would be possible on a matrix scanned keyboard). This means it could return 00 10 01 11 and the BASIC did not allow for 11 being returned.