DCPUTeam / DCPUToolchain

[ARCHIVED] The code repository for the DCPU-16 Toolchain.
http://dcputoolcha.in/
MIT License
96 stars 14 forks source link

The VM Keyboard can return the wrong keys. #212

Closed coffeyk closed 11 years ago

coffeyk commented 11 years ago

When there are several key presses between keyboard buffer reads, the internal pointers of the keyboard can become misaligned, resulting in incorrect keys being returned.

coffeyk commented 11 years ago

A potential solution can be found at https://github.com/DCPUTeam/DCPUToolchain/pull/213

A test program can be found at http://hastebin.com/dobuqamire.avrasm It displays the hex value and character (if applicable) for each key entered. Return clears the screen. If keys are entered slowly (about 1 second between) there is no issue. When keys are typed rapidly, the incorrect output apears

patflick commented 11 years ago

@psycocoffey thanks for contributing a solution to this