Keyboard Solution, UzePS2, or what have you

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
User avatar
uze6666
Site Admin
Posts: 4812
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Keyboard Solution, UzePS2, or what have you

Post by uze6666 »

I could not believe it, so I opened an extra adapter I had and well, I still can't believe it! :shock: Yeah, it's wired directly, no converter chip. So I guess the keyboard somehow detects based on the pins/voltage or no USB response that it's connected to a PS/2 port and adapts it's protocol. Probably why it takes a couple seconds too before it starts sending keys. Pretty cool then, anybody can make one by just buying that keyboard and an SNES controller on Adafruit and wiring the Attiny inside the SNES female connector (with a healthy dose of epoxy naturally)!
adapter.jpg
adapter.jpg (82.73 KiB) Viewed 7183 times
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Keyboard Solution, UzePS2, or what have you

Post by D3thAdd3r »

uze6666 wrote:I could not believe it, so I opened an extra adapter I had and well, I still can't believe it!
:)
uze6666 wrote:Pretty cool then, anybody can make one by just buying that keyboard and an SNES controller on Adafruit and wiring the Attiny inside the SNES female connector (with a healthy dose of epoxy naturally)!
That seems like a good solution to me. No need for any PS/2 expense then, just cut the end off the keyboard and do it up; and more room that way too. I bought a few of the PS/2 sockets specifically for Uzebox experiments so I felt compelled to use it and it turned out pretty cool(last picture I promise)
finished.jpg
finished.jpg (14.08 KiB) Viewed 7121 times
User avatar
uze6666
Site Admin
Posts: 4812
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Keyboard Solution, UzePS2, or what have you

Post by uze6666 »

That seems like a good solution to me. No need for any PS/2 expense then, just cut the end off the keyboard and do it up; and more room that way too.
Yep. In fact, the other way around is probably better since opening the SNES plug is a bit hard. And the SNES cable feels better than the cheap keyboard wire. I'll do it that way.
I bought a few of the PS/2 sockets specifically for Uzebox experiments so I felt compelled to use it and it turned out pretty cool(last picture I promise)
It's all neat and self-contained, awesome! It's great we have a couple ways to do the interface. :)
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Keyboard Solution, UzePS2, or what have you

Post by D3thAdd3r »

We could have a "chicken or the egg" problem getting casual Uzeboxers using it. I think it's more likely someone will develop good keyboard programs if the user base is large. I think people are more likely to build the keyboard if there are good programs requiring it. The build being so flexible is nice and it definitely warrants a good tutorial with pictures since any one who can build an Uzebox should be able to build this. Are you considering offering the parts included with the standard console parts for some Uzebox Deluxe package in the future? UCC prize? I think it is impossible to have pre-built versions for sale at any reasonable price though.

Having support in the emulator will be a big step, and I wonder how to do that. Seems you could change the way Uzem handles switching between different input types so something like LShift+Rshift and you could cycle to keyboard. Then all keyboard input was interpreted as keyboard strokes, LSHIFT+RSHIFT you could go back to game pad, mouse, etc.
User avatar
uze6666
Site Admin
Posts: 4812
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Keyboard Solution, UzePS2, or what have you

Post by uze6666 »

Uzebox keyboard! :mrgreen:
uzekeyboard2.jpg
uzekeyboard2.jpg (69.67 KiB) Viewed 7036 times
Inside view...
uzekeyboard3.jpg
uzekeyboard3.jpg (79.51 KiB) Viewed 7036 times
I soldered all the wires to the pins of 8-pin socket and glued it in the case. Soldering was pretty tricky and took time, a small PCB would definitely be worth it. If there's interest I'll make one. :)
uzekeyboard4.jpg
uzekeyboard4.jpg (61.14 KiB) Viewed 7037 times
This keyboard is nice but a tad small. I'll see if I can order a bigger retro one like the old IBM models.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Keyboard Solution, UzePS2, or what have you

Post by D3thAdd3r »

It's a cool looking keyboard, and that picture pretty much tells the whole story; that's the best way to do it. Being small has at least the advantage that it can be hidden easily by the television, as opposed to a monster keyboard. The IBM model M was before my time, but damn if it isn't a great feeling(and very loud) keyboard. No one is giving those away anymore that's for sure.
User avatar
uze6666
Site Admin
Posts: 4812
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Keyboard Solution, UzePS2, or what have you

Post by uze6666 »

D3thAdd3r wrote: Being small has at least the advantage that it can be hidden easily by the television, as opposed to a monster keyboard. The IBM model M was before my time, but damn if it isn't a great feeling(and very loud) keyboard. No one is giving those away anymore that's for sure.
Yeah you're right, that would indeed look ridiculous next to the TV! :lol:

Btw, I updated the Keyboard demo to use the new mode 9/80 cols, fixed the scan code mapping and fixed the font to include all characters up to 0x7f. Looks pretty neat.
Attachments
KeyboardDemo.hex
(87.48 KiB) Downloaded 351 times
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Keyboard Solution, UzePS2, or what have you

Post by D3thAdd3r »

Cool I will check it out tonight!
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Keyboard Solution, UzePS2, or what have you

Post by D3thAdd3r »

Yes this is really awesome, think of what we can do with all that screen real estate, a keyboard, and 128k ram :D The new emulator version you put out works perfect and now that I see it, there is no need for any switch between keyboard, joypads, etc, just get a separate game pad.

I haven't looked at the keyboard drivers closely enough, but it seems to be suppressing key repeats. By default when it starts up, they keyboard should send out an initial key-down even when it gets pressed, and a key-up when it's released, but also a series of key-down events when it is held down for a time(type-matic repeat). So now that I say that I should actually read into the source before posting...I know you can send a host command to the keyboard so it doesn't send key repeats and/or you can also have it not send the key-up(break code) if you want. This is something I was wondering while playing with the demo there, I don't happen to think key repeats are all that useful. But pretty important if you want to use a keyboard in a game also as a controller at times, can a game tell when a key is held down, or only the moment it is struck? If I wanted to use the standard 'W','A','S','D', forward, strafe left, back pedal, strafe right key setup for a raycasting game would it work?
User avatar
uze6666
Site Admin
Posts: 4812
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Keyboard Solution, UzePS2, or what have you

Post by uze6666 »

I don't meddle with the keyboard repeat or anything else so far. Repeat works on my little Uzebox keyboard but it is suppressed in uzem by SDL. Your PS/2 doesn't repeat?

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. :)

I think it would be good to control the typematic rate from the hos, so I'll add this command to the firmware. But I don't think there's a way to stop it completely with scan code set 2.

Btw, in your ps/2 dongle, did you keep a way to reflash the attiny?
Post Reply