PS/2 keyboard, mouse, joystick and simple sound card

116 views
Skip to first unread message

Alan Cox

unread,
Nov 10, 2019, 4:50:28 PM11/10/19
to retro-comp
When I was doing the last set of designs I stumbled across the rather neat PS/2 keyboard interface on 6502.org by Lee Davidson.

It looked very simple and clean so I figured I'd have a go. Somewhere along the line I decided that if I was doing PS/2 I might as well do keyboard and mouse. That in turn was less logic using slightly different gates, which left me with some more input and output bits. Not wanting to waste them I added joystick and some simple sound support.

I do want to see if I can rethink the joystick better. It uses the old but not ideal hack of fire reporting as simultaneous up/down, which is ok for games where you poke the fire button rapidly but not for games you hold it down.

Still debugging it as it turns out I wasn't entirely paying attention when I did the design, so i forgot to power the 74HCT32 which produced some very strange behaviour, the audio jack somehow ended up backwards and I messed up the joystick pullups. Hopefully I didn't mess up too much else.

Alan


ps2port.pdf

Mark T

unread,
Nov 10, 2019, 6:38:06 PM11/10/19
to retro-comp
Hi Alan,
Maybe consider using sega genesis game pads instead of joysticks. These are quite cheap on amazon, probably knock offs but the ones i got about a year ago seem ok. I think i prefer game pads to the older joystick type.

Mark

Alan Cox

unread,
Nov 11, 2019, 4:12:25 AM11/11/19
to retro-comp
I've only got four free input pins which isn't sufficient for anything fancier. The sega pads would need their own output pin and 6 inputs so extra logic - or you could just wire it to an SC129 instead.

Alan

Alan Cox

unread,
Nov 16, 2019, 12:15:40 PM11/16/19
to retro-comp
Several more extra wires later I now have an actually working PS/2 keyboard port. It does work better when you connect the write strobe to the latch copy and the reset line to the clear, instead of the reverse. Coupled with the TMS9918A Fuzix uses it to provide four consoles switchable via ALT-F1..F4.

The software is a bit fun, and I still need to clean up the protocol timings when setting up and tighten them up when keyboard polling but it works in Fuzix at least. Adding it to CP/M doesn't look hard and ROMWBW also appears to have suitable hooks for adding a PS/2 driver but would also really need TMS9918A support to be nice.

I'm now roughly where I want to be - video, keyboard, mouse, joystick, sound. I might have to look at a more 'home computer' ROM for it at some point to finish the job.

Alan

Reply all
Reply to author
Forward
0 new messages