Need help with Tandberg TDV 5000
- gcardinal
- Location: Oslo
- Main keyboard: Tandberg TDV
- Main mouse: Logitech G5
- Favorite switch: Topre
- DT Pro Member: -
Didnt do any other testes when connected - but I did take it apart just to do a visual inspection. Tried to take pictures of any points of interest I could spot:
https://www.dropbox.com/sh/teajwebsbuq5 ... M--ua?dl=0
I have no experience with older keyboard like this, but I do have some very basic understanding of electronics. I also have multimeter, soldering tools and 100mhz oscilloscope.
I would love to get this keyboard up and running - as all switches seems to be in great condition also all double shot keycaps are nearly mint condition.
Would greatly appreciate any help, advice or just ideas of what to try and what to do next
- OleVoip
- Location: Hamburg
- Main keyboard: Tandberg TDV-5010
- Main mouse: Wacom Pen & Touch
- Favorite switch: Siemens STB 21
- DT Pro Member: -
Congratulations to this beautiful board. Normally, this should be PC compatible, except for the unusual scan codes of the special NOTIS text processing keys. If it does not talk to your PC, something must be broken.
These are the first things I would try:
With your oscilloscope, you can check the lines of the PS2 connection. The keyboard is supposed to generate the clock signal at a frequency between 10 and 17 kHz (IRRC), whenever it transmits data or receives some from the host. You can trigger this without the PC by pulling both data and clock low and releasing the clock line after at least 1/10 s; thereafter the keyboard should reply with a clock burst.
By watching the outputs of the column decoder 74HC154, you can check whether the controller actually scans the matrix; frequency should be of the order of a few 100 Hz or kHz.
edit: Come to think of it, even better than the outputs is pin 23 (A0), which should toggle with every column being checked.
These are the first things I would try:
With your oscilloscope, you can check the lines of the PS2 connection. The keyboard is supposed to generate the clock signal at a frequency between 10 and 17 kHz (IRRC), whenever it transmits data or receives some from the host. You can trigger this without the PC by pulling both data and clock low and releasing the clock line after at least 1/10 s; thereafter the keyboard should reply with a clock burst.
By watching the outputs of the column decoder 74HC154, you can check whether the controller actually scans the matrix; frequency should be of the order of a few 100 Hz or kHz.
edit: Come to think of it, even better than the outputs is pin 23 (A0), which should toggle with every column being checked.
- gcardinal
- Location: Oslo
- Main keyboard: Tandberg TDV
- Main mouse: Logitech G5
- Favorite switch: Topre
- DT Pro Member: -
Thank you! My experience with oscilloscope is very limited, so Im not sure if I did it correctly but here are my results:OleVoip wrote: ↑...
Spoiler:
and got this reading:
After that I connected to two points and tried to press a key:
Then I connected to PS/2 lines while it was connected to PC:
Here I cound't see or trigger and decode anything:
Not sure if my setup was incorrect or trigger was to high/low - it was getting pretty late so I called it a day .
Last edited by gcardinal on 16 Mar 2016, 21:41, edited 1 time in total.
- OleVoip
- Location: Hamburg
- Main keyboard: Tandberg TDV-5010
- Main mouse: Wacom Pen & Touch
- Favorite switch: Siemens STB 21
- DT Pro Member: -
Good to see that the controller is alive and scanning. So it's still possible that it is also fine otherwise and it is the socket, the cable or the PC side which is at fault. Resistors pull the clock and data lines up to 5V so you can signal the lines simply by shorting them to ground - first the clock line, then the data line, then release clock and you should see a series of pulses on the clock line. If this doesn't work check the continuity of the traces between the ps/2 socket and the controller pins. If you really can't trigger that reply, the controller must be broken and you need to replace it.
The fact that key presses don't trigger a clock burst is not indicative, because the controller might expect an initialization command from the PC before it starts sending anything.
The fact that key presses don't trigger a clock burst is not indicative, because the controller might expect an initialization command from the PC before it starts sending anything.
- gcardinal
- Location: Oslo
- Main keyboard: Tandberg TDV
- Main mouse: Logitech G5
- Favorite switch: Topre
- DT Pro Member: -
Thank you so much for the advice! It was just the ideas I neededOleVoip wrote: ↑...
After some googling I got to this article:
http://codeandlife.com/2013/07/15/ardui ... rd-tester/
It is about using Arduino as PS/2 keyboard tester. So I connected it as per PS/2 port specification - but got ones again nothing. After some testing with multimeter I got an idea that maybe it is not PS/2 port after all - maybe it just looks like one. So I scanned all pins on connector, to the board and traced them back to CPU. Then I created this diagram:
Compared to regular PS/2 port - all pins are swapped around.
So now with better understanding of the port on the keyboard, I connected it up to Arduino ones again and got this very promising session: To say that Im incredibly happy to get this far is an understatement
Next step will be making a new cable, putting it all back together and trying it on a PC
- OleVoip
- Location: Hamburg
- Main keyboard: Tandberg TDV-5010
- Main mouse: Wacom Pen & Touch
- Favorite switch: Siemens STB 21
- DT Pro Member: -
Well done, you! I must admit that I had a slight hope you could give up and I could get the board.gcardinal wrote: ↑To say that Im incredibly happy to get this far is an understatement
Thank you very much for sharing your joy!
Now, it might be a good idea to leave an arduino or teensy between the keyboard and the PC, if you want to make use of the 20 ochre-coloured NOTIS keys. IIRC, the scan codes of these keys are marked by a prefix which is not understood by the PC or of-the-shelf PS/2-USB converters, so that the PC confuses them with other keys. Your arduino keyboard tester will tell you the codes.
You'll need a controller that maps the keys to other codes or directly converts to USB - unless you'd like to mess with the keyboard driver of your operating system.
edit: Oh, and may we use your images in the wiki?
- gcardinal
- Location: Oslo
- Main keyboard: Tandberg TDV
- Main mouse: Logitech G5
- Favorite switch: Topre
- DT Pro Member: -
Yes indeed and I looked into Soarer's and TMK firmware (post here) and got answer that this keyboard with 80 xx prefix is not supported. Im not a C / C++ programmer but will give a try to modify TMK and see where I can get with it...OleVoip wrote: ↑...
You'll need a controller that maps the keys to other codes or directly converts to USB - unless you'd like to mess with the keyboard driver of your operating system.
But I did install Soarer's on Arudino Leonardo (thats what I had) and did type on it for a while - feels like no other keyboard - definetely an uniq feeling.
Of course, I will also make some better pictures during the weekend when lighting is betterOleVoip wrote: ↑edit: Oh, and may we use your images in the wiki?
- gcardinal
- Location: Oslo
- Main keyboard: Tandberg TDV
- Main mouse: Logitech G5
- Favorite switch: Topre
- DT Pro Member: -
Had a go with TMK firmware, but was unable to get it working since I simply dont know C
I ended up making a new PS/2 cable and connecting it directly to PC: And this is how my desk looks with keyboard: I can't use extra keys, but will try my luck with Microsoft Keyboard Layout Creator...
I found a book about NOTIS-WP and now kinda understand what all the extra keys supposed to do - for the most part there is a modern shortcuts - at least for use in texteditors / webbrowsers. I will post it here as soon as I get time to translate it from norwegian to english
Edit:
I ended up making a new PS/2 cable and connecting it directly to PC: And this is how my desk looks with keyboard: I can't use extra keys, but will try my luck with Microsoft Keyboard Layout Creator...
I found a book about NOTIS-WP and now kinda understand what all the extra keys supposed to do - for the most part there is a modern shortcuts - at least for use in texteditors / webbrowsers. I will post it here as soon as I get time to translate it from norwegian to english
Edit:
I added more pictures to the dropboxOleVoip wrote: ↑...
edit: Oh, and may we use your images in the wiki?
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
your converter with tmk or soarer's firmware does work well for other keys except for 80 prefix keys ?
you will have to change matrix.c, common_keymap.h and your keymap file.
I have not enough time to write code for you but subscribed this thread to see your interesting project, keep us posted!
you will have to change matrix.c, common_keymap.h and your keymap file.
I have not enough time to write code for you but subscribed this thread to see your interesting project, keep us posted!
- gcardinal
- Location: Oslo
- Main keyboard: Tandberg TDV
- Main mouse: Logitech G5
- Favorite switch: Topre
- DT Pro Member: -
Yes both soarer's and tmk work great with all other keys except for 80 prefix. but so dose plugging it directly to ps/2 port of my PC - but without converter I get as far as I can see full NKRO.hasu wrote: ↑your converter with tmk or soarer's firmware does work well for other keys except for 80 prefix keys ?
...
Also there is a fun feature of this keyboard where it has a piezo speaker and its possible to turn it on / off with ctrl + alt + arrow down - it makes kinda fun sound on each key press. Not annoying at all actually.
Okay - I will try and see where I can get with my basic C knowledge - Im sure I will get there one day
Today I discovered that key A had bad connection - so did some maintenance - opened one switch without desoldering and de-soldered another and opened it up. Super simple construction with removable diodes (!). It is possible to open switches without de-soldering and their all fully serviceable.
Made this short video: Working just fine now - typing this post on the this keyboard now. It is really close to how "vintage" cherry mx black feel but even softer - but with kinda the same force required.
-
- Main keyboard: Tandberg TDV5020
Five and a half years later ...
I contacted Hasu, main developer of the TMK converter, and provided keycodes. He added the missing code, so tmk_converter now supports the 0x80 prefixed keys. They are translated to "normal" range keycodes, so that key '^^^' is Super_L, for example.
https://github.com/tmk/tmk_keyboard/com ... 8bb3fe023f
If you have this keyboard, you still have to fix the pin layout by a converter cable. (It may be possible to make a special build of the firmware where this is fixed as well, I guess)
Ingvar
I contacted Hasu, main developer of the TMK converter, and provided keycodes. He added the missing code, so tmk_converter now supports the 0x80 prefixed keys. They are translated to "normal" range keycodes, so that key '^^^' is Super_L, for example.
https://github.com/tmk/tmk_keyboard/com ... 8bb3fe023f
If you have this keyboard, you still have to fix the pin layout by a converter cable. (It may be possible to make a special build of the firmware where this is fixed as well, I guess)
Ingvar
-
- Location: Norway
- Favorite switch: Buckling Spring
- DT Pro Member: -
A heads-up on a project I have been having lately: Patching the firmware to natively put out recognizable-keys instead of the NOTIS special-keys. It turns out to be very doable, given you have a fresh 8751 to burn, as well as a programmer.
First of all, I have been able to read out the v2.1 firmware using this type of dumper: https://github.com/JohnDMcMaster/8051dumper . The particular chip in question is the mask-ROM plastic DIP edition. Very early keyboards usually have a ceramic DIP, the 8751 EPROM-based one with a quartz window, and those might have the protection-fuses activated. My own TDV 5010 with firmware v1.4 unfortunately has this, and the v2.1 dump I was able to make is from a friend's TDV 5010.
Making this firmware output media-keys is rather simple. There is already settings in there for defining keys with the 0xE0 prefix, so all you really need to do is to patch up to four or five data-tables. After this, the only thing remaining is really just to adjust the checksum byte at the end of the file before burning it to an empty 8751.
------------------
So, for the technical bits.
We are only really changing the scancode data in some tables here, so we don't really need to know too much how the code works. One thing to note, though, is which index in a table corresponds to what key on the keyboard itself. This overview may help:
For the four scancode-tables, the index can be directly used as a byte-offset. This is convenient, as the tables are neatly laid out on the following addresses towards the end of the ROM:
If you look up the bytes for the NOTIS keys, you will see that all of them use the bit-pattern of xx000111. This will make the firmware add the 0x80 prefix, and we want to change this to 0xE0. The 0xE0 prefix is used for the navigation-keys, which is handy since all we have to do is just changing the xx000111 to xx000001. It's also possible to do as you want here, for example if you want to make some keys into non-media keys, just plain scancodes without additional prefixes, you can use xx000000 too, or if you hit some of the extra keys on accident a lot you can permanently silence any of them with xx000110.
The checksum is located at 0x0FFF. Tandberg used a special type of checksum, where the ordinary 32-bit sum (calculated from summing all bytes in the whole binary) is expected to fold down to 0xAA. The folding process consist of adding all bytes of the checksum together, and if the result is still not within 256, the folding is then repeated on the previous result untill you get something that does add to less than 256. In effect, this will be the ordinary 8-bit sum of the binary, but with the number of 8-bit overflows added to the count as well. If you want to test this for yourself, you can try to calculate it on the unpatched binary. After patching, you need to adjust the checksum-byte so it all adds up correctly.
..In essence, if you just add the 4 bytes making up the full 32-bit sum, a valid checksums is either 0x0AA, 0x1A9, 0x2A8 or 0x3A7.
------------------
I did not mention the last table yet. This is only relevant for scancode set 3, which is seldom used. In any way, the table for this is located at 0x0B71. The format is as follows, and pay attention to the bit-endianess:
------------------
That was it, I hope this can come in handy for other people than me.
First of all, I have been able to read out the v2.1 firmware using this type of dumper: https://github.com/JohnDMcMaster/8051dumper . The particular chip in question is the mask-ROM plastic DIP edition. Very early keyboards usually have a ceramic DIP, the 8751 EPROM-based one with a quartz window, and those might have the protection-fuses activated. My own TDV 5010 with firmware v1.4 unfortunately has this, and the v2.1 dump I was able to make is from a friend's TDV 5010.
Making this firmware output media-keys is rather simple. There is already settings in there for defining keys with the 0xE0 prefix, so all you really need to do is to patch up to four or five data-tables. After this, the only thing remaining is really just to adjust the checksum byte at the end of the file before burning it to an empty 8751.
------------------
So, for the technical bits.
We are only really changing the scancode data in some tables here, so we don't really need to know too much how the code works. One thing to note, though, is which index in a table corresponds to what key on the keyboard itself. This overview may help:
Code: Select all
Index: Key:
0x01 HJELP
0x02 /\/\/\
0x16 [Stroked down-arrow]
0x17 -->|
0x18 |<--
0x27 >> <<
0x2B <> ><
0x2D JUST
0x3B FLYTT
0x46 STRYK
0x4B MERK
0x4D KOPI
0x69 ORD
0x6C SETN
0x6E FELT
0x6F AVSN
0x79 SLUTT
0x7C SKRIV
0x7D [Sideways u-turn arrow]
0x7F ANGRE
- 0x0D34: Base scancodes for set 1
- 0x0D84: Base scancodes for set 2
- 0x0E34: Base scancodes for set 3
- 0x0E84: Keytype definitions
Code: Select all
Keytype definitions:
76543210 <- Bit-nr.
||||||
|||+++- 0 = Normal Key No prefix
||| 1 = Extended Key 0xE0 prefix
||| 2 = Cursor navigation (Special cases)
||| 3 = NumPad slash (Special case)
||| 4 = PrtScr (Special case)
||| 5 = Pause/Break (Special case)
||| 6 = Key disabled for ordinary use No handling
||| 7 = NOTIS special 0x80 prefix
|||
+++---- 0 = Normal Key
1 = L Shift
2 = R Shift
3 = L/R Alt
4 = L/R Ctrl
5 = Num Lock
6 = Caps Lock
7 = Insert
The checksum is located at 0x0FFF. Tandberg used a special type of checksum, where the ordinary 32-bit sum (calculated from summing all bytes in the whole binary) is expected to fold down to 0xAA. The folding process consist of adding all bytes of the checksum together, and if the result is still not within 256, the folding is then repeated on the previous result untill you get something that does add to less than 256. In effect, this will be the ordinary 8-bit sum of the binary, but with the number of 8-bit overflows added to the count as well. If you want to test this for yourself, you can try to calculate it on the unpatched binary. After patching, you need to adjust the checksum-byte so it all adds up correctly.
..In essence, if you just add the 4 bytes making up the full 32-bit sum, a valid checksums is either 0x0AA, 0x1A9, 0x2A8 or 0x3A7.
------------------
I did not mention the last table yet. This is only relevant for scancode set 3, which is seldom used. In any way, the table for this is located at 0x0B71. The format is as follows, and pay attention to the bit-endianess:
Code: Select all
76543210 <- Bit-nr. in each byte
||||||||
||||||++- Entry for Index nr. [byte-offset x 4 + 3]
||||++--- Entry for Index nr. [byte-offset x 4 + 2]
||++----- Entry for Index nr. [byte-offset x 4 + 1]
++------- Entry for Index nr. [byte-offset x 4]
10 <------- Bit-nr. in each entry
||
|+- Typematic enabled by default if 1
+-- Release (break) scancode enabled by default if 1
That was it, I hope this can come in handy for other people than me.
Last edited by FrodeM on 15 Jan 2023, 06:26, edited 1 time in total.
-
- Location: Norway
- Favorite switch: Buckling Spring
- DT Pro Member: -
Quick update:
I was able to dump v1.4 as well after some trickery, and the format of the tables are exactly the same. One thing to note, the addresses are different:
0x0ACE: Default key mode for scancode set 3
0x0C7C: Base scancodes for set 1
0x0CFC: Base scancodes for set 2
0x0D7C: Base scancodes for set 3
0x0DFC: Keytype definitions
There's also a bug in the v1.4 scancode set 3 table, which causes problems with the [ ' * ] key. Other than fixing this, v2.1 fixes a few other bugs and oversights as well, so there's little point using v1.4 as a basis for your own patch.
------------------------
Otherwise, I made a patch for my own keyboard, based on v2.1. You can find this here: https://inhale.ed.ntnu.no/tdv_5000_patch.zip
I was able to dump v1.4 as well after some trickery, and the format of the tables are exactly the same. One thing to note, the addresses are different:
0x0ACE: Default key mode for scancode set 3
0x0C7C: Base scancodes for set 1
0x0CFC: Base scancodes for set 2
0x0D7C: Base scancodes for set 3
0x0DFC: Keytype definitions
There's also a bug in the v1.4 scancode set 3 table, which causes problems with the [ ' * ] key. Other than fixing this, v2.1 fixes a few other bugs and oversights as well, so there's little point using v1.4 as a basis for your own patch.
------------------------
Otherwise, I made a patch for my own keyboard, based on v2.1. You can find this here: https://inhale.ed.ntnu.no/tdv_5000_patch.zip