0x10cAtlas / AtlasOS

An operating system for DCPU-16.
109 stars 15 forks source link

Fixed issue #22 ring buffer driver #24

Closed rustyoz closed 12 years ago

rustyoz commented 12 years ago

i have taken a some working code from denull's tetris (specifically next_key sbr) and spliced it into the keyboard driver fixing issue #22

i have tested it in the dcpu-studio and while its keyboard ring buffer implementation is broken, the code appears to appears to work. i have tried to test it in other emulators and they just seem to break on atlasos' code in general.

anyway one the dcpu-studio ring buffer is fixed i'm confident it will work.

also i have trimmed the screen dimensions. from all reports i've read notch implemented a 12 line screen, the benifit of of using 12 for the time being is that it should run in both 12 and 16 line emulaters

chessmaster42 commented 12 years ago

It's not working for me. If I have DCPU Studio's key buffer turned off I can get one keypress in then nothing. If I enable it I can get more but many keys are lost and it's very slow.

Also, given that Notch recently announced that he is redoing the specification (or at least giving more details) around keyboard input we should hold off making changes to the keyboard driver until we get the new details.

I will, however, merge in the changes to the screen size so that it is 32x12.

rustyoz commented 12 years ago

yeah i thought this might happen, to explain: dcpu studios ring buffer at the moment from the second build, will scan the ring buffer for the first non zero spot, so while my code counts along the ring bugger, dcpu studio doesn't do that, leading to the error.

with the ring buffer turned off, it wouldn't work at all.

chessmaster42 commented 12 years ago

Commit 0909b6b61c867136decd4cc78f403b91400e0dc3 closed this issue. Also fixing this issue has allowed the code to run in 0x10co.de and other emulator sites :D