XT to PS/2 Converter for Model F
- ramnes
- ПБТ НАВСЕГДА
- Location: France
- Main keyboard: KMAC LE
- Main mouse: Zowie AM
- Favorite switch: GPL 104 lubed 62g nixies
- DT Pro Member: -
Are you planning to release the source code?
Is the keyboard cable enough to flash the little thing?
If the answer to those two questions is no, then I would be interested in filling the text file; otherwise I'll figure out myself.
Is the keyboard cable enough to flash the little thing?
If the answer to those two questions is no, then I would be interested in filling the text file; otherwise I'll figure out myself.
Last edited by ramnes on 15 Sep 2015, 23:46, edited 1 time in total.
- ramnes
- ПБТ НАВСЕГДА
- Location: France
- Main keyboard: KMAC LE
- Main mouse: Zowie AM
- Favorite switch: GPL 104 lubed 62g nixies
- DT Pro Member: -
Oops, I edited my message before seeing your reply. My last sentence didn't make sense but now it's your answer that doesn't because of my edit.
Anyway, now I'd be interested in that text file so you can flash it for me.
Anyway, now I'd be interested in that text file so you can flash it for me.
-
- Location: NC, USA
- DT Pro Member: 0117
No problem, a quick edit and mine agrees with yours now.
The XT2PS2 converter supports two keymaps with two layers each . One is the "STOCK" keymap that emulates the default PC/XT keyboard behavior. The second is the "USER" keymap which is configured using the xth_keymap_user.h file. By default the STOCK and USER keymaps are identical. Switching between the STOCK and USER keymaps is triggered by the magic combo
RSHIFT + LSHIFT + K
Note: these are the default XT keys, not mapped values.
The last selected keymap is stored in EEPROM so that when you power up it will remember which keymap that was in use when the keyboard was powered off.
Keymapping
Digging into the xth_keymap_user.h file, layer 0 is the first column of keycodes in the _xtUserScanCodeMap array and the layer 1 is the second column. The allowable keycodes are listed in the keycode.h file. The keycode KC_TOGGLE_LAYER will toggle between layers on release. The keycode KC_MOMENTARY_LAYER will momentarily change to layer 1 as long as the key is pressed and return to layer 0 when released.
As an example, if we wanted to map the Caps Lock to Right Control on layer 1, find the line for XT_CAPSLOCK and change the entry in the second column to KC_RCTRL:
If the */PrtSc key is to be used to toggle the keymap layers: (Note: The same layer switching key must be used in both layers or your on your own)
Key Combinations
The converter also supports MODIFIER + KEY key combination mappings. These are used in the STOCK keymap to emulate the default XT combos like SHIFT+* for PRTSC and CTRL + SCROLL_LOCK for BREAK.
These are configured in the _xtUserKeyCombinations array and take the form { REQUIRED MODIFIERS, KEY, MAPPEDTO }. For example the stock PRTSC mapping is entered as:
MODS can be combined for example to map H to Z when LCTRL and LALT are pressed:
Note: The modifier keys are not supressed when the mapped to key is sent, for the above combo when LCTRL + LALT + H, is pressed the computer will see LCTRL + LALT + Z.
Have fun
Just kidding! Feel free to ask any questions.
The XT2PS2 converter supports two keymaps with two layers each . One is the "STOCK" keymap that emulates the default PC/XT keyboard behavior. The second is the "USER" keymap which is configured using the xth_keymap_user.h file. By default the STOCK and USER keymaps are identical. Switching between the STOCK and USER keymaps is triggered by the magic combo
RSHIFT + LSHIFT + K
Note: these are the default XT keys, not mapped values.
The last selected keymap is stored in EEPROM so that when you power up it will remember which keymap that was in use when the keyboard was powered off.
Keymapping
Digging into the xth_keymap_user.h file, layer 0 is the first column of keycodes in the _xtUserScanCodeMap array and the layer 1 is the second column. The allowable keycodes are listed in the keycode.h file. The keycode KC_TOGGLE_LAYER will toggle between layers on release. The keycode KC_MOMENTARY_LAYER will momentarily change to layer 1 as long as the key is pressed and return to layer 0 when released.
As an example, if we wanted to map the Caps Lock to Right Control on layer 1, find the line for XT_CAPSLOCK and change the entry in the second column to KC_RCTRL:
Code: Select all
/* XT_CAPSLOCK Caps Lock */ {KC_CAPSLOCK, KC_RCTRL, },
Code: Select all
/* XT_KP_ASTERISK Keypad * */ {KC_TOGGLE_LAYER, KC_TOGGLE_LAYER, },
The converter also supports MODIFIER + KEY key combination mappings. These are used in the STOCK keymap to emulate the default XT combos like SHIFT+* for PRTSC and CTRL + SCROLL_LOCK for BREAK.
These are configured in the _xtUserKeyCombinations array and take the form { REQUIRED MODIFIERS, KEY, MAPPEDTO }. For example the stock PRTSC mapping is entered as:
Code: Select all
{MODS_LSHIFT, KC_KP_ASTERISK, KC_PRINT_SCREEN},
Code: Select all
{(MODS_LCTRL | MODS_LALT), H, Z},
Have fun
Just kidding! Feel free to ask any questions.
- Attachments
-
- xtsps2_keymap.zip
- (3.34 KiB) Downloaded 273 times
- Cheesebaron
- Location: Denmark
- Main keyboard: GH60 - Massdrop ALT
- Main mouse: Mionix Naos 7000, Kensington SlimBlade
- Favorite switch: Buckling spring, Cherry MX Blue
- DT Pro Member: -
- Contact:
Let me ask again, any more of these that you want to sell?Cheesebaron wrote: ↑Do you have any more of these? I just received a XT board that I could use this for.
-
- Location: UK
- Main keyboard: Filco ZERO green alps, Model F 122 Terminal
- Main mouse: Ducky Secret / Roller Mouse Pro 1
- Favorite switch: MX Mount Topre / Model F Buckling
- DT Pro Member: 0167
would it add much to the price if you socketed the IC ? Its no big problem i can just suck it out and put a socket in.
Proper ones , none of that dual wiper rubbish.
http://www.digikey.com/product-detail/e ... -ND/821765
Proper ones , none of that dual wiper rubbish.
http://www.digikey.com/product-detail/e ... -ND/821765
- ramnes
- ПБТ НАВСЕГДА
- Location: France
- Main keyboard: KMAC LE
- Main mouse: Zowie AM
- Favorite switch: GPL 104 lubed 62g nixies
- DT Pro Member: -
Thanks for the tutorial Engicoder!
What is the constant for Super_L? I can't find it in keycode.h.
Also, if I press KC_MOMENTARY_LAYER while being on the layer 1, what's happening?
And would that be possible to have a third layer? I'd love to have layer 0 being the normal layer, layer 1 my custom layer and layer 2 my Fn layer.
What is the constant for Super_L? I can't find it in keycode.h.
Also, if I press KC_MOMENTARY_LAYER while being on the layer 1, what's happening?
And would that be possible to have a third layer? I'd love to have layer 0 being the normal layer, layer 1 my custom layer and layer 2 my Fn layer.
-
- Location: NC, USA
- DT Pro Member: 0117
andrewjoy wrote: ↑would it add much to the price if you socketed the IC ? Its no big problem i can just suck it out and put a socket in.
Proper ones , none of that dual wiper rubbish.
http://www.digikey.com/product-detail/e ... -ND/821765
The cost of the part, of course I can get the part and install it, or you can and I'll send it with the chip unsoldered.
-
- Location: NC, USA
- DT Pro Member: 0117
Super_L is LGUI. The codes are borrowed from the USB codes. They use LGUI for the Windows, Command, and Super keys.ramnes wrote: ↑Thanks for the tutorial Engicoder!
What is the constant for Super_L? I can't find it in keycode.h.
Also, if I press KC_MOMENTARY_LAYER while being on the layer 1, what's happening?
And would that be possible to have a third layer? I'd love to have layer 0 being the normal layer, layer 1 my custom layer and layer 2 my Fn layer.
If you press momentary while on layer 1, you go to layer 0. On release you will return to layer 1. I think my wording is misleading there.
3rd layer....yes, it can be done, but it would require some more advance layer switching.
For clarity, there are 2 complete keymaps, STOCK and USER. Each has 2 layers. So there are actually 4 layers, but only two are intended to be user configurable. In truth all four can be configured by changing the code.
-
- Location: UK
- Main keyboard: Filco ZERO green alps, Model F 122 Terminal
- Main mouse: Ducky Secret / Roller Mouse Pro 1
- Favorite switch: MX Mount Topre / Model F Buckling
- DT Pro Member: 0167
Just send it default , I have a proper desolder station , I will when I get the time get a socket and solder it in.Engicoder wrote: ↑andrewjoy wrote: ↑would it add much to the price if you socketed the IC ? Its no big problem i can just suck it out and put a socket in.
Proper ones , none of that dual wiper rubbish.
http://www.digikey.com/product-detail/e ... -ND/821765
The cost of the part, of course I can get the part and install it, or you can and I'll send it with the chip unsoldered.
- ramnes
- ПБТ НАВСЕГДА
- Location: France
- Main keyboard: KMAC LE
- Main mouse: Zowie AM
- Favorite switch: GPL 104 lubed 62g nixies
- DT Pro Member: -
Ah yeah, forgot about Super not being the standard name. Professional deformation I guess.Engicoder wrote: ↑ Super_L is LGUI. The codes are borrowed from the USB codes. They use LGUI for the Windows, Command, and Super keys.
That's awesome, exactly what I wanted.Engicoder wrote: ↑If you press momentary while on layer 1, you go to layer 0. On release you will return to layer 1. I think my wording is misleading there. .
-
- Location: Uruguay
- Main keyboard: IBM Beamspring
- Main mouse: Logitech Laser trackball
- Favorite switch: beamspring
- DT Pro Member: -
I'm in the same wagon need one for my portable are the adapters still available ?.
Or a schematic and the source code could be nice i could build it myself also ?.
Thanks!
Or a schematic and the source code could be nice i could build it myself also ?.
Thanks!
- JP!
- Location: United States
- Main keyboard: Currently a Model M
- Main mouse: Steel Series Sensei
- Favorite switch: Beam Spring
- DT Pro Member: 0194
- Contact:
Whoa, this is neat. I haven't seen this one before.
-
- Location: UK
- Main keyboard: Planck
- Main mouse: Cyborg Rat 7
- Favorite switch: Alps skcm white
- DT Pro Member: -
Sent an e-mail and PM to the OP but no reply yet. seems that there is still interest in the converter to AT but we would need at least a schematic and component codes to be able to make one ourselves which I am hoping the OP is able to provide.
-
- Location: Uruguay
- Main keyboard: IBM Beamspring
- Main mouse: Logitech Laser trackball
- Favorite switch: beamspring
- DT Pro Member: -
PM the OP several times but he never replied :'(
-
- Location: UK
- Main keyboard: FILCO CKF15
- Main mouse: LOGITECH G402
- DT Pro Member: -
Hi Engicoder, I have a couple of lovely old IBM XT keyboards. Would your encoder work with these and are you selling them still? (I realise the thread is from 2015 - but if you don't ask - you never know) All the best, Chris
- ibmapc
- Location: Albany, OR, USA
- Main keyboard: IBM Model F
- Main mouse: Logitech
- Favorite switch: capacitive buckling spring
- DT Pro Member: -
I am also very interested in one of these for my 5155. Anyone know where the schematic can be found or gerber file or a board that I can copy? It seems the OP is no longer responding to this thread but there is still interest from at least a few of us.
@soviet9922; I recognize your username from VCFED Vintage Computer Forums. Have you received any info about this converter?
@soviet9922; I recognize your username from VCFED Vintage Computer Forums. Have you received any info about this converter?
- ibmapc
- Location: Albany, OR, USA
- Main keyboard: IBM Model F
- Main mouse: Logitech
- Favorite switch: capacitive buckling spring
- DT Pro Member: -
Anyone Want to help me here? I'm going to attempt to wire this together on a small breadboard. At least tell me the value of the resistors. I think I can see 99 percent of the traces on those great pictures from the first post. So, I should be able to figure out the wiring from that, but I'm having trouble seeing the colors on the bands of the resistors on the left side. I think the one lone resistor near the top edge is 10K? What are the other 2?
Greg
Greg
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
It seems those resistors are connected to LEDs so it depends on what ones you are using and its value doesn't matter anyway.ibmapc wrote: ↑Anyone Want to help me here? I'm going to attempt to wire this together on a small breadboard. At least tell me the value of the resistors. I think I can see 99 percent of the traces on those great pictures from the first post. So, I should be able to figure out the wiring from that, but I'm having trouble seeing the colors on the bands of the resistors on the left side. I think the one lone resistor near the top edge is 10K? What are the other 2?
Greg
Did you find firmware for this converter somewhere?
-
- Location: NC, USA
- DT Pro Member: 0117
Here is the simplified schematic for the converter (no status leds)
I need to build the firmware and test it again to be sure the version I have is valid. I will do that tomorrow and then post it here.
Last edited by Engicoder on 16 May 2018, 06:08, edited 1 time in total.
- ibmapc
- Location: Albany, OR, USA
- Main keyboard: IBM Model F
- Main mouse: Logitech
- Favorite switch: capacitive buckling spring
- DT Pro Member: -
Yup, Firmware here https://github.com/engicoder/XT2PS2hasu wrote: ↑ Did you find firmware for this converter somewhere?
EDIT;
It seems the firmware file is not there? Is this just an empty repository? I could have sworn it was there before. Anyhow, looks like Engicoder provided the file in a later post here. keyboards-f2/xt-to-ps-2-converter-for-m ... ml#p413193
Last edited by ibmapc on 19 May 2018, 18:43, edited 1 time in total.
- ibmapc
- Location: Albany, OR, USA
- Main keyboard: IBM Model F
- Main mouse: Logitech
- Favorite switch: capacitive buckling spring
- DT Pro Member: -
Thank You Engicoder for that Schematic. That should make it really easy to wire up on a breadboard. Will one of these work for programming the Attiny85? https://www.sparkfun.com/products/11801
-
- Location: NC, USA
- DT Pro Member: 0117
Here are the hex and eep files for the converter. These use the a basic mapping where all the keys map directly as the legend indicates. It does include 4 key combinations for extended keycodes:
Note: You need to unprogram the CKDIV8 fuse which is programmed by default. AVR fuses can be a bit confusing. In this case a value of 0 means its programmed and 1 means its unprogrammed.
- LShift + PrtSc/Asterisk => PrtSc
- LAlt + PrtSc/Asterisk => SysReq
- LCtrl + NumLock => Pause
- LCtrl + ScrollLock => Break
Note: You need to unprogram the CKDIV8 fuse which is programmed by default. AVR fuses can be a bit confusing. In this case a value of 0 means its programmed and 1 means its unprogrammed.
- Attachments
-
- xt2ps2-firmware-0.1.zip
- (7.9 KiB) Downloaded 231 times
Last edited by Engicoder on 12 Mar 2020, 14:45, edited 2 times in total.
-
- Location: Uruguay
- Main keyboard: IBM Beamspring
- Main mouse: Logitech Laser trackball
- Favorite switch: beamspring
- DT Pro Member: -
Great! thanks Engicoder