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

User avatar
Muirium
µ

04 Aug 2022, 20:45

apastuszak wrote:
04 Aug 2022, 17:18
I'm having a really odd problem with my Soarer's Converter today.

It's working just fine when I plug it into my Mac. When I plug it into my Windows 10 work computer, it gives me all sorts of issues. It fails to type sometimes. Other times, I will type a letter and will just continuously repeat. I hit backspace and it won't backspace. I hit it again, and backspace runs till I deletes my entire line.

I don't have another Windows computer in the house to test it with, so it's tough to tell if it's something to do with the the Windows 10 image on my work PC, or if it's a problem with the converter and Windows 10 in general.

Has anyone seen this with Windows 10?
Are you using a USB hub?

apastuszak

05 Aug 2022, 02:44

USB switch box.

apastuszak

05 Aug 2022, 17:48

Ok, I think the problem is with the keyboard. It's a Unicomp M122 from 2008. I pulled out my 1985 Model M and plugged in my SDL Soarer's Converter and don't seem to be having any issues, other than really wanting Windows keys.

I'm really tempted to order a PS/2 New Model M and see what happens.

apastuszak

06 Aug 2022, 02:42

Ok. finally figured it out and thought I would share with the group in case someone else has this problem.

So, my old laptop was a ThinkPad T470. Worked great. I had it plugged into a Lenovo USB-C Gen 2 dock.

Then I got uprgaded to a ThinkPad T14 Gen 2. And that's when the trouble started. I compiled a list of driver I wanted updated.

Then I did some experimenting. Rather plugging the Soarer's Converter into the dock, plugged it into the laptop, which was a huge PITA, because it was buried under a bunch of crap.

Talking to my boss about this, he told me I had the USB-C dock plugged into the wrong port on the laptop. On the T470, there was only one USB-C port. On the T14, I plugged it into the same USB-C port. But it turns out there is a thunderbolt 4 port in front of it that I am supposed to use. I plugged the dock in there, and the keyboard has been working OK for the last 5 minutes. If it acts up again, I will report it didn't fix it, and move on with day.

This is obviously a "me" issue and not a problem with the Soarer's Converter.

apastuszak

06 Aug 2022, 02:44

Welp, that didn't fix it.

User avatar
hellothere

10 Aug 2022, 23:45

Assuming that the Unicomp you currently have has a PS/2 connector, have you tried with an PS/2 to USB active adapter? However, this might be a fix as or more expensive than buying parts to build another Soarer's.

I have seen the problem you're having if the ground isn't connected. You might want to check your wiring.

Possibly a firmware issue? I haven't played with Soarer or other converter firmware.

I found out, yesterday, that Drakware has a PS/2 to USB adapter which, I assume, is either based on Soarer's or TMK. They're $25 and I bought the last one yesterday (got a message saying "sold out" when I tried to add another to my shopping cart, so literally, the last one). I've not tried the PS/2 to USB before, but I have used several ADB to USB and I was very happy with them. In other words, you might want to buy one of these instead of building another adapter.

User avatar
Muirium
µ

10 Aug 2022, 23:52

Drakware is neither Soarer nor TMK based, as I understand. They have their own software here:

https://www.drakware.com/firmware

I’ve never bought one. Prefer people and projects who are active in the community.

AngryCockroach

03 Sep 2022, 20:52

Hi,
I restored a few Model M 122 key terminal keyboards and also used the Soarer's Converter to flash Arduino Pro Micros with.
The way to write your config files and flash them to the converter is fairly easy if you done similar things before. But when you did not, it may be a bit difficult. That's why I tried to make a UI for the Soarer's Converter.

With this very early version you can see your keyboard and click an a key (right ALT in this example).
Screenshot_2022-09-03 20.43.28_aYDWuw.png
Screenshot_2022-09-03 20.43.28_aYDWuw.png (646.29 KiB) Viewed 16811 times
You can then select a key to remap to (I only entered 3 keys for testing).
Screenshot_2022-09-03 20.43.37_JCHm7a.png
Screenshot_2022-09-03 20.43.37_JCHm7a.png (722.6 KiB) Viewed 16811 times
And then you see the mapping below.
Screenshot_2022-09-03 20.43.45_sD9J43.png
Screenshot_2022-09-03 20.43.45_sD9J43.png (623.84 KiB) Viewed 16811 times

Of course there are many features still missing, e.g. switching to another keyboard layout, macros, layers, read and write configs to the converter directly etc.

But do you think this could be interesting to continue as a tool for beginners?


EDIT: See viewtopic.php?f=7&t=27533 for releases and download links.
Last edited by AngryCockroach on 05 Sep 2022, 17:47, edited 1 time in total.

User avatar
Muirium
µ

04 Sep 2022, 13:21

Interesting. I see a Mac window. What are you building this with?

As for handing it to the masses: even (and especially) newbs have finicky requests for very particular things they’re trying to do. You’ll wind up with one almighty todo list of a project! ;)

AngryCockroach

04 Sep 2022, 16:07

I am using Kotlin and Compose for Desktop. So I can build it for MacOS, Windows and Linux with the same code (but I need to build it on all three OSes separately…)

Well, since it is a hobby, it should not be finished soon anyway :D
And also some people may help…

As soon as I implemented the flashing within the app I will build it and it can be tested.

But I need some more different keyboard layouts. So feel free to paste the hid code layout for other keyboards.

User avatar
Muirium
µ

04 Sep 2022, 16:16

What’s a hid code layout? :lol:

I use Soarer’s on regular winkeyless full-size and tenkleyless layouts. Mostly ANSI.

Image

Also Big Ass Enter, which was very common back in the era this converter is aimed at.

Had a terminal 122 like yours but sold it years ago. Less is more, for me.

AngryCockroach

04 Sep 2022, 16:47

With hid code I mean the scan codes, like this:

https://drive.google.com/file/d/1-LhanN ... p=drivesdk

With this and an image of the keyboard I can create a new layout in the app.

User avatar
Muirium
µ

04 Sep 2022, 16:48

Added to my little project list. ;)

I expect your terminal board’s layout is already most of the work. These smaller boards are broadly subsets of the big boys.

lylat1an

06 Sep 2022, 02:37

I would like to assign some Windows shortcuts to macros on my IBM Model M keyboard since it lacks "Windows" keys.

My codes get through programmer without errors, but the converter doesn't seem to notice them.

I even tried simply remapping the A and Z keys to each other as a test, and that's not working either.

Both codes are below. May I please have some help troubleshooting the issue(s)?

Code: Select all

# Layers
layerblock
	# Layers here
endblock

# Remappings
remapblock
	# Remappings here
	Z A
	A Z
endblock

# Macros
macroblock
	# Macros here
endblock

Code: Select all

# Layers
layerblock
	# Layers here
endblock

# Remappings
remapblock
	# Remappings here
endblock

# Macros
macroblock
	# Macros here
	macro E ALT
		PUSH_META CLEAR_META ALT
		SET_META LGUI
		PRESS E
		CLEAR_META LGUI
		POP_META
	endmacro

	macro G ALT
		PUSH_META CLEAR_META ALT
		SET_META LGUI
		PRESS G
		CLEAR_META LGUI
		POP_META
	endmacro

	macro PAUSE ALT
		PUSH_META CLEAR_META ALT
		SET_META RGUI
		PRESS PAUSE
		CLEAR_META RGUI
		POP_META
	endmacro
endblock

User avatar
Muirium
µ

06 Sep 2022, 23:26

The Z<>A remap really should work. Something is wrong with your Teensy or your software tools. Using that batch file Soarer included, which may hide the intermediate details from you? Sounds like scas is working but scwr is not.

lylat1an

07 Sep 2022, 06:31

Muirium wrote:
06 Sep 2022, 23:26
The Z<>A remap really should work. Something is wrong with your Teensy or your software tools. Using that batch file Soarer included, which may hide the intermediate details from you? Sounds like scas is working but scwr is not.
Running the batch file does create .scb files, but the cables just won't accept them. Maybe more information will help:


I bought these two pre-made SDL to USB cables from Orihalcon on Ebay. (Seems they have an account here too)

I'm running Windows 10 Home edition with one cable at a time connected directly to the motherboard.

I've tried re-downloading Soarer's v1.10 package and unzipping it to a separate folder in case there was an error in the first one.

I've tried holding Shift to run the programs as an Administrator.

I've even tried running the programs in compatibility mode for Windows 7 and XP.

The only thing I haven't tried yet is a non-Windows OS. I know a little bit about Linux, but not enough to trust myself and I'm not a fan of macs.

User avatar
Muirium
µ

07 Sep 2022, 10:27

Try running scinfo to confirm the converter is in fact running Soarer’s firmware.

lylat1an

07 Sep 2022, 14:44

Muirium wrote:
07 Sep 2022, 10:27
Try running scinfo to confirm the converter is in fact running Soarer’s firmware.
All it says is that it's running version 1.12.

Screenshot attatched.
Attachments
SCInfo.png
SCInfo.png (1.92 MiB) Viewed 16565 times

User avatar
Muirium
µ

07 Sep 2022, 14:47

No good reason why it won’t work then. Scwr should be able to see it just as well as scinfo. Maybe try giving scas an empty text file and flashing what it builds from that. I do just that to erase all settings from a converter.

lylat1an

07 Sep 2022, 16:07

Muirium wrote:
07 Sep 2022, 14:47
No good reason why it won’t work then. Scwr should be able to see it just as well as scinfo. Maybe try giving scas an empty text file and flashing what it builds from that. I do just that to erase all settings from a converter.
I've been trying the tools in CMD and they seem to be functioning, but one time I believe I managed to view the file as written in the converter and it showed errors.

I forgot what I did to see that. If I can do it again I may be able to troubleshoot the problem.

Scdis.exe isn't being helpful either, This is the output from an empty config file:

Code: Select all

# length: 6
# signature: S C
# version: 1 1

User avatar
Muirium
µ

07 Sep 2022, 16:55

Scdis will show very little from an empty file. There's just not much in there! Soarer only stores your customisations. The whole default set of keys is not written. ;)

Try scrd and then scdis that, to see what your converter currently has on it.

Ultimately, you could run scboot and reflash the converter. You'll need QMK Toolbox or Teensy Loader open when you do that—the Teensy reboots back into the converter when disconnected—and then upload Soarer's hex again.

Note: Soarer stores your customisations in an area of NVRAM on the Teensy very few things ever touch. Interestingly, even if you reflash it, you'll find you have the same settings. And more impressively still: this is even so if you flash it with TMK or QMK, use it for years, and then eventually go back to Soarer only to find all of your old settings miraculously intact. I did just this recently with my SSK! To actually clear those settings, only scwr will do the trick.

lylat1an

07 Sep 2022, 17:29

I'm not sure what the problem was, but starting from scratch on my work PC was successful.

Hopefully I'll be able to repeat the process with the other cable tonight, or at work tomorrow.

Thank you very much for your assistance, Muirium.

User avatar
Muirium
µ

07 Sep 2022, 17:59

You're welcome. Happy Soaring! :D

apastuszak

06 Oct 2022, 16:48

Is there a limit to how many lines the macroblock can be?

I'm getting a "block too large" error on my .sc file. My macro block is 141 lines long and growing.

User avatar
Muirium
µ

06 Oct 2022, 17:33

Good question. That error sure sounds like it! Looking at Soarer's documentation (I've a conveniently online copy in my 64 bit thread OP), the word "limit" literally does not appear. I've never encountered it myself.

Here's my biggest Soarer config, by the way, for my General Purpose Soarer Box: 477 lines long!

Code: Select all

###############################################################################
# µ's General purpose, agnostic Soarer Box config for winkeyless PC keyboards #
###############################################################################
#
# Works with AT/PS/2 *and* XT keyboards: XT is assumed to be original IBM PC/XT keyboard

# Basic layout:
#
# Just one function layer: HHKB style
# Both Insert and App key (where present) are Fn1 >> also right Control/Alt in circumstances?
# Real volume keys across F13-F15 block, above nav sixpack
# Detect and switch everything to IBM PC/XT keyboard layout when XT code set active

# Macros:
#
# Shift + Shift = Caps Lock
# Command + Esc = Command + tilde
# Press Control + Pause Break (Volume Up) to toggle stràc mode: Control + vowels for Gaelic à and Ì etc.
# Right physical Control remains Control + Arrow keys
# SSK style integrated Numpad on Shift + Scroll Lock (i.e. Num Lock / Volume Down) toggle
# Numpad Num Lock toggle for PC style navigation keys

# To do:
#
# Press Numpad Num Lock on a fullsize keyboard to quickly toggle Mouse Keys? (when enabled on Mac)
# Handle winkeyless *and* winkeyed boards again, via some cunning toggle? Use those extra keys to hide it!
# Any interest in supporting Model M122 in easily detected terminal mode?
# Add SSK-inspired Kishsaver style bottom right mod = Fn1 duality, while retaining general use

# Keyboard detection:
#
# This is the generic fullsize PS/2 keyboard ID:
# Keyboard ID: AB83
# Code Set: 2 (extended)
# Mode: AT/PS2
#
# Is the SSK a rare AB84? Keep an eye out for those, "compacts"
# Yes it is, so let's use AB83 to screen out the PC numpad nav mode
#
# And this is the IBM PC/XT keyboard ID:
# Keyboard ID: 0000
# Code Set: 1
# Mode: PC/XT
#
# The Keyboard ID is almost useless, as all manner of PS/2 boards report as AB83



layerblock
	fn1		1
endblock

##########################################
# General AT/PS2 mode layout definitions #
##########################################

# set2 = AT and set2ext = PS/2 apparently

ifset set2 set2ext 				# Exclude XT
remapblock
layer 0
	insert		fn1			# The actual Fn key I can rely on being physically present
	app		fn1			# And the one I can't
	caps_lock	lctrl
	lctrl		lalt
	lalt		lgui
	ralt		rgui
	rctrl		ralt
	printscreen	mute
	scroll_lock	volume_down
	pause		volume_up
	num_lock		select_4			# Toggle Numpad PC style navigation block (the NMB's LED even shines when engaged)
endblock

ifset set2 set2ext
remapblock
layer 1
	left_brace	up
	semicolon	left
	quote		right
	slash		down
	l		page_up
	period		page_down
	k		home
	comma		end
	a		volume_down
	s		volume_up
	d		mute
	backspace	delete
	1		f1
	2		f2
	3		f3
	4		f4
	5		f5
	6		f6
	7		f7
	8		f8
	9		f9
	0		f10
	minus		f11
	equal		f12
	esc 		system_power
	back_quote 	europe_2
 endblock

############################################
# Special IBM PC/XT only layout definition #
############################################

ifset set1
remapblock
layer 0
	f9		rctrl			# Claim bottom function keys for left mods
	f10		lalt
	lalt		lgui
	pad_asterix	fn1			# The vital HHKB style Fn key
	caps_lock	rgui			# XT sure has some strange mods
	num_lock		select_3			# Toggle XT numpad numerics
	scroll_lock	select_2			# Toggle strac mode on XT, as Alt+Alt is causing a shithouse
	f5		home
	f7		end
	f6		page_up			# Might as well make good use of these vertical f-key pairs
	f8		page_down
	f3		delete
	f4		backspace
	backslash	back_quote		# For some reason, these are reversed
	back_quote	backslash		# Even if I have them mixed up, they're more sensible this way around
	
	pad_1		end			# Make XT numpad into nav keys by default
	pad_2		down
	pad_3		page_down
	pad_4		left
	pad_6		right
	pad_7		home
	pad_8		up
	pad_9		page_up
	pad_0		ralt			# And take those handy right hand mods
	pad_period	rctrl
	pad_plus		pad_enter		# I always expect a nice big Enter key down there	
endblock

# XT gets very HHKB in its function layer

ifset set1
remapblock
layer 1
	left_brace	up
	semicolon	left
	quote		right
	slash		down
	l		page_up
	period		page_down
	k		home
	comma		end
	a		volume_down
	s		volume_up
	d		mute
	backspace	delete
	1		f1
	2		f2
	3		f3
	4		f4
	5		f5
	6		f6
	7		f7
	8		f8
	9		f9
	0		f10
	minus		f11
	equal		f12
	esc 		system_power
	back_quote 	europe_2
endblock

##################
# So Many Macros!#
##################

ifset any
macroblock

						# Soarer's Shift + Shift = Caps Lock special

# 	Shift + Shift = Caps Lock
	macro lshift rshift
		make caps_lock
		delay 100
		break caps_lock
	endmacro
						# Delay added for ~ Catalina era safeguard against accidental Caps Lock toggling
	macro rshift lshift
		make caps_lock
		delay 100
		break caps_lock
	endmacro

						# Shift + Volume Down (Num Lock) = enter SSK style numpad mode
	macro volume_down shift -gui -alt -ctrl
		press select_1
	endmacro


						# Restore Right Control + Arrow Keys for Mission Control
	macro left ralt -lalt -shift -gui -ctrl
		push_meta clear_meta all
		push_meta set_meta rctrl
		press left
		pop_meta
		pop_all_meta
	endmacro
	
	macro right ralt -lalt -shift -gui -ctrl
		push_meta clear_meta all
		push_meta set_meta rctrl
		press right
		pop_meta
		pop_all_meta
	endmacro
	
	macro up ralt -lalt -shift -gui -ctrl
		push_meta clear_meta all
		push_meta set_meta rctrl
		press up
		pop_meta
		pop_all_meta
	endmacro
	
	macro down ralt -lalt -shift -gui -ctrl
		push_meta clear_meta all
		push_meta set_meta rctrl
		press down
		pop_meta
		pop_all_meta
	endmacro
	
	
						# Transform ralt into HHKB function key, with each of the standard navs
						# How useful? We'll see. Kishsaver style.

	macro semicolon ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press left
		pop_all_meta
	endmacro

	macro quote ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press right
		pop_all_meta
	endmacro

	macro left_brace ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press up
		pop_all_meta
	endmacro

	macro slash ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press down
		pop_all_meta
	endmacro
	
	macro l ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press page_up
		pop_all_meta
	endmacro

	macro period ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press page_down
		pop_all_meta
	endmacro

	macro k ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press home
		pop_all_meta
	endmacro

	macro comma ralt -lalt -gui -ctrl
		push_meta clear_meta all
		press end
		pop_all_meta
	endmacro
endblock

ifset set1						# Limiting this to XT for now, gets in way of word completion on regular boards, may ditch
macroblock
						# Escape > ` macros, these aren't useful on fullsize boards but harmless enough for the box…
						# The XT in particular benefits from them, given its Escape key placement, but so too other wee guys?
						# Left Command + Esc = Command + ` for app window cycling, 60% style
	macro esc lgui -ctrl -alt
		press back_quote
	endmacro

						# Left Alt + Esc = Alt + ` for grave accent mode, 60% style
	macro esc lalt -ctrl -gui
		press back_quote
	endmacro
endblock




#########
# Stràc #
#########

# Control + vowel >> Gaelic stràc accents
# One macro per accent as I don't know any better!
# These work with Shift, too
# Could be annoying to lose Ctrl + A etc. so select away!
#
# Hide stràc mode away behind a protective toggle
# Press Control + Pause/Break (Volume Up)
# Best unmasked solution I've found so far
# Tried Alt + Alt macros to toggle into strac mode, and indeed Alt + Alt + ``
# But they all mess up in various ways, and this toggle works straight up
# Evidently, selects work a little different to how I think they should!

ifset any
macroblock
	ifselect any
	macro volume_up lctrl
		press select_2
	endmacro
endblock

# The actual grave/strac macros
# Note they're all tied to Left Control, so if a Right Control is present it can avoid àll thìs
# The XT's bottom left corner key —f9— is just such a second Right Control, by long convention

ifset any
macroblock
	ifselect 2
	macro a lctrl -gui -alt
		push_meta clear_meta ctrl
		push_meta clear_meta shift
		push_meta set_meta lalt
		press back_quote
		pop_meta
		pop_meta
		press a
		pop_all_meta
	endmacro

	ifselect 2
	macro e lctrl -gui -alt
		push_meta clear_meta ctrl
		push_meta clear_meta shift
		push_meta set_meta lalt
		press back_quote
		pop_meta
		pop_meta
		press e
		pop_all_meta
	endmacro

	ifselect 2
	macro i lctrl -gui -alt
		push_meta clear_meta ctrl
		push_meta clear_meta shift
		push_meta set_meta lalt
		press back_quote
		pop_meta
		pop_meta
		press i
		pop_all_meta
	endmacro

	ifselect 2
	macro o lctrl -gui -alt
		push_meta clear_meta ctrl
		push_meta clear_meta shift
		push_meta set_meta lalt
		press back_quote
		pop_meta
		pop_meta
		press o
		pop_all_meta
	endmacro

	ifselect 2
	macro u lctrl -gui -alt
		push_meta clear_meta ctrl
		push_meta clear_meta shift
		push_meta set_meta lalt
		press back_quote
		pop_meta
		pop_meta
		press u
		pop_all_meta
	endmacro

endblock






################
# Numpad Modes #
################
					# Integrated SSK style numpad mode
					# Enter this mode with Shift + Scroll Lock = SSK Num Lock (Shift + volume_down)
					# Simply press Scroll Lock again to exit < want this to be easy!

ifset set2 set2ext
ifselect 1
remapblock
layer 0
	volume_down	select_0		# Press scroll/num lock to exit numpad mode
	m		pad_0
	period		pad_period
	slash		pad_slash
	j		pad_1
	k		pad_2
	l		pad_3
	semicolon	pad_asterix
	u		pad_4
	i		pad_5
	o		pad_6
	7		pad_7
	8		pad_8
	9		pad_9
	minus		pad_minus
	equal		pad_plus
	enter		pad_enter
endblock


					# Restore IBM PC/XT only numpad				#
					# Toggle into and out of this mode with XT Num Lock
					# Yes, this is how you undo an override in Soarer…
ifset set1
ifselect 3
remapblock
layer 0
	pad_1		pad_1
	pad_2		pad_2
	pad_3		pad_3
	pad_4		pad_4
	pad_6		pad_6
	pad_7		pad_7
	pad_8		pad_8
	pad_9		pad_9
	pad_0		pad_0
	pad_period	pad_period
	pad_plus		pad_plus
	pad_asterix	pad_asterix
endblock


					# General fullsize Numpad PC style navigation block
					# Toggle in and out this mode with *numpad* Num Lock
					# Similar but different to XT numpad
					# These mess up the SSK for some reason I don't get, so screening out with keyboard id AB84

ifset set2 set2ext
ifkeyboard AB83
ifselect 4
remapblock
layer 0
	pad_1		end
	pad_2		down
	pad_3		page_down
	pad_4		left
	pad_5		pad_5
	pad_6		right
	pad_7		home
	pad_8		up
	pad_9		page_up
	pad_0		rctrl		# A little fruity but what good is Insert for?
endblock
No limits encountered here. Could probably make it even longer if I had more ideas. None of the individual macros in this config are as long as 141 lines however.

apastuszak

06 Oct 2022, 22:11

I don't have any macros that long.

I have 6 macros for a total length of 141 lines for all macros combined.

I ran through the documentation also and could not find a limit. But if I try to add another macro, it fails with that error. Kind of frustrating, because I need to add more macros.

User avatar
Muirium
µ

06 Oct 2022, 23:21

See if my big config builds fine for you. Maybe there’s something weird going on.

apastuszak

07 Oct 2022, 02:00

I figured it out!

I had everything in one big macroblock.

I broke up my macros into multiple macroblock sections and it compiled and loaded just fine.

I guess there is a limit to how many lines one block can be.

flipkey

07 Jul 2023, 07:25

Is there any way to determine which MCU is inside a ready-made Soarer's Converter, without tearing it apart? I want to buy one online, but I suspect the affordable ones will have firmware older than what I need, and updating it requires knowing which microcontroller's ID and firmware to use.

If not, is there a nondestructive trial-and-error approach?

gipetto

07 Jul 2023, 12:01

flipkey wrote:
07 Jul 2023, 07:25
Is there any way to determine which MCU is inside a ready-made Soarer's Converter, without tearing it apart? I want to buy one online, but I suspect the affordable ones will have firmware older than what I need, and updating it requires knowing which microcontroller's ID and firmware to use.

If not, is there a nondestructive trial-and-error approach?
try lsusb, if the device descriptor hasn't been changed it might appear as a dev board. those always have a specific mcu.

Post Reply

Return to “Workshop”