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

User avatar
AJM

25 Oct 2018, 10:57

Hi,

I'm using 2 Model F XT keyboards.
One with an "XT to USB Soarer's Converter" from "orihalcon" and on with the converter from "tinkerboy.xyz".
Both work the same - including programming, apart from one problem with the "tinkerboy.xyz" version:

Every time I boot the PC up the keyboard is dead. When I unplug the USB plug and plug it then in again one or two times (while the PC is running), the keyboard/converter starts working again - reliably.

Is this a known problem?

(And a second question, since both mentioned sellers seem to be out of stock at the moment: Is there another source for such (completely assembled) converters, maybe closer to Europe?)
Edit: And now I saw the post by orihalcon concerning his restocking. :D

User avatar
Muirium
µ

25 Oct 2018, 12:44

As you can tell for yourself, with your orihalcon built soarer’s converter, they’re inherently highly reliable. Don’t know what’s up with your Tinkerboy. I’ve never used one.

JBert

25 Oct 2018, 13:25

Have you tried running the scinfo tool included in Soarer's Converter tools folder? Just to see if it might detect a different firmware version or different microcontroller.

User avatar
AJM

25 Oct 2018, 19:52

The outputs of scinfo are identical for both (apart from the SRAM and EEPROM sizes):

scinfo v1.10
scinfo: looking for Soarer's Converter: found
scinfo: sending info request: ok
device: ok

Protocol Version: v1.00
Code Version: v1.12
Max Settings Version: v1.01
Current Settings Version: v1.01
SRAM Size: 2560 bytes
SRAM Free: 1759 bytes
EEPROM Size: 1024 bytes
EEPROM Free: 845 bytes

User avatar
snufflecat

02 Nov 2018, 15:38

Hi there,

Just thought I'd ask a few basic questions here in hopes that us newcomers can learn a thing or two.

I'm trying to program my Teensy 2.0 in order to convert an IBM 6517 typewriter keyboard. According to what I could find online, it shouldn't be much different from converting a Wheelwriter 2/5 board, but there's parts of this tutorial that I simply don't get. (https://github.com/BASLQC/ibm-wheelwrit ... oller/wiki)

So I've manged to do the following:
1. Wire up the outputs from the membrane to a breadboard and Teensy
2. Set up the Teensy loader
3. Install Soarer's converter on the microcontroller
4. Downloaded the necessary repository from Github that includes the different .sc-files

But then the tutorial says:
Finally, send a config over to the teensy. For example, we will use ww2-teensy2plus.sc .
But how do I send the config over to the Teensy? Does this mean I have to use CMD or an IDE to compile a HEX file that then loads onto the Teensy? And in that case, what IDE should I use? I'm on Windows 10 if that matters.

Keeping my fingers crossed that someone might be able to help me on my way here :)
Last edited by snufflecat on 02 Nov 2018, 21:29, edited 1 time in total.

User avatar
snacksthecat
✶✶✶✶

02 Nov 2018, 16:41

Hey snufflecat,
The basic workflow for the config goes like this:
  • Write your config using a text editor (e.g. my file would be called "snacksthecat.sc")
  • Use Soarer's command line tool scas to assemble the config (e.g. "scas.exe snacksthecat.sc snacksthecat.bin)
  • Use Soarer's command line tool scwr to write the config to the converter (e.g. "scwr.exe snacksthecat.bin)
Hope this helps!

User avatar
Hypersphere

02 Nov 2018, 17:01

In Windows, the procedure is even simpler, making use of the "scaswr.bat" file.

After unzipping the zip archive with Soarer's tools, keep all the files in the unzipped folder. Then, simply drag and drop your "sc" file onto "scaswr.bat". The configuration should then be uploaded to the converter.

User avatar
snufflecat

02 Nov 2018, 21:34

Thanks so much guys, I'll be trying to see if I can get it to work tomorrow. :) It takes me forever to figure out those things on my own, so your inputs are very, very valuable.

I did try to drag and drop a .sc-file onto the .bat-file, but CMD just told me that "there is no such command" or something like that. Should I have perhaps included all the files in the same folder as the .bat, or does the file know where to look as long as all the files and folders are contained in the same order as I downloaded them in?

(Also, I didn't know the final outcome would be a bin-file, I thought it was a hex-file since that's what the Teensy loader-software asks for..)

User avatar
snacksthecat
✶✶✶✶

02 Nov 2018, 23:50

snufflecat wrote: (Also, I didn't know the final outcome would be a bin-file, I thought it was a hex-file since that's what the Teensy loader-software asks for..)
Soarer's converter is the ice cream, the config is the toppings.

See this very scientific diagram which I have put together to explain the differences:

Image

JBert

03 Nov 2018, 00:15

snufflecat wrote: (Also, I didn't know the final outcome would be a bin-file, I thought it was a hex-file since that's what the Teensy loader-software asks for..)
If you use other firmware then it's possible that those tools generate a customized hex file.

With Soarer's firmware you only use TeensyLoader once to upload Soarer's hex file, but every time you want to change the configuration you only use Soarer's tools. It has a custom way of writing things to the Teensy, which has the advantage that you don't need to press the little Reset button on the Teensy for every config change.

If I remember Soarer's rants it should also be better for the Teensy as it only touches the flash memory it needs rather than erasing everything and then writing the hex file.

User avatar
snufflecat

03 Nov 2018, 10:23

Alright, so I've managed to flash and load the correct firmware, and most of the keys are working great. (Yay!)
However, some buttons register in hid_listen, but nothing shows up when typing. Some keys don't even seem to register anything in hid_listen. I suppose this means I have to edit the sc-file to fit the layout.

The question then is: How do I figure out which keys to assign in the matrix? In hid_listen, hitting some keys simply generate a number or a combination of numbers or characters, or similar: /63, \63, 0E, \67 +50 d50, etc.
I've got the config file I used open and I'm looking at the matrix, but it doesn't make much sense (yet).

User avatar
Hypersphere

03 Nov 2018, 16:15

@snufflecat: Have you read the documentation? Do you have the "codes.html" file? Open the codes file, and you will see a table listing the Name of the keys, HID codes, and description of the key. There is also a folder with sample sc files that can serve as a starting point for your configuration.

User avatar
snufflecat

05 Nov 2018, 13:20

Hypersphere wrote: @snufflecat: Have you read the documentation? Do you have the "codes.html" file? Open the codes file, and you will see a table listing the Name of the keys, HID codes, and description of the key. There is also a folder with sample sc files that can serve as a starting point for your configuration.
I've read it to some extent, yes. Here's a screenshot from HID listen:
hid_listen.jpg
hid_listen.jpg (126.47 KiB) Viewed 1640 times
Is it the first numeric values that are the HID codes? After reading the documentation I think I'm looking for codes like "0x09" and so on, so it's confusing when I don't see codes similar to those. :?

User avatar
Laser
emacs -nw

05 Nov 2018, 13:39

I think

Code: Select all

\, /, +, - and d,u
all represent the state of the key (up or down). So you have basically two values to figure out (scan code and key code?).

E.g with:

Code: Select all

/37 -0E u0E
You have "up" for key 0E (37). Maybe stuff like this: https://techdocs.altium.com/display/FPG ... Scan+Codes

User avatar
snufflecat

05 Nov 2018, 14:02

Laser wrote: I think

Code: Select all

\, /, +, - and d,u
all represent the state of the key (up or down). So you have basically two values to figure out (scan code and key code?).

E.g with:

Code: Select all

/37 -0E u0E
You have "up" for key 0E (37). Maybe stuff like this: https://techdocs.altium.com/display/FPG ... Scan+Codes
Hmmm, interesting. So this means clicking all the buttons and cross-checking them up against Soarer's table and one like the one you linked to, and then make my own or edit an existing sc-file?

User avatar
Laser
emacs -nw

05 Nov 2018, 16:23

Probably, I haven't used Soarer's stuff since I converted my Model F ("Bigfoot") (using Soarer's controller, not the converter), so - just dig in and try it already :)

User avatar
snufflecat

06 Nov 2018, 09:59

Alright, let's see if this makes some sense.
The first thing I did was try to make a "model" of my keyboard as is, in a spreadsheet. (1. set)
Then I tried to map what HID_listen registered when I hit all of the keys, and added in the different codes. (2nd set)
After that I added another one where I added what actually registers when I hit the keys. This is of course effected by what config file is used. (3rd set)
Finally, I cross-checked the 2nd set with Soarer's list of HID-codes. (Fourth set)
spreadsheet_1.PNG
spreadsheet_1.PNG (52.77 KiB) Viewed 1541 times
Then I proceeded to copy the matrix (?) from the config file, and see which keys "match up" in some way.
spreadsheet_2.PNG
spreadsheet_2.PNG (39.05 KiB) Viewed 1541 times
Some keys output the same character twice, those cells are the darker ones.

For now I'm not sure if any of this makes any sense, but if anyone have some inputs here I'd be thrilled. :)

User avatar
snacksthecat
✶✶✶✶

06 Nov 2018, 19:42

Hey snuffle,
it looks like you're using Soarer's controller firmware for this project; is that correct? I think some of us (namely me) were under the impression you were using his converter firmware. What was the name of the hex file that you loaded onto the teensy? What method did you use to determine where keys fell within the matrix in your spreadsheet?

Also do you have a photo of the keyboard internals?

User avatar
snufflecat

10 Nov 2018, 19:25

Hey Snacks,

Looks like I'm confusing both myself and you guys. I've mainly used stuff from the converter, but I came across this post on github, and I see now that I've mixed things up since this was based on the controller software.

Sorry about that.

The method I used for mapping the keys was basically this way:
1. Make a spreadsheet that resembles the keyboard's layout
2. Connect keyboard to the computer
3. Open up HID_listen
4. Hit each consecutive key and read what showed up in hid_listen
5. Add the value from each key hit in hid_listen to its matching place in the spreadsheet

The config file I used was one I found in the github-post I just mentioned, and from what I understood it was meant for the IBM Wheelwriter 2 keyboard, which is similar but a bit different than the one I have.

To get a picture of the internals I have to bolt-mod the board as it's fastened to the backplate with plastic rivets.
If it's essential that I have this then I'll have it done in a few days.

User avatar
Muirium
µ

10 Nov 2018, 20:37

Soarer was smart enough to build his controller software on top of his converter. As I remember, you can indeed run the controller hex as a converter, as it’s a superset, and slightly improved in some ways. He was intending to rewrite the converter with the improvements he was developing along with the controller, but never got around to it before he fell silent.

That said, I still use the converter hex images when I’m doing those, as he suggested. The controller is a beta, since abandoned. I’ve run keyboards on it for years with no problems, though.

jafd

21 Dec 2018, 00:55

I'm kind of late to this party, but I hope someone has an answer: how does one remap keys to be those brightness up/down keys you find on Macbooks? I googled in vain, and those for sure are not F14 and F15, but a thing of their own.

I don't see them on the list of recognized key names, can anyone help?

User avatar
Muirium
µ

21 Dec 2018, 01:00

You don’t. They’re not in the USB human interface device keyboard spec, they’re Apple proprietary, like the Fn key.

What I do is set brightness to f1 and f2 in System Preferences and just use those. They’re renappable in the Keyboard preference pane.

jafd

21 Dec 2018, 01:21

Well, a Linux machine recognizes them when pressed on a Matias keyboard (the Mac variant) just fine.

The scancodes sent are (showkey -s):
  • Brightness up: 0xe0 0x4c on press, 0xe0 0xcc on release
  • Brightness down: 0xe0 0x54 on press, 0xe0 0xd4 on release

User avatar
tentator

21 Dec 2018, 02:10

Did you check in .../Soarer_Converter_v1.0/docs/codes.html ?
Could it be you can change brightness up by pressing LCTRL-DEL and down with LCTRL-/ (on keypad) ?

jafd

21 Dec 2018, 02:14

Nope, tried that too. Also tried mapping to F20/F21 which emit 0x6F and 0x70 (found here: https://github.com/tmk/tmk_keyboard/iss ... -279113313), but they mute/unmute mic and turn the touchpad off, respectively.

mxgian99

01 Jan 2019, 00:28

hi all, just sanity checking something, i've been using the soarers version in the first post, but doing some research i found a version 1.20 beta that he posted. what is the recommended version to use? would this one be safe to use? I'm most interested in the debounce code he added in this version as the board im working on is spamming some keys.

User avatar
Muirium
µ

01 Jan 2019, 00:30

Try the beta. Swapping between the two is quite easy, though be sure to have a copy of your configuration files as those may well get wiped when reflashing.

mxgian99

01 Jan 2019, 17:34

just updating in case someone finds this during the search, the updated beta i found is actually for soarers 'controller' and not the 'converter' being talked about here. the debounce code is in the controller, but i dont have a matrix file for my model f xt to use it, so im back to debugging my model f with the converter code. but thanks for the reply, its amazing that people continue to support soarers converter

User avatar
Muirium
µ

01 Jan 2019, 17:42

The controller is actually a superset of the converter. So they are kind of the same thing that way. Soarer was working to combine them, but didn’t finish when he vanished.

The sheer use of Soarer’s work that I’ve benefited from personally is reason enough to help. It’s an amazing gift to the vintage keyboard world, and custom builders too.

As for debounce: that’s the controller’s job. Got to remember that when you’re hooking up his converter to a keyboard, the original controller still calls the shots on internal stuff like debounce. You may well need to replace it, or clean / replace the switches.

User avatar
matt3o
-[°_°]-

20 Jan 2019, 19:07

is this still a closed source project? do I really need to code one from scratch?

Post Reply

Return to “Workshop”