Re: joystick ports

From: Gerrit Heitsch <>
Date: Sun, 08 Sep 2013 16:15:26 +0200
Message-ID: <>
On 09/08/2013 04:07 PM, Julian Perry wrote:

> Having a peek at the keyboard scanning code in VICE, it seems that an opportunity may have been missed. This missed opportunity was the ability to isolate joystick activity from a keyboard scan.
> Once the job of sending the column signals was taken over by the 6529 from the data buss, writing data with bits 1 and 2 set (EG $ff, or $06) to the TED keyboard latch would ensure that the joysticks could not interfere with the keyboard scan.
> The scnkey routine starts at $DB11, and the actual SCAN code is a short subroutine at $DB70.
> .A contains the bit pattern for the column. .A returns bit pattern of row.
> The code:
> $DB70	STA $FD30	;Write to 6529 - Column
> $DB73	STA $FF08	;Write trigger to latch TED keyboard input
> $DB76	LDA $FF08	;Read latch (Row)
> $DB79	RTS		;Return
> By adding 2 bytes, simply changing it to:
> STA $FD30	;Write to 6529 - Column
> LDA #FF	;disable joystick probe
> STA $FF08	;Write trigger to latch TED keyboard input
> LDA $FF08	;Read latch (Row)
> RTS		;Return
> The Joysticks could be left turned off for the duration.
> Or am I still missing the bleeding obvious somewhere??? :)

No, that looks to me like it could work. I think no one really thought 
about it and most of the time people won't touch the joystick when they 
are typing so it wasn't a real problem.

I assume that the code to write to the 6529 was a quick addition once 
that chip came into play and once it worked, no one looked at it again.


       Message was sent through the cbm-hackers mailing list
Received on 2013-09-08 15:01:07

Archive generated by hypermail 2.2.0.