XT/AT/PS2/Terminal to USB Converter with NKRO

jeb

01 Feb 2015, 10:13

Setting up a macro, you have to have the base key first, followed by the modifiers. So,

Code: Select all

macro SPACE LALT

User avatar
copter
Last Man Standing

01 Feb 2015, 10:38

Thanks!

User avatar
eldorange

16 Feb 2015, 18:58

Is this converter for sale or DIY (i think i have to enrol for an electrician course)?

User avatar
Halvar

16 Feb 2015, 19:15

It's DIY, but not too hard to make.

Here's a version that's a bit easier to make:

http://deskthority.net/other-external-f ... soarer%27s

Alternatively, if you ask in the Marketplace forum, maybe someone will agree to make one for you.

User avatar
idollar
i$

16 Feb 2015, 20:05

eldorange wrote: Is this converter for sale or DIY (i think i have to enrol for an electrician course)?
Someone put the converter inside a cable. It is offered in ebay:

http://stores.ebay.com/barcodemaverick? ... nkw=Soarer

Cheers

Sigmoid

08 May 2015, 02:17

Hey guys,

I've run into some configuration problems with the converter. So here's the thing. I want to implement two things...

One is a persistent mode selector, via a jumper or an aux toggle switch, to enable "Mac mode" or no.

If Mac mode is enabled, I want a "numlock emulation", ie. num lock should toggle a state where the numpad keys are their non-numpad equivalents (arrows, home, end, pgup, pgdn, etc.) - note TOGGLE...

So here's what I came up with:

Code: Select all

ifkeyboard 0000

ifselect any

layerblock
	FN1			1
	FN2			2
endblock

remapblock
	CAPS_LOCK	RALT
	AUX1		FN1
	AUX2		FN2
endblock

remapblock
layer 0
	LALT		CAPS_LOCK
endblock

remapblock
layer 1
	LALT		LGUI
	NUM_LOCK	SELECT_1
	SCROLL_LOCK	NUM_LOCK
endblock
 
ifselect 1

remapblock
	PAD_1		END
	PAD_2		DOWN
	PAD_3		PAGE_DOWN
	PAD_4		LEFT
	PAD_5		PAD_ENTER
	PAD_6		RIGHT
	PAD_7		HOME
	PAD_8		UP
	PAD_9		PAGE_UP
	PAD_0		INSERT
	PAD_PERIOD	DELETE
endblock
Only it doesn't work.

No. 1 blocking issue: SELECT resets Fn's! Ie. once you hit num lock in Mac mode, you're no longer in Mac mode.

No.2 annoying problem (which causes No. 1 blocking issue): Fns are not triggered by state, instead by edge. Ie. if I have a jumper on AUX1 on startup, Fn1 is NOT enabled. (And if I go to SELECT 1, it becomes UNenabled even though AUX1 is still "pressed".)

Is there any way to implement this? The numlock would be super important for usability on a mac...

EDIT: I think I'd do with some VERY unintrusive way of switching to Mac mode after startup, like "LShift+ RAlt + RShift+ Enter" or something similar... however, the ONLY blocks that take combinations are the Layer ones... and I can't use that since there is no "toggling" of layers. So I have no idea how to do this.
Last edited by Sigmoid on 08 May 2015, 03:37, edited 2 times in total.

User avatar
fohat
Elder Messenger

08 May 2015, 02:31

idollar wrote:
Someone put the converter inside a cable. It is offered in ebay:

http://stores.ebay.com/barcodemaverick? ... nkw=Soarer
I can vouch for Orihalcon's work, it is very clean and elegant.

What you cannot do is open it up and reset it with a pushbutton.

MattDickens

08 May 2015, 06:10

Here's yet another success story using teensy 2.0 + Soarer's 1.12 code.

Model M spacesaver, part number 1391518 from 1986. Rescued from the trash heap. I don't know what kind of connector it had to start with because someone had attempted to wire up a ps/2 cable. I say attempted because most of the keys either wouldn't work or would repeat. Using a Teensy with Soarer's code worked like a charm.

Everything worked except for the 4 keys I had to remap. Pretty odd, but it is good now.

Code: Select all

remapblock
	F13	ESC
	F23	PRINTSCREEN
	F24	SCROLL_LOCK
	LANG_4	PAUSE
endblock
Hopefully this will save someone else with this same model a bit of time.

Sigmoid

08 May 2015, 06:51

Okay I managed in the end it would seem, using macros instead of remappings... I had to overcome some confusion stemming from macros being applied AFTER remaps too, but in the end I prevailed. :)

Layer bindings are:
  • Clear all modes: Shift-Ctrl-ScrollLock
  • Hardware Num lock: Shift-Ctrl-NumLock
  • LGui on Caps: Shift-Ctrl-Caps
  • LAlt on Caps: Shift-Alt-Caps
Here's the code:

Code: Select all

ifkeyboard 0000

ifselect any

remapblock
	CAPS_LOCK					RALT
	LALT						CAPS_LOCK
endblock

macroblock
	# Clear modes
	macro SCROLL_LOCK SHIFT CTRL
		PRESS SELECT_0
	endmacro
	# Switch to hardware Num Lock mode
	macro NUM_LOCK SHIFT CTRL
		PRESS SELECT_1
	endmacro
	# LAlt on Caps Lock
	macro CAPS_LOCK SHIFT ALT
		PRESS SELECT_3
	endmacro
	# LCmd on Caps Lock
	macro CAPS_LOCK SHIFT CTRL
		PRESS SELECT_4
	endmacro
endblock

# Hardware Num lock
ifselect 1

remapblock
	NUM_LOCK	SELECT_2
endblock

ifselect 2

remapblock
	PAD_1		END
	PAD_2		DOWN
	PAD_3		PAGE_DOWN
	PAD_4		LEFT
	PAD_5		PAD_ENTER
	PAD_6		RIGHT
	PAD_7		HOME
	PAD_8		UP
	PAD_9		PAGE_UP
	PAD_0		INSERT
	PAD_PERIOD	DELETE
endblock

# Caps lock remapping
ifselect 3

remapblock
	LALT	LALT
endblock

ifselect 4

remapblock
	LALT	LGUI
endblock

Sigmoid

08 May 2015, 21:26

BTW, Soarer, are you planning on open sourcing this sooner or later? I remember reading an old post where you said you don't want it to be forked.

Anyway if not, it would be nice if you added a timer or activity check to the "onbreak" functionality, mainly for SpaceFn operation.

(In a good SpaceFn implementation, hitting space and then releasing it produces a space. Holding space activates an Fn layer, and hitting another key generates the output of that key on the layer. However, after space was used as Fn, it should Not generate a space on break. So an "onbreak within 500ms" or "onbreak if nothing else has happened since make" would be needed for this.)

User avatar
chzel

08 May 2015, 22:05

Sigmoid wrote: BTW, Soarer, are you planning on open sourcing this sooner or later? I remember reading an old post where you said you don't want it to be forked.
Unfortunately Soarer has been MIA for almost a year now.

User avatar
Muirium
µ

09 May 2015, 00:57


User avatar
XMIT
[ XMIT ]

09 May 2015, 04:36

When I start looking at converters and controllers again more seriously I'd like to compare the features of Soarer's Converter and TMK and maybe make a nice feature matrix or something. That and maybe work on some patches to TMK. Seems like we're better off converging on an already open, already mature solution instead of worrying about the licensing of Soarer's otherwise excellent converter.

Sigmoid

11 May 2015, 06:07

I've scoured the source tree of TMK but didn't find any sort of documentation - the docs folder has a few files which I cannot describe better than as "newspaper clippings" of interest.

Does TMK even speak XT or AT protocol, or was it meant solely as a brand new keyboard's controller to read a switch matrix?

User avatar
XMIT
[ XMIT ]

11 May 2015, 12:34

TMK can be a converter or a controller. It speaks PS/2 which should be AT protocol. https://github.com/tmk/tmk_keyboard/tre ... er/ps2_usb

Sigmoid

11 May 2015, 18:05

XMIT wrote: TMK can be a converter or a controller. It speaks PS/2 which should be AT protocol. https://github.com/tmk/tmk_keyboard/tre ... er/ps2_usb
We'd need to implement XT and all the terminal protocols to make it a replacement for Soarer's.

User avatar
Muirium
µ

11 May 2015, 18:54

Although we often mention TMK and Soarer's in the same breath, they're very different beasts. Using TMK requires coding ability. You need to be able to build from source, and to be comfortable enough editing that source code to make all your changes, no matter how small.

That's a tall order for me. I've tried a few times, but I'm really no coder. The slightest error, and I slide right off track to never recover. It just won't build again. But editing Soarer config files works well for me. Errors are much more recoverable. And installing the firmware is so much easier too: use PJRC's GUI.

Ideally, we could build Soarer style ease of use on top of TMK's powerful foundation. But "we" certainly doesn't include me!

User avatar
XMIT
[ XMIT ]

11 May 2015, 19:11

When you spend as much time in the terminal as I do, and have as many weird keyboards, TMK becomes a vastly easier solution. I'd rather have one codebase that handles everything.

I plan on using TMK as the test bed for some of the terminal protocol reverse engineering that I hope to do eventually. Adding XT protocol support would be a nice starting project.

User avatar
Mal-2

12 May 2015, 01:20

Muirium wrote: Although we often mention TMK and Soarer's in the same breath, they're very different beasts. Using TMK requires coding ability. You need to be able to build from source, and to be comfortable enough editing that source code to make all your changes, no matter how small.

That's a tall order for me. I've tried a few times, but I'm really no coder. The slightest error, and I slide right off track to never recover. It just won't build again. But editing Soarer config files works well for me. Errors are much more recoverable. And installing the firmware is so much easier too: use PJRC's GUI.

Ideally, we could build Soarer style ease of use on top of TMK's powerful foundation. But "we" certainly doesn't include me!
How about using TMK, but adding a user-friendly bit of middleware that will write the source code for you, but is taught what to do through something easily understood? I hold up the Cherry programming software (which anyone can try if they have Windows, they just can't program non-Cherry hardware) as an example that is clunky, but moderately intuitive. It could be done better than that, but I think even something resembling that would be adequate for the purpose.

If you want the Cherry Designer software to see what I'm talking about, start here. Then on the first row of drop boxes, pick anything that has "G86" in it. (Other hardware works with it too, but this is the one I know best.) You will be offered the software for download.

User avatar
Muirium
µ

12 May 2015, 01:23

Xwhatsit's GUI is the reigning champ of intuitive no-code-necessary keyboard programmers. And it's cross platform. There's screenshots aplenty in his thread and documentation.

Only works with his controllers though. But all open source.

User avatar
Halvar

19 May 2015, 21:01

A nice first step would be to make the TMK software configurable through the EEPROM like Soarer's and xwhatsit's software. The TMK software does save some configuration in the EEPROM, but not mappings.

User avatar
copter
Last Man Standing

25 May 2015, 08:26

I have couple keyboards that I have equipped with Teensy. No problems for now, but what if I want to somehow plug them into PS/2 port? Does for example Soarer's controller work with USB -> PS/2 adapter?

santeri

24 Jun 2015, 12:57

I finally got my Model M working with Pro Micro flashed with Soarer's converter, but some keys are mapped wrong. I would like to fix this and have created a config binary file, but scwr doesn't recognize my pro micro as converter. Any ideas on what I am doing wrong?

User avatar
Muirium
µ

24 Jun 2015, 13:40

Remove all other keyboards.
Try another computer
Re download the tools. I believe there is a difference between those for the Converter and Controller.

santeri

24 Jun 2015, 13:48

Thanks Muirium for the suggestions! I will try those now. Do you think it matters that the firmware version is 1.12 and tools are 1.10? (I could not find tools for the 1.12 version)

User avatar
Muirium
µ

24 Jun 2015, 13:52

I assume you're using Soarer's Converter (with the original IBM controller still installed inside the Model M), right? Try the latest version of the zip in the original post:

http://deskthority.net/workshop-f7/xt-a ... t2510.html

If you've replaced the controller (Phosphorglow style) then this is the one to get:

http://deskthority.net/workshop-f7/soar ... t6767.html

And if you keep getting problems regardless, get a Teensy!

andrewjoy

24 Jun 2015, 15:05

I was wondering that too need to get that numberpad tab key working on my 102 m :)!!

thanks for links!

hmm may try getting the space invader working tonight . the pinout on the pcb is helpfully labeled and it also has a reset pin , makes me think it may be XT protocol but you never know . Still it has CLK and DATA and VCC so it will work i guess

User avatar
Muirium
µ

24 Jun 2015, 15:09

Well, it shouldn't short your Teensy / Pro Micro, at least! Working will be a bonus.

santeri

24 Jun 2015, 15:53

Thanks Muirium for the quick answer! I am writing this on a fully working Model M with custom macros! Thank you! I will post pictures as soon as the board is cleaned.

User avatar
Muirium
µ

24 Jun 2015, 16:08

Good stuff. People also like to see eachother's .sc config files so we can steal ideas!

Post Reply

Return to “Workshop”