My IBM Model M keyboard came with an integrated PC speaker, but it wasn’t obvious what it’s meant to be used for. I came across it when doing the restoration, but didn’t think much of it.
As I was researching the history of this keyboard, I found out that per ps-2.kev009.com, these speakers were added to Model Ms meant for use with IBM RS/6000 workstations. I couldn’t find a recording of how the speaker was used when connected to an RS/6000, but per a few forum posts, these were meant to emulate terminal beeping sounds. Unfortunately none of the forum posters reported whether they were able to enable the speaker.
I did find out that the when used with an RS/6000, the speaker is wired to pins F and A on the SDL connector used by the Model M:
I wanted to enable the speaker, so I attempted to wire the spare pins 5 and 6 on the PS/2 side of the keyboard cable. Unfortunately, the pins 5 and 6 on the PS/2 side and pins F and A on the SDL side were not terminated on my cable, making this impossible. While I found some SDL connectors for sale, I don’t have a crimping tool capable of terminating them, so I gave up on this idea.
Instead, I decided to wire the speaker directly, using a 3.5mm audio cable:
The speaker is connected to a line out on my Dell D6000 docking station.
Once I completed the hardware portion of this project, I started looking for a good typing sound emulation solution. I came across the bucklespring program by Ico Doornekamp. Funily enough, this program is meant to emulate the bucklespring sounds of a Model M when using a regular keyboard. Since I already hear the real bucklespring sounds, I decided to modify it to produce beeps instead. The bucklespring program provided a lot more complexity, since Ico included precise buckling sounds for each key, but it was otherwise exactly what I was looking for, including additional functionality such as muting and unmuting.
To make it produce beeping sounds instead of buckle springs, I recorded a 1khz beep using the speaker-test program:
$ ( speaker-test -t sine -f 1000 )& pid=$! ; sleep 0.1s ; kill -9 $pid
Since the original code replicate both pressing and releasing a key (just like a real bucklespring), I removed all the wav files ending in -0 (for release), and replaced all the wav files ending in -1 (for pressing the key). This should be done more ellegantly by changing the code, but for now it works with intended effect.
Additional changes I’ve made:
- defined the model M scroll lock key as 0x77 to use as mute key
- added LED control for engaging the mute key to light up the scroll lock LED (by issuing “xset led 3” to the system)
I run the program with the mute function (-M) and then double press the scroll lock to enable beeping (turning scroll lock LED on). When done with beeping, I double click the scroll lock (turning scroll lock LED off).
Here’s a sample recording, including unmuting and muting the program:
This was a pretty silly project and I don’t expect I’ll be using the beeping sound much, but it was fun to get this speaker working, even in this very work around sort of way. If you know more about how this speaker was actually used (or if you have a recording!), please @ me on twitter (@mejs) or email me at vladimirvince at gmail.
Additional details on the bucklespring program modifications are available on my github.