[comp.sys.amiga.tech] reading the mouse hardware register

carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) (07/06/88)

In article <2880@umd5.umd.edu> brett@pigpen.UUCP (Brett S Bourbin) writes:
>
>Besides breaking the "rules" by going directly to the hardware, what is
>wrong with this code to read the mouse controller plugged into the first
>port?  I have first turned off the Intuition use of the port with a 
>SetMPort call.

NOTE - THIS IS OFF THE TOP OF MY HEAD AND MY HEAD'S PRETTY FULL THESE
       DAYS SO THERE'S NOT MUCH ROOM UP THERE.  IF I'M WAY OFF BASE,
       IGNORE.

>	lea	_custom,a0	; Get the custom chip addresses
>	clear	d1		; Zero register D1
>	move	joy0dat(a0),d0	; Get the mouse IO register
        ^^^^

Doesn't that default to a move.l ???
If so, then you are grabbing 2 word-sized registers, both joy0dat and joy1dat
   into d0.  

          JOY0DAT          JOY1DAT
d0 = YYYYYYYYXXXXXXXX YYYYYYYYXXXXXXXX

>	move.b	d0,d1		; Move the horizontal counter to D1

So this would take JOY1DAT's horizontal counter and put it in d1


Is that your problem ???

-- 
==========================================================================
  Carolyn Scheppner -- CATS  Commodore Amiga Technical Support
  PHONE 215-431-9180   UUCP  ...{uunet,allegra,rutgers}!cbmvax!carolyn 

 I am fully operational and all of my circuits are funcTiOnINg pperrf...
==========================================================================