[Coco] Extended basic 1.1 command?
Bill Pierce
ooogalapasooo at aol.com
Wed Nov 21 10:45:55 EST 2012
Harry, I just ripped the code straight from a program in Rainbow. There were lots of other subs so I imagine the method of entry had to do with part of the other code for joysticks, hi-res interface, screen print (pmode4) and others so modifying the code here would be totally up to you and your needs. I didn't even look at the code for acuracy as I used this very code for several programs over the years and it never failed me. If you see mods for better code then be my guest. :-)
Bill P
Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Bill Pierce
ooogalapasooo at aol.com
-----Original Message-----
From: Harry Hurst <hhos at st-tel.net>
To: coco <coco at maltedmedia.com>
Sent: Wed, Nov 21, 2012 8:59 am
Subject: Re: [Coco] Extended basic 1.1 command?
If I understand this, then:
Entry conditions
A : 0 = Right 1 = Left 2 = both
U : Pointer to array with button data at BDWN offset
Exit conditions
Button condition in BDWN,U and B register
A, B and X are trampled
Is this right? If so, then why not eliminate the INCB at line 9200 and
enter with
A : 1 = Right 2 = Left 3 = both ?
HH
> 08500 *THIS DOES A BUTTON READ OFF THE RIGHT/LEFT JOYSTICK
> 08600 BUTSTA PSHS A SAVE RIGHT/LEFT FLAG
> 08700 LDX #$FF00 POINT TO THE
> I/O PORT
> 08800 LDA 2,X GET
> THE KEY SELECT DATA
> 08900 LDB #$FF SELECT NO KEYS
> 09000 STB 2,X TO
> READ JUST THE BUTTONS
> 09100 PULS B GET
> RIGHT/LEFT BUTTON SELECT
> 09200 INCB
> MAKE IT "01"(R) OR "10" (L)
> 09300 COMB
> MAKE SELECTED BIT ZERO
> 09400 ORB ,X IS GET THAT BUTTON
> BIT
> 09500 STA 2,X RESTORE
> KEY SELECT DATA
> 09600 COMB
> MAKE IT A ONE IF PRESS
> 09700 ANDB #3 ONLY
> RIGHT/LEFT BUTTON BITS!
> 09800 STB BDWN,U UPDATE BUTTON DOWN STATUS
> 09900 RTS
> AND EXIT
>
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list