Re: joystick ports

From: Rob Clarke <crock_at_clarke-family.org.uk>
Date: Mon, 9 Sep 2013 11:41:43 +0200
Message-ID: <207ab076950caa627967884ff23ef3df.squirrel@www.clarke-family.org.uk>
>> 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.
>
> Yeah, I've been wondering about that too. I can see no reason why the
> joysticks had to be left active there either.
>
>> 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.
>
> Yes. That's how it should have ended up IMHO.
>

That's precisely what I did in Diag264:

	lda #$fd		; check shift lock
	sta keyport_6529
	lda #$ff		; stop joytest interfering with kb
	sta TED_Latch
	lda TED_Latch

I had the requirement to have loopback dongles simultaneously on the KB &
joystick ports so I needed to do this to prevent conflicts; and it works
perfectly well.

Rob

       Message was sent through the cbm-hackers mailing list
Received on 2013-09-09 10:01:12

Archive generated by hypermail 2.2.0.