I found details
of the keyboard and mouse protocol in the back of
a Microvax manual, and have been toying with the idea of building
a small embedded controller to take a PC (PS2) keyboard and mouse,
and emulate the DEC equivalents to the VAX - would anyone else be
interested in this?
I'd be very interested, not because I have a shortage of DEC keyboards or
mice, but because it'd allow me to use my VAXstation or PRO-380 on a KVM
switch along with various PCs. The KVM switch can handle the video, but it
can't cope with the DEC keyboards and mice.
Thats an excellent reason for having it!
I suspect that this may not be as easy as you think,
but if you're serious
I'll build the hardware if you write the firmware.
I don't recall saying that I thought it would be easy, however I do think that it
could be done.
The hardware shouldn't be very complicated at all - I've been thinking about
building up an 8031
(because I have lots, and development tools etc.).
The interfaces which have to be dealt with are:
- Simultanious PS/2 Keyboard and Mouse inputs
In the code I did before to read the PS/2 keyboard, I simply polled the clock line
which might
get problematic when dealing with two interfaces
as well as a software UART (see below), however the 8051 has two external interrupt
inputs,
which could be used to monitor the clock lines - a
small state machine running off each interrupt should be able to handle
the physical interface to the keyboard/mouse
- Two UARTS
The VAX requires a serial port for both the keyboard and the mouse.
Fortunately the speed is only 4800, and the mouse if defined to be
half-duplex, so it should not to too difficult to implement the mouse
serial port from an internal timer interrupt and corresponding state
machine. This would leave the main 8051 serial port available or the
emulated keyboard (which is bidirectional).
- LEDs and beeper
Although the PC keyboard does have three LEDs, we might want to use
these to indicate local states. We would need at least one more LED
on the interface box, and I would probably put on all 4 (at least
until we determine which PC keyboard LEDs will be available)
I'd also add a speaker output for the keyclick and beeper.
An 8031 has 14 spare I/O lines including the serial port (and the two
which can be configured as interrupts). Our requirements are:
2 for PS/2 clock (INT0 and INT1)
2 for PS/2 data
2 for keyboard serial (8051 serial port)
2 for mouse serial
4 for LEDs
1 for speaker
So we should just fit with one to spare.
From a firmware point of view, the mouse looks pretty
straightforward,
mostly a protocol translation with only a few simple commands to
handle.
The keyboard looks considerably more complex, with modes and key
regions that they can be applied to, however as a friend of mine
says, thats "just typing" ...
Dave
--
dave06a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools:
www.dunfield.com
com Collector of vintage computing equipment:
http://www.classiccmp.org/dunfield/index.html