Ok guys, I figured it's about time to share this here. A couple of months ago, I got myself an FM-77AV40SX from eBay. it was sold in good working order, but without a keyboard. Naturally this situation needed to be rectified as soon as possible. I searched around for an FM-77AV series keyboard for sale, but with no luck. I just found many other people who were also looking for a keyboard or a solution. What I did find was a Japanese site where someone had hooked up an FM-77AV series keyboard to a logic analyzer and dumped the raw bitstream for each keypress.
I figured that with this information, I could find a way to make a PS/2 keyboard work. Unfortunately, I have almost no experience with uController coding. I put out requests on several forums for someone with experience to help me create an adapter to use PS/2 keyboards with my FM-77AV40SX. An awesome guy named gubbish contacted me from the Vintage Computer Forums, and we got started immediately. He had previously built an adapter to convert ADB to PS/2 and he decided to modify it for my needs based on the bitstream, data rate, and pinout that I provided him with.
Now, I had mentioned before that I posted on several forums about this. Well, on the geekhack forum, another really awesome guy named hasu who lives in Tokyo decided to help out as well. He bought an issue of Oh!FM magazine from Yahoo! Japan that included an in depth study of the keyboard protocol of the FM-77AV series machines. This provided absolutely invaluable information to the project regarding the make and break codes for each key, as well as clearing up some ambiguities with the data we were currently working with. Without him, this project would have stalled before it even started. Since then hasu and I have become friends, and I just have to say, he's really awesome!
Anyway, armed with this new information, gubbish put together an awesome adapter prototype that can be reprogrammed via RS-232. He sent me the adapter and it worked! Currently it works with keys a-z, 0-9, enter, and some symbol keys. The next firmware version will include the whole keymap. Once the final firmware is complete and tested, gubbish and I will probably make some boards and put them up for sale, but we'll cross that bridge when we get to it.
Moving on, another thing that I really wanted to fix was the lack of cassette interface on the AV40SX. A large portion of FM-7x software is cassette based, and there is no way to load it virtually, you need the cassette interface. Thanks to another awesome guy named Laver who runs the Oh!FM-7 website, I was able to get the schematics for the original FM-77AV. I located the part with the cassette interface, and to my horror the whole cassette functionality was handled through a 14-pin chip called MB43413, an ASIC! When I saw that, I thought I was really screwed. Fortunately, I was mistaken. I got in contact with several Chinese IC dealers that I have dealt with in the past, and I got lucky. One of them had 11 MB43413s in stock. I ordered 5 of them with a smile on my face.
I disassembled my FM-77AV40SX hoping that the chip the ASIC was supposed to connect (the printer controller) to was still present under the same model number and hadn't been integrated into another IC. I looked and looked but the print controller, as least under the part number I had, was nowhere to be found. I figured that was that and I was probably out of luck, but then I noticed something in the rear right corner of the motherboard. I saw an empty solder pad for a 6-pin MiniDIN connector, the same connector used for the cassette interface, and right below that, empty solder pads in a 14-pin DIP configuration, labeled MB43413! I got out my multimeter and traced out which solder pads went with which resistors and capacitors on the schematic, and after about 20 minutes I was ready to go!
I ordered all the relevant caps and resistors, as well as the relay, MiniDIN connector, some IC sockets, and the stuff required to make a cassette cable from DigiKey. The parts arrived, and then I found out that the relay I ordered was too small. I checked my local electronics stores, and one had 1 of the correct relay in stock. I picked it up, and soon after the MB43413s from China arrived, and I went to work.
All of the empty solder pads were filled with solder, so I spent a good deal of time cleaning them up with solder braid. It was a difficult process. The solder just did not want to come out. After about 5 hours with the solder braid the pads were all clean and ready to take the components. I popped them all in, reassembled the machine, and fired it up. At the basic prompt I typed "load" (using the PS/2 keyboard adapter), held my breath, and pushed enter...
SUCCESS! The relay clicked on and the machine started searching! I didn't have it connected to a cassette recorder or sound card so I haven't tested loading and saving yet, but the fact that the relay kicked on tells me that it did indeed work, since the relay is controlled via the ASIC as well.
So there's the story! These two things have been sought after in Japan for years, but no one has ever done them before. I plan on hooking up the MB43413 to a logic analyzer and loading and saving some data on the AV40SX to see if it's not possible to reverse engineer it. The first step would be to see if it's possible to recreate the MB43413 in a uController, PAL, (C)PLD, or FPGA for all those people out there in Japan and elsewhere who want to add cassette support to their AV40SX but don't have access to an MB43413.
The next step after that though is to possibly find a way to create a drop-in replacement for the MB43413 that eliminates the audio interface all together and instead lets you load and save files from SD card or some such medium. From looking at the schematic, this seems like it would be very possible, since it seems like the MB43413 sends or receives digital data on one side, and sends or receives audio on the other. It shouldn't be too hard once you know exactly how the MB43413 does that, it should be very simple to take an FM-7x series cassette file from the SD card, convert it into the digital bitstream that the MB43413 would normally send to the computer, and then send it as if the MB43413 is reading a cassette and passing the data along. It should also be possible to simulate saving to cassette, to take the bitstream that the computer sends to the MB43413, convert it into an FM-7x cassette file, and save it to the SD card.
I am going to pick up a logic analyzer pretty soon and see if I can't solve this! I hope this was an interesting read for everyone! In the meantime, here is the directions for rebuilding the cassette interface:
Capacitors: 3300pF, 0.015µF, 0.022µF, 0.068µF, 0.1µF Ceramic capacitors
Resistor: 560Ω - I am not sure of the wattage required, I used 1 watt to be safe
Relay: HRS1H-5V This is the only part I have found that is the right size. All the other relays I've checked out that have the proper pinout are too small
MiniDIN connector: 5 pin female through-hole right-angle MiniDIN socket, I used a MD-50S but there are many others with the same pinout that you can use, just make sure you get an unshielded connector because there is no solder points for the shield
ASIC: Fujitsu MB43413 DIP14
OPTIONAL: 2 14-pin machine pin DIP socket .3" row spacing
First of all, disassemble the FM-77AV40SX completely and remove the motherboard. The motherboard is held in place with several plastic stand-offs, as well as screws. Squeeze the plastic standoffs with needle-nose pliers and then pull the motherboard up to remove it from the case. Locate the the rear right corner of the motherboard. You should see 5 empty solder pads for the MiniDIN, 14 empty solder pads labeled MB43413, 6 empty solder pads labeled RL1 for the relay, and several empty solder pads for capacitors and a resistor. The empty solder pads will all be filled with solder, so you will have to clean them up with solder braid or a solder vacuum pump. Once they are clean, install the capacitors and resistor in the following places:
SX Value (F)
Once that is done, install one of the 14-pin DIP socket in the place labeled MB43413. Take the other 14-pin socket and remove or cut off the following pins: 3,4,5,7,8,10,11,12. Install the 14-pin socket in the position labeled RL1. Install the MiniDIN socket in it's place at the very back of the motherboard. Install the relay in it's socket. It will only fit properly one way, so don't worry about orientation. Finally, install the MB43413 into it's socket. Pin one of the MB43413 should be facing in towards the center of the motherboard if it is oriented properly. That is it! If you need to make a cable to connect a data recorder, the pinout for the 5-pin MiniDIN is: