VOGONS


First post, by xjas

User metadata
Rank l33t
Rank
l33t

Is it possible to see all the raw data coming in on a PS/2 keyboard port? Can I point a serial terminal at it somehow?

I'm trying to reverse engineer my Creative Prodikeys. 😉 I'd like to know if it is sending MIDI messages down the PS/2 bus or something else.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 1 of 13, by .legaCy

User metadata
Rank Oldbie
Rank
Oldbie

I guess that might be possible because hardware ps/2 keyloggers exists.
But i have no experience with it.
http://forum.arduino.cc/index.php?topic=2526.0 Maybe it will help

Reply 2 of 13, by xjas

User metadata
Rank l33t
Rank
l33t

Oh cool, that's actually related to my end goal. B) I want to build an Arduino device that acts as a PS/2 passthrough for the QWERTY keys but filters out the MIDI messages and sends them to a standard DIN5 jack.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 3 of 13, by Kamerat

User metadata
Rank Oldbie
Rank
Oldbie

I used a breadboard 'Arduino' to check keycodes from an old Tandberg keyboard with a lot of extra keys. Compared them to a table that someone made and they matched. 😀

DOS Sound Blaster compatibility: PCI sound cards vs. PCI chipsets
YouTube channel

Reply 4 of 13, by .legaCy

User metadata
Rank Oldbie
Rank
Oldbie
xjas wrote:

Oh cool, that's actually related to my end goal. B) I want to build an Arduino device that acts as a PS/2 passthrough for the QWERTY keys but filters out the MIDI messages and sends them to a standard DIN5 jack.

So you will use the man in the middle setup, you will forward the standard keyboard keys to ps2 and the midi messages to DIN5.
It will be connected like

(prodikeys)--> (arduino)---->(ps/2 jack)
+---------->(DIN5)

And you will code the part that receive the signal, check for standard keyboard keystroke and send to ps/2 and if the signal is not a standard keyboard keystroke you should send to DIN5
Of course there's a protocol that you will need to know to do this "routing" but i guess that on arduino forum should be enough documentation to achieve your gozl.

Reply 5 of 13, by xjas

User metadata
Rank l33t
Rank
l33t

That's the way I'm thinking right now, but it's only one possibility. 😀 A TSR DOS driver could even work too (bodge SoftMPU???) but sacrifices some flexibility. There's actually very little info out there on how these work. I'd love to be able to just mod in a MIDI port.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 6 of 13, by .legaCy

User metadata
Rank Oldbie
Rank
Oldbie
xjas wrote:

That's the way I'm thinking right now, but it's only one possibility. 😀 A TSR DOS driver could even work too (bodge SoftMPU???) but sacrifices some flexibility. There's actually very little info out there on how these work. I'd love to be able to just mod in a MIDI port.

I dont know if it will work but instead of filtering midi messages from standard keystrokes you could try to replay them(if midi interface will detect the standard keystroke as a bad and drop it

Reply 7 of 13, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

when dealing with midi you need to be using optocouplers to isolate the midi uart signal. also midi is a non standard uart speed (31250), so you need to get your arduino clock to accept non standard baud rates within the error margin of 31250.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 8 of 13, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

There are no optocouplers on MIDI outputs, and 31250 is perfectly standard uart speed with zero error when using 16 MHz clock source, affected only by the clock source tolerance.

MIDI specs require 1% baud rate tolerance, usually Arduinos have ceramic resonators and those should be within 1% tolerance unless some extreme conditions apply.

While the keyboard is connected to PC, you should be able to sniff the scancodes passively with Arduino and transmit MIDI messages.

Reply 9 of 13, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie
Jepael wrote:

There are no optocouplers on MIDI outputs, and 31250 is perfectly standard uart speed with zero error when using 16 MHz clock source, affected only by the clock source tolerance.

MIDI specs require 1% baud rate tolerance, usually Arduinos have ceramic resonators and those should be within 1% tolerance unless some extreme conditions apply.

While the keyboard is connected to PC, you should be able to sniff the scancodes passively with Arduino and transmit MIDI messages.

not all arduino have 16mhz clock source 😀 but yes, the 16mhz ones have a perfect divisor for 31250 baud rate, and it would be fine with anything that has a 16mhz divisor too..

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 10 of 13, by xjas

User metadata
Rank l33t
Rank
l33t

I'm actually wondering what the native clock rate on the keyboard itself is. The PS/2 clock is driven by the *device* but 31250 is out of spec. If this thing runs the PS/2 port at that speed making it work like I want to would be pie.

I suspect it doesn't and the signals were resampled (" ") in its original software.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 12 of 13, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

ps2 used to be hooked to the 8042 controller chip and setup for IRQ. ps2 is weird, since it contains the A20 gate code.
lots of companies made the bigass DIP chip thats in old ps2 keyboards. I have no idea whats in a modern one.

its clock rate is 'falling edge', so you can bitbang it at any speed you want provided the controller can feed at the same rate

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 13 of 13, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
BloodyCactus wrote:
Jepael wrote:

There are no optocouplers on MIDI outputs, and 31250 is perfectly standard uart speed with zero error when using 16 MHz clock source, affected only by the clock source tolerance.

MIDI specs require 1% baud rate tolerance, usually Arduinos have ceramic resonators and those should be within 1% tolerance unless some extreme conditions apply.

While the keyboard is connected to PC, you should be able to sniff the scancodes passively with Arduino and transmit MIDI messages.

not all arduino have 16mhz clock source 😀 but yes, the 16mhz ones have a perfect divisor for 31250 baud rate, and it would be fine with anything that has a 16mhz divisor too..

Some have 20mhz 😀 That works too.

All hail the Great Capacitor Brand Finder