Need help adapting a PS/2 keyboard to an FM-77AV
-
- DT Pro Member: -
Hello everyone, this is my first post on this forum. I have posted on a few other forums about this problem, and I've been told you guys are the ones who will be able to help me if anyone can. I have a computer museum here in Vancouver, BC, Canada, and I have just acquired an FM-77 AV 40 SX. The only problem is it came without a keyboard. I have all the information required to create an adapter to let me use PS/2 keyboards with the FM, but I just don't have the practical hardware development experience to turn the information into an actual device. Can someone give me a little help? I have all the codes that the keyboard sends to the computer for every single key, as well as the data rate, the repeat timing, and how the keyboard responds to multiple key presses, as well as the pinouts. I know this problem can be solved with a uController or a (C)PLD, or better yet an Arduino, but I just don't have the experience with VHDL or Microcontrollers nor the knowledge of the PS/2 protocol to actually put it together. Can someone possibly help me? I will post all the pertinent information below:
Info on data rate etc: https://docs.google.com/document/d/1ES0 ... DGm4A/edit
Keyboard Serial Codes: https://docs.google.com/spreadsheet/ccc ... WlTUHFnVnc
Pinout: https://docs.google.com/open?id=0B1hvp8 ... Y0MmQ3NDM2
Please, if anyone out there can help me, it would be very much appreciated. I can't put the FM 77 AV in my museum without a keyboard.
Info on data rate etc: https://docs.google.com/document/d/1ES0 ... DGm4A/edit
Keyboard Serial Codes: https://docs.google.com/spreadsheet/ccc ... WlTUHFnVnc
Pinout: https://docs.google.com/open?id=0B1hvp8 ... Y0MmQ3NDM2
Please, if anyone out there can help me, it would be very much appreciated. I can't put the FM 77 AV in my museum without a keyboard.
-
- Main keyboard: Realforce
- Favorite switch: Topre
- DT Pro Member: -
Have you searched for aikon and teensy here? I know sixty wrote some great guides.
-
- DT Pro Member: -
Thanks for replying hanshotfirst. I would be willing to pay for someone to help me with this. I know that some people do custom work, so I would be willing to pay to get this done. I really want to be able to use this machine properly, and I really want for it to be displayed in my museum properly. I don't have the experience required to do it myself, but I would definitely be willing to pay for the help.
- Ascaii
- The Beard
- Location: Berlin, Germany
- Main keyboard: CM Novatouch, g80-1851
- Main mouse: Corsair M65
- Favorite switch: Ergo clears, Topre
- DT Pro Member: 0019
The only person that comes to mind immediately that should be capable of doing this would be Geekhack/DT user Haata...hes been doing a lot of conversions for his collection of old(old) boards with teensy controllers. Try pming him!
- sixty
- Gasbag Guru
- Main keyboard: DKSaver
- Favorite switch: Cherry MX Black
- DT Pro Member: 0060
This guy is doing the opposite guys. He is trying to convert a regular PS/2 keyboard to the ancient protocol used on the FM-77AV. This will be quite a bit more tricky. I suggest you to PM Soarer, hasu or lowpoly. Both are probably very busy, but they should have the knowledge required to help you out.
- HaaTa
- Master Kiibohd Hunter
- Location: San Jose, California, USA
- Main keyboard: Depends the day
- Main mouse: CST L-TracX
- Favorite switch: Fujitsu Leaf Spring/Topre/BS/Super Alps
- DT Pro Member: 0006
- Contact:
Yeah, it's somewhat opposite. However, I probably could coax my controller code into doing the opposite. Though that would be USB to your protocol.
As for a PS/2 keyboard, it would take a bit more work on my part (as I don't have a working PS/2 module yet), but is doable.
I could also do this using a CPLD or FPGA, but it would probably be overkill (and more expensive).
(Oh how I wish this was an FM Towns, and you had the protocol, been trying to get a converter working for a while now...).
Now, I don't have that much spare time. But if you're not in a hurry, I can work on it. PM me, and we can work out the details.
As for a PS/2 keyboard, it would take a bit more work on my part (as I don't have a working PS/2 module yet), but is doable.
I could also do this using a CPLD or FPGA, but it would probably be overkill (and more expensive).
(Oh how I wish this was an FM Towns, and you had the protocol, been trying to get a converter working for a while now...).
Now, I don't have that much spare time. But if you're not in a hurry, I can work on it. PM me, and we can work out the details.
- Soarer
- Location: UK
- Favorite switch: F
- DT Pro Member: -
Hasu and I have replied in the thread on GH with our thoughts so far. Just happened to see it there first! I'll continue to partake in both threads, but I am horridly busy 

-
- DT Pro Member: -
Thank you so much everyone who has replied. Thank you very much HaaTa for your offer. I already have someone working on putting a piece of hardware together for me, it is a modification of an ADB to PS/2 adapter. Since the signal is self clocking and we already have the 40 bit codes for every key, it should be possible to put together a functional solution, albeit without the vast amount of NKRO available on the original, but that is not really a big problem. If we run into any problems that we can't overcome maybe you will be able to help us. I really appreciate that you don't have much spare time right now, and the last thing I want to do is take you away from something else more important. By the way, in regards to the FM Towns, I am buying an Open Logic Sniffer this friday, and I plan to pick up an FM Towns soon, so I will record the FM Towns protocol for you when I have everything in my possession. Should be within a month or two. Hope that will be of help to your FM Towns project.
- HaaTa
- Master Kiibohd Hunter
- Location: San Jose, California, USA
- Main keyboard: Depends the day
- Main mouse: CST L-TracX
- Favorite switch: Fujitsu Leaf Spring/Topre/BS/Super Alps
- DT Pro Member: 0006
- Contact:
Oh that would be wonderful! The FM Towns keyboards have one of my favourite keyswitches (Fujitsu Leaf Spring).
I've gone down the route of dumping the micro controller rom, and looking at the raw assembly. This works, but is extremely slow going...
The USB logic analyzer I use is the Salae Logic.
I've gone down the route of dumping the micro controller rom, and looking at the raw assembly. This works, but is extremely slow going...
The USB logic analyzer I use is the Salae Logic.
- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
A few DIY converter seem to have existed in past years though they offer no source code or details.
I found some (Japanese) page says FM Towns keyboard is compatible with FMR and OASYS, and FMR keyboard use asynchronous serial comm with 9600bps. No detail on parity, stop bit or etc. on the pages but I think it will be clear if you look on the signal with Oscope or LA.
I don't have any of those keyboards and knowledge about them, just read the pages.
I found some (Japanese) page says FM Towns keyboard is compatible with FMR and OASYS, and FMR keyboard use asynchronous serial comm with 9600bps. No detail on parity, stop bit or etc. on the pages but I think it will be clear if you look on the signal with Oscope or LA.
I don't have any of those keyboards and knowledge about them, just read the pages.
- HaaTa
- Master Kiibohd Hunter
- Location: San Jose, California, USA
- Main keyboard: Depends the day
- Main mouse: CST L-TracX
- Favorite switch: Fujitsu Leaf Spring/Topre/BS/Super Alps
- DT Pro Member: 0006
- Contact:
Thanks a lot hasu. The 9600bps and asynchronous info does help.
Unfortunately, I've already attached the keyboard to a scope, and it seems to require some sort of acknowledge signal once there's a keypress in order to send the scancode.
To help with this, I've dumped the rom of the microcontroller, and have spent quite a while already looking through the code to figure out what's going on. Much of the assembly is quite complex, and most likely not hand coded.
Especially because the mouse/peripheral information is encoded as well (I can't seem to find a datasheet for an important chip regarding the mouse...and it's definitely complicated).
Some interesting things I've found so far (It's been a couple months since I've last looked at it):
.
Unfortunately, I've already attached the keyboard to a scope, and it seems to require some sort of acknowledge signal once there's a keypress in order to send the scancode.
To help with this, I've dumped the rom of the microcontroller, and have spent quite a while already looking through the code to figure out what's going on. Much of the assembly is quite complex, and most likely not hand coded.
Especially because the mouse/peripheral information is encoded as well (I can't seem to find a datasheet for an important chip regarding the mouse...and it's definitely complicated).
Some interesting things I've found so far (It's been a couple months since I've last looked at it):
- Has some sort of parity, and I believe this information is in the middle of the packet (not confirmed)
- Mouse data and keyboard data is encoded on the same async transfer line
- Dedicated line for PC to Keyboard communication
- I seem to remember an odd number of bits per packet (perhaps even variable length)

- hasu
- Location: Japan
- Main keyboard: HHKB
- Main mouse: HHKB
- Favorite switch: Topre
- DT Pro Member: -
HaaTa, dump the ROM? Wow, cool!
This site has a converters for FMR/OASYS/TOWNS keyboard which is named 'PS2OASYS'. The site also offers scan codes of FMR/OASYS keyboard, this might help you.
http://m0115.web.fc2.com/
http://m0115.web.fc2.com/main.html#SCANCODE
This site has a converters for FMR/OASYS/TOWNS keyboard which is named 'PS2OASYS'. The site also offers scan codes of FMR/OASYS keyboard, this might help you.
http://m0115.web.fc2.com/
http://m0115.web.fc2.com/main.html#SCANCODE
- HaaTa
- Master Kiibohd Hunter
- Location: San Jose, California, USA
- Main keyboard: Depends the day
- Main mouse: CST L-TracX
- Favorite switch: Fujitsu Leaf Spring/Topre/BS/Super Alps
- DT Pro Member: 0006
- Contact:
Thanks Hasu!
There is almost enough information. If only the source code for the PS2OASYS converter was posted I could figure out the traffic.
I found source code for wiring up the switches directly for some keyboards, but it doesn't really help me...
It looks like the website is quite recent too
Hasu, does the owner of the website have an email address/contact information? My Japanese is not that good, but I think I can get the idea across about wanting to look at the source code.
There is almost enough information. If only the source code for the PS2OASYS converter was posted I could figure out the traffic.
I found source code for wiring up the switches directly for some keyboards, but it doesn't really help me...
It looks like the website is quite recent too

Hasu, does the owner of the website have an email address/contact information? My Japanese is not that good, but I think I can get the idea across about wanting to look at the source code.
-
- DT Pro Member: -
So, an update for everyone. My FM77AV40SX arrived today. I have confirmed the pinout as listed in the information I posted. I have passed this info onto the person who has constructed the hardware. He is going to attach the required cable to the adapter and then send it off to me. I will then confirm that the timing is correct. If it is, and it should be since the bitstream is self-clocking, my friend will modify the software, send it to me, I will load it into the uC and then I should have a fully working adapter! If anything goes wrong, I will send an Open Logic Sniffer to someone I know who has a compatible keyboard and he will record all the data we need. Hopefully though that won't even be required. We'll see.
-
- DT Pro Member: -
Another update. Thanks to Hasu's extreme kindness, generosity, and all around awesomeness, this project has a vital piece of information that we were missing until now. Hasu discovered that there was an article about the FM77AV keyboard encoder in the May 1986 issue of Oh!FM magazine. He actually bought the magazine on Yahoo! Japan just to check if there was any information in that article we didn't already know. It turns out there was. It turns out that the most significant bit of the scancodes (not including start/stop bits) is the make/break indicator. It is 0 (1001) when the key is pressed and 1(0110) when the key is released. Without this information it is possible the adapter would not work at all, or if it did, not anywhere near properly. The thing is that if it wasn't for him, we probably wouldn't have even known what we were missing. My hat is off to hasu for doing an excellent job. He answered all the questions about NKRO, and gave a very essential piece of information by purchasing that magazine. I am so very grateful. Hasu, you are the best!
-
- DT Pro Member: -
Hi everyone! I have a most excellent update for you all! The board arrived yesterday. I just gave it a quick test and... drumroll please... IT WORKS! Right now it is currently only programmed to send the letter "a" for every keypress, as the current firmware was designed just to confirm the timing of the bitstream. I hooked it all up, booted the computer to basic, and pressed a some keys. Immediately "a"s appeared on my screen! It seems the logic levels (inverted logic, idle high, thank you very much Hasu!) and bitstream timing are perfect! I have notified gubbish, and he will get back to me soon with updated code. It seems as though we're on the home stretch now! Hasu, we couldn't have done it without you. You have provided invaluable information. And Gubbish, you have really done excellent work! It's seriously awesome! Many people have given reasons why this project wouldn't work, but you jumped in with both feet and gave it a shot. Thank you so much, you have really helped my computer museum. Thank you so much. Also, just let me say, I have seen and built a few electronic prototypes in my time and your handiwork is by far the cleanest I have ever seen on a prototype, most of them are a rats ext of wires and bad solder joints, but this one is clean and tight. Really well done!
- kbdfr
- The Tiproman
- Location: Berlin, Germany
- Main keyboard: Tipro MID-QM-128A + two Tipro matrix modules
- Main mouse: Contour Rollermouse Pro
- Favorite switch: Cherry black
- DT Pro Member: 0010
TheRogue wrote:Hi everyone! I have a most excellent update for you all! The board arrived yesterday. I just gave it a quick test and... drumroll please... IT WORKS! Right now it is currently only programmed to send the letter "a" for every keypress, as the current firmware was designed just to confirm the timing of the bitstream. I hooked it all up, booted the computer to basic, and pressed a some keys. Immediately "a"s appeared on my screen! It seems the logic levels (inverted logic, idle high, thank you very much Hasu!) and bitstream timing are perfect! I have notified gubbish, and he will get back to me soon with updated code. It seems as though we're on the home stretch now! Hasu, we couldn't have done it without you. You have provided invaluable information. And Gubbish, you have really done excellent work! It's seriously awesome! Many people have given reasons why this project wouldn't work, but you jumped in with both feet and gave it a shot. Thank you so much, you have really helped my computer museum. Thank you so much. Also, just let me say, I have seen and built a few electronic prototypes in my time and your handiwork is by far the cleanest I have ever seen on a prototype, most of them are a rats ext of wires and bad solder joints, but this one is clean and tight. Really well done!
