vorige:
De Maiskoek/Bits and Pieces
MCCW nummer 92, maart/april/mei 2000
Terug naar inhoud
volgende:
[en] Metal Gear save file faking
Dit artikel is helaas alleen beschikbaar in het Engels.
experiences with it
The LP keyboard interface

A real MSX fanatic can be recognized by examining his keyboard. It will be worn down by about fifteen years of daily use. None of the impressed letters are visible anymore. Some keys falter and sometimes a wire gets loose on the connector. But hey, whats the alternative? A brand new keyboard! Hardware wizard Leonardo Padial from Madrid, Spain, has designed an external keyboard interface. With this small card, you can simply connect a cheap pc keyboard to your MSX. This will work with any AT or PS/2 keyboard, even if it has special ‘Windows’ keys. It’s not only a good replacement for your old keyboard but can also be a great solution if you want to build your MSX into a pc tower or desktop case. The problem ‘how to connect an external keyboard to it’, is then solved.

 
Pierre Gielen
 
Directory
Different keys
Connecting the interface
Micro controller
Experiences
Special keys
Ordering


References
1. CHARS.ASM


Building your MSX in a pc case has some advantages: less cables hanging around your computer, it protects vulnerable expansions that are not always built into a cartridge box, a big power supply is provided and there is enough room for a harddisk, cd-rom player, ZIP-drive, etcetera. As you can see on one of the pictures below, a creative person can even build an external MSX cartridge slot into a pc case.

     If, however, you don’t want all this, you’d better consider buying a second hand MSX keyboard first. Of course that will only be possible if you own an MSX with a seperate keyboard, like the Philips NMS 8250/55/80 or the Sony HB500/700. Keyboards and other spare parts can be found at the bigger MSX fairs. Sometimes a complete second hand MSX computer may even be cheaper than one pc keyboard interface. So if you’re looking for a standard MSX, that may be the best choice for you. But if you have a computer that is expanded, like mine, with a 7 MHz clock and an internal megamapper, a replacement will be much harder to find. And if you have an MSX2+ or even an MSX turbo R, you will almost certainly run out of options. In this case, the pc keyboard interface may just be the thing to rescue your computer from a hapless end in the trash can.

This is what the interface looks like.

Different keys
Connecting a pc keyboard to the MSX is not a trivial task. The first problems are the many differences between the keyboards for both systems. The most obvious one is that the pc keyboard has a lot more keys: F6 to F12 for example, Print Screen, PageUp, PageDown, End, Num Lock, Scroll Lock, Alt, maybe Alt-Gr and if it’s a so called ‘Windows’ or ‘Multimedia’ keyboard, even a couple of other special keys. The MSX on the other hand, has Stop, Select, Code and Graph keys that the pc keyboard doesn’t have. In the LP keyboard interface, these MSX specific keys are mapped to the following pc keys:

    

MSX pc
Stop Pause/Break
Select Scroll Lock
Code Left Alt
Graph Right Ctrl

     Other ‘special’ keys on the pc keyboard are left unused in the standard version of the pc keyboard interface. So pressing PageUp, PageDown, Num Lock, Alt-Gr (Right Alt) or F6-F12 does nothing. I think Leonardo Padial missed a chance here to use at least F6-F10. Now it is still necessary to press SHIFT-F1 to SHIFT-F5 if you want F6 to F10.

     Because Num Lock does not work, a thing to remember is also that you cannot use the alternative cursor keys, Home, Del, etc. of the numerical keypad. For most MSX users, this will not be a problem since on the MSX, the numerical keypad couldn’t be used for things other than entering numbers and calculations anyway.

     The Num Lock, Caps Lock and Scroll Lock lights on the pc keyboard will not work either. It’s a pity that you can’t at least see if Caps Lock is enabled. Switching the Caps Lock light on and off could probably be implemented in the LP keyboard interface, but it isn’t yet. This may change in future versions.

     If you’re not scared of soldering yourself, you could use one of the unused wires in the pc keyboard connector — there is at least one — to make a direct connection to the output for the Caps Lock light in your MSX. This also requires a modification in the pc keyboard itself. I have not tried it — yet — so do this at your own risk. After this piece of surgery, the pc keyboard will not be compatible anymore with a pc.

Connecting the interface
The keyboard interface — Leonardo calls it the LP-PCK-V2 — consists of a 10×10 cm small printed circuit board (PCB) that can be inserted into a normal MSX slot. The PCB is not built into a cartridge box, so you should be careful with it.

     If you’re using it with an MSX turbo R, it is also necessary to connect a flat cable from the keyboard matrix connecter inside the MSX turbo R to a small rectangular connector on the interface. This is needed because of differences in the internal keyboard hardware of the MSX turbo R.

     If you want to use the MSX turbo R keyboard socket, one of the eight dip switches on the interface has to be set. I have not tried this, since I do not own an MSX turbo R. The other dip switches are for switching translation tables, so that the interface can translate several pc keyboards to a number of possible MSX keyboards. Until now, the interface was only available for Spanish keyboards. They are somewhat different from the standard US/International keyboards that are used in the Netherlands. Recently, Leonardo has also finished a Dutch version. Multiple language versions may appear in the future.

     The pc keyboard can be connected to one of the two sockets on the board: a big DIN socket for a keyboard with an old AT connector and a small one for keyboards with PS/2 connector.

Micro controller
Translating pc keyboard serial scan codes to MSX keyboard matrix codes is not a simple task. In the interface, it is done by a Z8 micro controller from Zilog. It contains 4 kB of rom, in which an assembler program is burnt. Since the Z8 is mounted in a socket on the circuit board, it can easily be replaced.

     All firmware is in the Z8 and, if needed, in an eprom which can also be placed on the circuit board. There is no need for software drivers. Your MSX will immediately recognize the plugged-in interface. This will also work if the interface is in a slot expander, on any MSX, even it it runs at 7 MHz or in R800 mode.

     On the interface there is also a socket for a 27C256/512 eprom — erasable programmable rom — or a 32 kB CMOS ram. For the eprom, the dip switch near pin 28 must be in the ON/OFF/ON/OFF position (from left to right). For the ram, it must be in the OFF/ON/OFF/ON position. The eprom — or ram — can contain extensions, like an extra character set. If used with the MSX turbo R for example, it can contain an international character set instead of the original Japanese set. On request, Leonardo can program special character sets into an eprom. Hobbyists who have the proper hardware, can burn their own eproms for the keyboard interface. The example program [1] shows how it can be done. It contains a Spanish character set for the Turbo-R.

Experiences
My experiences with the keyboard interface are mainly positive. I had ordered the interface at the International MSX fair in Tilburg and received it by snail mail a couple of weeks later. It was accompanied by an unclear photocopy and some Spanish instructions. I asked Leonardo about it and learned that this information only concerned a now obsolete version of the interface. A manual for the new version 2 is not necessary, since everything works like it should. Well, almost: one key did not work. It was the backslash (‘\’) key on the left of the backspace on international keyboards. Without a backslash it is impossible to type in MSX-dos-2 directory names! On Spanish keyboards, this key is apparently placed elsewhere. After contacting Leonardo about this weird problem, he sent me a new Z8 without charge. Great service!

     I have not encountered any other hardware or software compatibility problems. Even scanning the MSX keyboard matrix directly by reading and writing to the I/O ports 0A9h and 0AAh of the PPI works perfectly! This means that all software will be able to work with the interface without problems, even if it doesn’t use the MSX bios.

The interface mounted in a MSX which is in a pc desktop case.

     You can, by the way, keep your old MSX keyboard connected and use the pc-keyboard at the same time. It’s up to you to find an application for it.

Special keys
As stated earlier, I found it a little bit disappointing that the extra keys of the pc keyboard are not used. It would have been nice if F6 to F10 on the pc keyboard would work like SHIFT-F5 to SHIFT-F6 on the MSX keyboard. I also had to get used to the position of the Graph key. Since a pc-keyboard does not have Code and Graph keys, Leonardo has decided to use Left-Alt as Code and Right-Ctrl as Graph. I think it would have made more sense to use Right-Alt (Alt-Gr) as Graph and use Right-Ctrl as normal Ctrl.

     I have asked Leonardo if it was possible to make a new version of the controller software, so that F6 to F10 can be used, Graph is placed under Alt-Gr and PageUp and PageDn can emulate the MSX key combination Ctrl-CursorUp and Ctrl-CursorDown. Some programs, like the popular text editor TED, use these combinations to page up and down. Leonardo has let me know that it is possible, but expensive to produce a single customized version of the interface. At least ten pieces should be ordered to make a customized version possible without extra charge. If you’re thinking about buying one, remember to ask if it is possible to get one with a customized translation table.

     The interface costs about EUR 66 including postage and packaging. That’s not really cheap. But if you decide that a second hand keyboard is not the right solution for you, it’s not too much either. If your pc-keyboard breaks down in the future, you can buy a new one for less than EUR 10. Or you can choose to connect a so called ‘natural’ keyboard or a wireless keyboard to your MSX. And unlike spare parts for the MSX, pc keyboards will probably still be available for a long, long time.

Ordering
The pc interface card can be ordered through the Spanish MSX Club Power Replay. Your contact there is Rafael Corrales de Pulido (replay@meridian.es). Clearly state for which pc-keyboard it must be suitable. In the Netherlands, we use standard US/International QWERTY keyboard. Belgian, French or German keyboards are different from these. Also don’t forget to mention which nationality the MSX keyboard must be. The interface card will be sent to you by mail, normally within two weeks.

     For ten or more identical interfaces — that means only one pc keyboard type and only one MSX keyboard type — you can place your order directly with Leonardo Padial (lpadial@teleline.es). In this case, discounts are available and a customized version can be made without extra charge. Contact Leonardo to discuss the possibilities and if you have any technical questions. Besides the keyboard interface, he also produces other hardware extensions for the MSX, like a 16-bits slot expander and of course the Z380 accelerator card that will be at the heart of a brand new modular MSX computer. At the moment, he is working on a video adapter that will be compatible with the standard Yamaha VDP and connects to a VGA-monitor.

     More information about MSX hardware can be found on Leonardo Padial’s website and on the website of MSX Club Power Replay.

vorige:
De Maiskoek/Bits and Pieces
MSX Computer & Club Webmagazine
nummer 92, maart/april/mei 2000
volgende:
[en] Metal Gear save file faking