Re: reading vic20 or c64 column

From: Marko Mäkelä <>
Date: Tue, 30 Jun 2015 11:41:54 +0300
Message-ID: <20150630084154.GA25083@x220>
Hi Didier,

On Tue, Jun 30, 2015 at 10:07:06AM +0200, Didier Derny wrote:
>I'm working on usb/bluetooth keyboard for several machines
>I wanted to detect when the commodore is starting to scan the keyboard

I wonder if the ‘gaming keyboards’ are assigning one GPIO pin per key.  
I wouldn’t consider it unthinkable.

If your goal is to connect the old keyboards to newer devices, you can’t 
of course ditch the keyboard matrix. If not, skip to the quoted text 

What you could do is that you could improve the keyboard scanning. Some 
20 years ago, I made some experiments on the C128. I found that making 
the outputs to all-1 between each scan iteration would reduce the 

Another idea that you could do is to read the matrix from ‘both 
directions’ (first driving the columns and reading the rows, then 
driving the rows and reading the columns). Remember that you have a 
dedicated CPU for the keyboard, and not just a few hundred 6502 clock 
cycles in a timer interrupt.

Also, did you check the article in the C=Hacking Issue #6 about keyboard 

>1 usb keyboard or 1 windows application controlling a C64 or a tandy 
>coco 1/2/3 the same board can fit a coco 3 or a C64  or VIC 20  (just 
>different connectors) the communication is done via serial bluetooth
>a prototype works on a breadboard, I make a first PCB in a few days

Hmm, this seems the opposite route: using a modern keyboard with old 
hardware. I thought that Jim Brain already has something for this 
application. AFAIU he is controlling a programmable switch matrix with a 

If you know which way the software is reading the keyboard matrix, you 
can theoretically replace it with something simpler, such as essentially 
a RAM that connects address lines to columns and data lines to rows, or 
vice versa. Instead of address and data lines, you might even use the 
GPIO lines of a fast enough microcontroller, and maybe implement Pin 
Change Interrupt on those lines.


       Message was sent through the cbm-hackers mailing list
Received on 2015-06-30 09:00:44

Archive generated by hypermail 2.2.0.