[Coco] Re: X-PAD question
Kenneth Schunk
ken at kenschunk.com
Thu Jan 8 17:55:42 EST 2004
Wow, I'm glad somebody still had that tidbit of information. I thought
I remembered doing something with it years ago, but I haven't found a
copy of that on my systems here.
Ken
On Jan 8, 2004, at 1:41 PM, Torsten Dittel wrote:
>> What's wrong with the addresses $FF60-FF62 on a Coco3? Look like valid
>> addresses to me.
>
> Ah, you're right. The MaxPak works unpatched at $FF80, this is a
> problem
> with a CoCo3-upgraded MultiPak interface. There were some hardware
> patches around to move it down to $FF60 (grrr... I should have saved
> that information, now I can't find it any more).
>
> Luckily it looks like I don't have to write a driver, I found that one:
>
> Using CoCoMax on the CoCo-3
> by Ken Schunk
>
> This information is public domain. Post it anywhere. Copy it and
> give
> it to your friends. Line your bird cage with it. Just please leave my
> name
> on it (Unless you decide to line your birdcage. Then I don't care..)
>
> Two simple poke's are all that is needed for CoCoMax-2 to run on
> the
> CoCo-3. The file that must be modified is the COCOMAX/BIN file. To
> modify
> it to work on the CoCo-3, place a BACKUP of the CoCoMax disk in your
> disk
> drive and type the following:
>
> CLEAR 200,&H3FFF
> LOADM"COCOMAX/BIN"
> POKE &H53FB,&HFE
> POKE &H53FC,&HEF
> If you are using a X-Pad driver, LOADM it at this point.
> SAVEM"COCOMAX/BIN",&H4000,&H7FFF,&H492B
>
> That's all there is to it if you can use an unmodified HiRes input
> pack.
> If you are using a multipak with Tandy's new PAL chip, you will need
> to
> modify the HiRes pack to get it to work, since the PAL chip will not
> let
> you read from the pack. You have a choice of a couple of solutions.
> You
> can
> modify the pack to be readdressed below &HFF80, such as &HFF60. This
> will
> require some knowledge of electronics, since some switching of address
> lines is required. The other possibility is to use a different PAL
> chip
> that allows reading of addresses above &HFF80. I THINK that Spectrum
> Products may have such a device. Yet another solution would be to not
> use
> the pack, and use a different device, such as an X-Pad.
> If you do readdress the pack or use an X-Pad, you will need to
> modify
> MAXTITLE/SYS to allow it to work with the new device. One poke is all
> that
> is needed to prevent MAXTITLE/SYS from locking into an endless loop.
> To
> fix
> it, use:
>
> PCLEAR 5
> LOADM"MAXTITLE/SYS"
> POKE &HED8,&H21
> SAVEM"MAXTITLE/SYS",&HE00,&H266C,&HA027
>
> If you readdress the pack, you will also need to modify COCOMAX/BIN
> to
> allow it to read the pack at it's new address. The pokes needed are:
>
> POKE &H562D, (Low order byte of pack address)
> POKE &H7ACE, (Low order byte of pack address)
> For example, if you modified to pack to be addressed at $FF60, you
> would
> use the pokes :POKE &H562D,&H60:POKE &H7ACE,&H60.
> Remember, these pokes modify COCOMAX/BIN. You first need to LOADM
> it,
> then do the pokes. Remember to SAVEM it when you are done.
>
> If you use the X-Pad, you will need a driver for the X-Pad, such as
> the
> following EDTASM+ assembly code:
>
> ORG $5839 ;Start of first mouse area
> START CMPB #2 ;Is it a button request?
> LBEQ L2 ;Yes - handle button call
> LDA $FF61 ;Read pen Y position
> DECB ;B has 1 if Y and 2 if X
> BNE L4 ;Skip if call was for Y
> LDA $FF60 ;Get pen X position
> L4 LDY #TMP ;Point to data storage
> STA ,Y ;Save pen position
> CLRB ;Point to data with B,Y
> RTS ;Back to CoCoMax
> TMP RMB 1 ;Data area
> ORG $562A ;Start of second mouse area
> LBRA START ;Jump to read if called here
> L2 LDA $FF62 ;Read pen status
> ASRA ;Get pen switch bit to 'C'
> BCS L3 ;Return pen down info
> LDA #$80 ;Map in expected pen value
> L3 LBRA L4 ;Return value to COCOMAX
> END START
>
> Enjoy
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
More information about the Coco
mailing list