another one of my interminable MTX projects is a plan to put a Raspberry PI inside an original MTX case and use the MTX keyboard to drive the Pi running MEMU.
I had a brief discussion with Bill on this a while ago, but it never really progressed as I couldn't get hold of an MTX keyboard that wasn't part of a functional MTX. However, that has just changed, and although I had to spend more than I wanted to, I bought the orphan MTX keyboard that was just on ebay.
So, now I have the keyboard and a Raspberry Pi, all that remains is to tie them together
![Smile :-)](./images/smilies/icon_e_smile.gif)
That's where I need some help please . . . . . .
I have included some extracts from the e-mail conversation that Bill and I had, I'd like to finalise the hardware so that I can do the construction, so your input into the discussion would be most welcome. At the moment, I am just thinking about going with the hardware list that Bill suggested (below), but am open to other suggestions too.
The bigger issue though is the software, I'd need a willing volounteer to do the MEMU patches to work with the keyboard and potentially, other I/O ports.
Any takers ?
regards
Dave
<DS>
I would like to build a MEMU-Pi inside a real MTX, replacing a duff mother board and using the old MTX keyboard. Yes, I know that the keyboard might not be great, but it would look fantastic. My question is, how much work would I it be to directly connect the MTX keyboard connector to the GPIB pins in the Pi and write some code to translate the key presses to MEMU speak? I guess that some of the PC hot key functions would need to be remapped to, say, MTX Function keys, but is there anything major in the way of being able to do this?
- - - - - - - - - -
<BB>
With regard to interfacing a real MTX keyboard to MEMU-Pi, it is certainly possible, but there are a few issues. The MTX keyboard requires 8 drive lines and 10 sense lines, so at least 18 GPIO ports, 19 if you also want to monitor the reset keys. The RPi has at most 17 GPIO on P1. On the Rev. 2 boards there are a few more GPIO on P5, so it would be just about possible. However, a better solution would be to use an I2C based I/O expansion board to provide the necessary number of connections. There are a number of commercial expansion boards that would be sufficient to connect the keyboard.
However, I have been fantasising about a custom board that would supply keyboard connector, joystick connections (in parallel with keyboard, as per MTX), printer port, two serial ports, and perhaps even the internal MTX PIO port. Attempting to emulate the expansion bus would probably be a stretch too far.
With regard to user interface, the reset keys could act as the SysReq key, bringing up the configuration screen. If this then included an option to select which of the screens to display, then you would not need to change any of the functionality of the main keyboard at all. Even better would be if it was possible to monitor the two reset keys separately. Then one key could be SysReq, while the other toggles between screens. However, that would require a modification to the keyboard PCB. There are a number of ways this could be done, either adding wires or diodes, without having to cut any of the tracks.
- - - - - - - - - -
<DS>
Thanks for the info. Your custom I/O board sounds just the thing, if you get time to do it, I'd be really interested in seeing the design. I imagine that you'd make your own board (?), but if it ever became a reality, I would get a PCB manufactured.
Separate reset key functions would be neat, if the MTX keyboard was interfaced with your expansion board, could any required modification be done on the board, rather than on the keyboard PCB? As no tracks need cutting, this might be possible?
- - - - - - - - - -
<BB>
In order to get separate reset keys, you have to modify the keyboard PCB in some way in order to get at the connection between the two reset keys.
The simplest solution is to solder a wire from the track joining the two reset keys keys (not connected to the plug), and solder the other end to one of the main keyboard drive lines. Then the two reset key connections become additional sense lines.
Another approach is to solder diodes across the reset keys, with cathodes on the sides that connect to the plug, and anodes on the sides that just connect to each other. Then on the interface board, put pull ups on both reset key lines. Drive one side low and the other side becomes sense for one of the keys. Remove the drive from the first side, and apply it to the second. The first side is then sense for the other reset key.
Unfortunately, both of these approaches would interfere with the operation with a standard MTX motherboard. The only fully compatible solution I can think of so far is to add a separate 21st connection to the track joining the two reset keys.
Actually, the second approach would almost work, except that one of the two reset keys (but not the other) would be sufficient to reset the MTX.
- - - - - - - - - -
<BB>
A possible solution using available hardware:
* RPi
* One (or possibly two) IO expansion boards (http://www.pi-supply.com/product/quick2 ... board-kit/)
* 4 port powered USB hub.
* Two USB to serial convertors
* One USB to parallel converter.
There should be room for all of that inside the MTX case.
Then it is only a question of software.
- - - - - - - - - -
<DS>
What we need is some one with lots of experience coding for the Z80 and the RPi, where are we going to find someone like that I wonder
![Smile :-)](./images/smilies/icon_e_smile.gif)
- - - - - - - - - -