Key ghosting

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
Post Reply
garfield
Posts: 399
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Key ghosting

Post by garfield » Thu Jun 05, 2014 6:23 pm

What is the method for determining which simultaneous BBC key presses will create unwanted 'ghost' key activations? (Also, is the Beeb any worse or better than its contemporaries in this regard?)

Image

I came across this image, and vaguely recall something about rectangles. Anyone care to explain this please?





I've a notion to create a 3-player game (using the keyboard) that requires six keys minimum per player.

User avatar
IanS
Posts: 810
Joined: Mon Aug 31, 2009 6:02 pm
Contact:

Re: Key ghosting

Post by IanS » Thu Jun 05, 2014 8:07 pm

It is all about rectangles, if 3 buttons at the corners of a rectangle are pressed, to the hardware it will look like all 4 keys of the rectangle are pressed.

e.g. if keys S,G & A are pressed then the F key will also look like it is pressed. When the column with G & F is driven, signal will go via the other 3 keys and be detected on the row with A & F so it looks like F is pressed.

Does that help?

I think the most unique keys that can be individually detected would be to use one row and one column, avoiding the key at the intersection. Fancier keyboard have a diode on every key allow all keys to be seperately detected.

garfield
Posts: 399
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: Key ghosting

Post by garfield » Thu Jun 05, 2014 8:13 pm

I think I understand. Thanks.

paulb
Posts: 811
Joined: Mon Jan 20, 2014 9:02 pm
Contact:

Re: Key ghosting

Post by paulb » Thu Jun 05, 2014 10:03 pm

garfield wrote:I came across this image, and vaguely recall something about rectangles. Anyone care to explain this please?
If you want to understand the general concepts, I've found this document to be useful.

garfield
Posts: 399
Joined: Mon Jan 03, 2005 1:38 am
Contact:

Re: Key ghosting

Post by garfield » Fri Jun 06, 2014 8:48 am

paulb wrote:
garfield wrote:I came across this image, and vaguely recall something about rectangles. Anyone care to explain this please?
If you want to understand the general concepts, I've found this document to be useful.
Handy! Cheers.

User avatar
tricky
Posts: 3280
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Key ghosting

Post by tricky » Fri Jun 06, 2014 9:13 pm

I wrote a program over 30 years ago which draws a keyboard and then highlights the keys it thinks are pressed, you can use it on a real beeb to see exactly what is aliasing. http://www.retrosoftware.co.uk/forum/vi ... 6135#p6458 I used it when I was working on Jeltron http://www.retrosoftware.co.uk/wiki/ind ... l_Jaysmith which had 12 keys (4 dir, fire and power-up per player).

There is a faster version http://www.retrosoftware.co.uk/forum/vi ... =100#p6558 that just lists the keys pressed (read from machine code).

PS I probably wouldn't have written it if the AUG was as clear as that diagram.

Post Reply