Memotech ZX81 keyboard + ZXPand

Discussions about Sinclair ZX80 and ZX81 Hardware
User avatar
1024MAK
Posts: 5102
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Memotech ZX81 keyboard + ZXPand

Post by 1024MAK »

Aye, all mechanical keys, switches, conventional relay contacts etc. all suffer contact "bounce". The keys on the Memotech MTX computers are also known for producing unwanted repeats. And these are not the only keyboards that misbehave.

Membrane keyboards are different (different type of contact and the actual contact action is slower) so are not affected by switch contact bounce to the same degree.

Also the problem of contact bounce appears to get worse over time, or with lack of use (but this is opinion I don't have any evidence to back this up). Part of this may well be contamination and dirt on the switch contacts.

With keyboards, the software (firmware) will have a switch contact de-bounce routine. But of course the firmware for the Zeddy was written for the membrane keyboard, and when Memotech made their keyboards, the switches were nice and new. So there was either no problems, or keys repeating were less frequent than now maybe? Not having a Memotech keyboard back then I have to ask for the help here, as I can only guess ;).

It should be possible to write a better keyboard scanning routine that can compensate for the contact bounce, that should work with most (if not all) keyboards.

Now buffers:
The term buffer has two completely different meanings when used with electronics and computing.
1st - to act as a temporary store for queued data (what software "people" first think of),
2nd - to isolate, amplify or boost a signal, for example the transistor used in composite video modifications is a buffer (what electronic hardware "people" first think of).

When Memotech describe their keyboard interface as a keyboard buffer, it is the 2nd of the definitions that they mean, because inside there is a logic chip that isolates and boosts the signals between the Zeddy board and the external keyboard.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Memotech ZX81 keyboard + ZXPand

Post by Moggy »

@Charlie

It may only be me that's noticed this but when using the rename file feature the keys can over repeat sometimes when using my Memotech and as mine is well used over the last thirty odd years then what Mark says about de bounce and worn switches could well ring true.

As for keys repeating less frequent back then I would say yes because the keyboards were produced to work with the zeddies own rom routines I have four different types of external keyboard and the only aggravation I get with them is when using someone's custom keyboard routines, when used as intended never.

@Mark
Here's a short extract from the Memotech instruction sheet for the Memotext module ...

"The main features of MEMOTEXT are as follows:
- The Keyboard input routine is completely redefined.
Input can be done at full typing speed."

Indeed You can type at full speed (I can vouch for this as I own one) but like the Z80 assembler module you can switch the Memotext in and out and when switched out you revert to slow /normal typing speed.

Also a quote from the keyboard manual which is telling..

"HOW FAST CAN I GO?

Limitation on your speed of program and data entry is no longer the
durabllity of your fingertips or the keys themselves (which are actually very
fast); but there is a debounce routine within the ZX81 - part of its software.
If you find you are 'losing' characters at the input stage, try adopting a more
even tempo of keystroking (just like a good typist).

The constraint on stroke rate will be most apparent when entering text,
rather than data or program. MEMOTEXT, the new word processor pack from
Memotech, incorporates software which lifts this ZX81 barrier and
replaces it with a very much faster debounce routine of its own."

So Memotech used their own debounce routine well it certainly works for their keyboard at least where others I have tried don't, so perhaps a dump of the EPROM code from the Memotext is in order if anyone is interested.
Last edited by Moggy on Mon Jan 05, 2015 5:15 pm, edited 2 times in total.
rune
Posts: 174
Joined: Thu Sep 04, 2014 8:35 am

Re: Memotech ZX81 keyboard + ZXPand

Post by rune »

I'vew not had any problems with Commander and the Memoteck keyboard. But I generally just use it to select and run programs. I'll try renaming some files this evening.
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Memotech ZX81 keyboard + ZXPand

Post by PokeMon »

I found during my tests that this is a pure software problem.
It is very easy to type the same key quite fast but not two keys alternate.
This is more or less a poor implementation from Sinclair than real debounce problems.

I ever thought it even sucks that all emulators have the same routine implemented so you can not type fast with a PC keyboard in an emulator like EightyOne where is no debounce problem at all. That really sucks from the beginning I work with the Zeddys, the slow keyboard reaction and thats the reason for starting a better keyboard driver. But unfortunately in the moment no time to finish but will work on in future.

I didn't say it is easy to realize in software and it is easy to switch the debounce totally off which results in unpredictable keyboard repeats. But if the same key can be typed faster (without any bounce problem) - so it would be possible to realize this feature for different keys. In fact it makes not much sense to let only the same key typed twice or more to get a faster (partly) typing. ;)
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Memotech ZX81 keyboard + ZXPand

Post by Moggy »

As I posted earlier the Memotext module overcomes it so if there is any interest I will try and get an EPROM dump from the module.
rune
Posts: 174
Joined: Thu Sep 04, 2014 8:35 am

Re: Memotech ZX81 keyboard + ZXPand

Post by rune »

sirmorris wrote:No-one mentioned there was a keyboard problem with commander :O

It's true that it has its own auto-repeat code. Does this interfere with the memotech?
It affects it if you keep your finger on a key for a fraction of a second too long after pressing it, the key will repeat between two and umpteen times.

Renaming a file took me a few tries and can be lived with. I wouldn't want to try typing in a listing with it that way though.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Memotech ZX81 keyboard + ZXPand

Post by Moggy »

rune wrote:
sirmorris wrote:No-one mentioned there was a keyboard problem with commander :O

It's true that it has its own auto-repeat code. Does this interfere with the memotech?
It affects it if you keep your finger on a key for a fraction of a second too long after pressing it, the key will repeat between two and umpteen times.

Renaming a file took me a few tries and can be lived with. I wouldn't want to try typing in a listing with it that way though.
Which is why Toddy forth is so bloody infuriating with a Memotech keyboard type type type backspace backspace backspace. :lol:
Odd as it may sound but its not the autorepeat causing the spurious extra letters.
Autorepeat should be the held press of a key followed by a slight pause then letters printed at a fixed interval.

What seems to be happing is the the scanning routine seems to be hypersensitive to any slight movement of a pressed key and as a result throws out spurious extra letters.

It exhibits the same effect with Toddy forth and am I right in saying kmurtas Toddy forth keyboard routine is the same one used in ZXpand commander? If so that's where the problem lies.

I did correspond with kelly some time ago concerning this and he said he would be writing a new routine, this was some time ago and nothing has transpired so I can only assume other things more important arose to occupy his time.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Memotech ZX81 keyboard + ZXPand

Post by sirmorris »

Hmm, I wrote the commander input routines from scratch, I can't say whether they're the same as those in toddy forth which I suspect pre-dates commander.

It's true that I didn't consider the auto-repeat for typing - it was really aimed at traversing directory listings quickly..!

I could look at changing the auto-repeat depending upon what function is active, but it's been a while since I looked at the code, I've probably forgotten how it works :D

C
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Memotech ZX81 keyboard + ZXPand

Post by Moggy »

sirmorris wrote:Hmm, I wrote the commander input routines from scratch, I can't say whether they're the same as those in toddy forth which I suspect pre-dates commander.

It's true that I didn't consider the auto-repeat for typing - it was really aimed at traversing directory listings quickly..!

I could look at changing the auto-repeat depending upon what function is active, but it's been a while since I looked at the code, I've probably forgotten how it works :D

C
I would leave things as they are Charlie there are relatively few external keyboard users amongst us and commander works just fine as it is for vanilla zeddies. :D
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Memotech ZX81 keyboard + ZXPand

Post by sirmorris »

Well OK. The source is available for those as needs it, eh!
Post Reply