geekhack Community > Keyboards

Avant keyboard programming software!

(1/2) > >>

omnigeek:
I've been working on a project, mostly for fun and learning and for my own use.  The project was to get some software running on modern Windows versions, that can program Avant Stellar and Prime keyboards.

After quite a bit more work than I thought it would take, I have it running!  And it actually works quite well on the couple of Stellars and couple of systems I've used it on.  It uses a keyboard filter driver that sits above the i8042 PS/2 port driver in Windows, and allows the Avant's programming protocol to work.

My first question is: would this software be of use to anyone else?  If so, I could upload the source, e.g. to Github, along with the information I've put together on the Avant keyboards and its programming protocol and the old software versions that came with it.

Next question: Since systems that have a PS/2 port are mostly long gone by now, ideally I'd like to be able to program the Avants through a USB-to-PS/2 converter like Soarer's or TMK.

My understanding is that Soarer's source code isn't public... I saw TMK's source code online, so would that be the best choice?  What I would need is a way to disable the scan code translation in the converter, so the Avant programming protocol could be used, and then re-enable the scan code translation when done.  That would probably require some firmware changes to the TMK converter; and it might require a Windows USB driver to set up the TMK to send/receive programming info to/from the keyboard.

Has anyone set up a USB-to-PS/2 converter to be able to write and read raw bytes on a programmable keyboard like this?

This leads to a larger question: is anyone even dealing with programmable keyboards anymore, since you can edit the scan code maps in Windows and there are things like AutoHotkey that can remap keys for you?  I feel like remapping keys in the keyboard itself is better since it doesn't depend on having software in each system and OS you use it on.  Or is that not so much of a concern anymore?

I can go into a lot more detail about the Avant hardware and software if anyone's interested, otherwise this post is too long already so I'll stop here :)

Findecanor:
Cool project!

TMK contains probably the most used open source PS/2 to USB converter, and it is actively maintained.


--- Quote from: omnigeek on Wed, 04 October 2023, 02:14:03 ---This leads to a larger question: is anyone even dealing with programmable keyboards anymore, since you can edit the scan code maps in Windows and there are things like AutoHotkey that can remap keys for you?
--- End quote ---
I think most people who program/remap their keyboards prefer the programming to be stored in the keyboard  and be persistent between boots, even if a desktop app is the preferred way to program it.

Having the programming/mapping require software in the background could be a nuisance if you e.g. dual-boot Windows and Linux, use virtual machines or use multiple computers with a KVM.
I've even read accounts on this forum about people physically moving keyboards between computers and wanting the programming to be persistent.

meyertime:

--- Quote from: omnigeek on Wed, 04 October 2023, 02:14:03 ---My first question is: would this software be of use to anyone else?  If so, I could upload the source, e.g. to Github, along with the information I've put together on the Avant keyboards and its programming protocol and the old software versions that came with it.

--- End quote ---

I would be interested!  Please upload.

I'm in the process of fixing and modding an Avant Stellar keyboard. I happen to have a retro PC with a real PS/2 port running Windows 95, so if all else fails, I can use that with the official software. But I'm pretty sure I'll need to craft a special .kbd file to get it to send the key codes that I want for the top function keys, so any details about that format would be helpful. The file is the same size as the memory chip in the keyboard, so I'm guessing it's a dump of what's stored on the keyboard and thus the programming protocol would be related.

In the longer term, I would also like to be able to program it on modern hardware. I use Linux as my daily driver, so I would be looking at implementing it for Linux.

omnigeek:
Cool, I'm glad someone else is interested in this!  Here is the repo with source code and docs I put together:

https://github.com/p-codes25/avant-programmer

Now that I look at it again, the formatting isn't quite right in the KBD file layout page -- it should use 8-space tabs but it's showing as 4 now... there might be other glitches like that, because I'm pretty new to GitHub.  Also, I uploaded all this 4 months ago but the page still doesn't show up in a Google search, so maybe I need to make a Gist page or something else to make it searchable?

As you'll see in those docs pages, the layout on the memory chip, the *.kbd file format and the on-the-wire protocol are all similar and related but not quite the same.  So a lot of the code in my utility deals with converting between those formats.  To edit the *.kbd files, I used CVT's 'new' Win2K/XP GUI (Avant.exe, which works fine through Win7, except for the programming upload/download part, of course).

What kind of special key codes do you want to generate with the top F keys?  I'm not sure exactly what the keyboard might be capable of, beyond what's supported in the old CVT GUI software.  Unfortunately the 82C51 chip seems to be locked, at least on my Avants, so I wasn't able to read the firmware to see what goodies might be lurking in there...

But as far as the existing key remapping and macro protocols, they seem to only be capable of sending keystrokes that any of the stock keyboard keys can generate -- each remap or macro keystroke entry gives a 'key slot' as I call it, which indicates a press of a key position on the stock keyboard layout.  I don't know if it can generate arbitrary scan codes that didn't exist in the stock layout though, if that's what you need.

I haven't worked with drivers on Linux, but I could maybe help in terms of understanding the i8042 hardware and how to work with it for programming these keyboards using their existing protocol.  Otherwise, or if you wanted to program one through a USB port, it might take coming up with new firmware and a new controller chip in the keyboard itself.  That would be a fun project, but I haven't looked into it.

Let me know if you have more questions and I'll see what I can do...

meyertime:
Thanks for all the info!

That's a bummer that it will only swap key slots. I knew that's all that the software can do, but I was hoping to be able to use arbitrary scan codes through the programming protocol. I wanted to have media keys like Pause, Mute, etc. These keys are not on the Avant keyboards.

A possible workaround would be to map the SF-keys to Ctrl+Alt+Shift+F-keys, since I don't know of any real scenario where those key combinations are used. Then, I can map them in the Linux desktop environment.

As far as being able to program the keyboard itself, sounds like we would have to change the firmware. I know that it's read locked. I am trying to locate a copy of it by reaching out to former CVT employees. Primarily for the possibility of repair, though source code would be a nice bonus. Without that, I am also looking into having the chip disassembled to read the firmware. We could decompile it as a starting point. If none of that is possible, then we'd have to rewrite the firmware from scratch...

Navigation

[0] Message Index

[#] Next page

Go to full version