PDA

View Full Version : zx spectrum as keyboard



alexxx
January 21st, 2009, 02:56 AM
Hi everybody,
I stumbled upon this forum while browsing the net looking for a way to be able to still use my beloved zx spectrum.

Somebody ever tried to connect it to a computer, using it as a plain keyboard?

thanks for any info...


alessandro

patscc
January 21st, 2009, 05:24 AM
You'd have to add at least a serial port. Then, for starters, you could use it as a serial terminal.
If you want to emulate an actual keyboard, you'd have to write/build (or see if it's been done before) something to emulate the protocol that AT-style & PS/2-style keyboards use to talk to the pc.
That said, hopefully someone else will post an actual solution.
patscc

carlsson
January 21st, 2009, 06:47 AM
It also depends if the keyboard is read in a matrix of row, column or sending character codes. Frankly I don't know but it should be fairly easy to look up. I don't know if anyone has made a keyboard interface of either direction for the Speccy, but in comparison there are at least one commercial and one open source interfaces for the Commodore computers.. which also tend to have a little more typing-friendly keyboards.

cosam
January 21st, 2009, 06:57 AM
I've seen the opposite, i.e. a PC keyboard connected to a Spectrum, but not this way around. An Interface 1 will give you a serial port if terminal-like communication is sufficient, although I suspect you're after a "general purpose" PC-compatible keyboard.

If you're not worried about preserving the Spectrum, it may be possible to wire up a modern keyboard's electronics to the Spectrum's keyboard. Unfortunately I'm not so sure how modern keyboard's membranes are wired and they are probably completely incompatible. You would also be limited by the physical number of keys you have on the Spectrum which may not be practical for anything PC-oriented, although you could get around that to some degree in software on the PC.

The other route is of course what patscc suggested. Unless it has indeed been done before, building such an interface isn't trivial and you'd also need to write some kind of software on the Spectrum to talk to it.

cosam
January 21st, 2009, 07:07 AM
It also depends if the keyboard is read in a matrix of row, column or sending character codes.
It's rows (well, half rows really) and columns mapped to a few Z80's I/O ports, although IIRC the ULA had some role in decoding as well.

amouse
January 21st, 2009, 08:06 AM
Warning: Dont use your beloved Spectrum as a keyboard to a computer, you might get sued by Apple Computer for copyright infringement.

No wait, I got that the wrong way around ... it's Apple's current notebook keyboards that look like a Sinclair Spectrum ;)

Chuck(G)
January 21st, 2009, 08:46 AM
Got a parallel port on the Spectrum? It's very easy to write some code to get it to at least be a rudimentary keyboard for an 5150 or 5160. AT-keyboard is a bit more difficult.

Depending on what's available from your Spectrum in the way of keypress information, you may not be able to duplicate all the keys of a PC keyboard. But something functional could be arranged.

cosam
January 21st, 2009, 12:28 PM
There's no parallel port but all bus lines are available on the expansion connector. It would be easy enough to decode an I/O port or two to feed an interface circuit.

patscc
January 21st, 2009, 12:52 PM
Maybe if you hack apart an existing PS/2 style keyboard, preferably one where the key matrix gets hooked to the uC board with a connector. Use your spectrum hooked to the keyboard innards to simulate the key matrix, and just let the PS/2-style keyboard's uC do all the protocol work.

patscc