It works on the hardware perfectly, just verified, for some reason I thought I had tried it and it didn't..bad memory sometimes. Forgot SDL doesn't send the repeated SDL_KEY_DOWN(or whatever it is) message for typematics by default. If interested in more accurate emulation you should be able to do a:uze6666 wrote:Repeat works on my little Uzebox keyboard but it is suppressed in uzem by SDL. Your PS/2 doesn't repeat?
Code: Select all
SDL_EnableKeyRepeat(int delay, int interval);
//best to use (SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL);
That seems the smartest way to go about it, I haven't had much change to actually try using it in a program yet but I think there might be a critical feature needing to be added. Is there a way the host could send the adapter raw PS/2 commands? What I mean is, how could I send the keyboard the bytes "0xED,0b00000111" which is the command to set the scroll,caps,num LEDs all to on? I agree most everything should be the host responsibility including that.uze6666 wrote:For maximum flexibility, the firmware returns what it receives from the keyboard as-is, so that's keys codes and break codes too. So yes, you could do a 'WSAD' game since the uzebox receives everything.
Oh you are right, my document says it has to be set 3 to do that stuff. I wonder how commonly supported set 3 is in old keyboards.uze6666 wrote:But I don't think there's a way to stop it completely with scan code set 2.
Yep, I stole a socket pin from another controller and put it in one of the N/C pins hooked to reset on attiny so everything was broken out. I use Arduino to power the attiny through controller +pin, then just jumper wires into the ISP to the corresponding MOSI/MISO/SCK pins on the SNES plug->attiny. It works, if I recall correctly,I didn't even program the chip before I expoxied it together(damn sure triple checked continuity though), but it would be a pain to set up repeatedly to develop on as opposed to a real ISP plug. Have to remember the ISP orientation/pinout, which SNES pins are what, etc.uze6666 wrote:Btw, in your ps/2 dongle, did you keep a way to reflash the attiny?
Also if we can send raw commands, I don't see why this adapter wouldn't work with a PS/2 mouse with just more code on the host side. I have a SNES mouse and it's cool, but I used to have an old logitech laser mouse that supported PS/2 with an adapter. I still firmly remember the transition from ball to laser mouse somewhere around 1999-2000 as a big moment in computing Much smoother.
Edit-it seems there are is at least some character missing like the '$' any maybe more. Just typing the top keys "`1234567890-=" which shifted is "~!@#$%^&*()_+" should show it, or else my keyboard is wonky.