|
|
Atari coding BBS
Re: ACIA mouse question |
Posted by: Thadoss
|
Dec,05.2015-00:06
|
Yes I do.
Here is what I do in case this can help.
I have some bad "keyboard input" sometimes.
In fact, it seems I also have these bad "keyboard input" also when the mouse move less than 128 bytes lenght (I've verified this).
I've tried many little things without success.
Maybe this will ring a bell to someone ?
IKBD_Install: movem.l d0-d1/a0-a1,-(sp)
move.w #$2700,sr
lea $fffffa00.w,a0
btst #6,$9(a0)
sne ikbd_ierb
btst #6,$15(a0)
sne ikbd_imrb
move.l $118.w,ikbd_save_inter
move.l #IKBD_Main,$118.w
bset #6,$fffffa09.w ; IERB
bset #6,$fffffa15.w ; IMRB
bsr IKBD_MouseOn
move.w #$2300,sr
movem.l (sp)+,d0-d1/a0-a1
rts
IKBD_Uninstall: move.l a0,-(sp)
move.w #$2700,sr
lea $fffffa00.w,a0
bclr #6,$9(a0)
tst.b ikbd_ierb
beq.s ikbd_restoreierb
bset #6,$9(a0)
ikbd_restoreierb: bclr #6,$15(a0)
tst.b ikbd_imrb
beq.s ikbd_restoreimrb
bset #6,$15(a0)
ikbd_restoreimrb: move.l ikbd_save_inter,$118.w
lea $fffffc00.w,a0
ikbd_clearbuffer: btst #0,(a0)
beq.s ikbd_buffercleared
tst.b 2(a0)
bra.s ikbd_clearbuffer
ikbd_buffercleared: move.w #$2300,sr
move.l (sp)+,a0
rts
IKBD_MouseOff: move.b #$14,$fffffc02.w
rts
IKBD_MouseOn: move.b #$08,$fffffc02.w
rts
IKBD_Main: btst #0,$fffffc00.w
beq.s ikbd_endit
movem.l d0-d1/a0,-(sp)
move.b $fffffc02.w,d0
cmp.b #$ff,d0
beq.s ikbd_yes_joystick1
cmp.b #$fe,d0
beq.s ikbd_yes_joystick0
cmp.b #$f8,d0
bmi.s ikbd_no_mouse
cmp.b #$fc,d0
bpl.s ikbd_no_mouse
ikbd_yes_mouse: and.b #3,d0
move.b d0,IKBD_MouseButtons
move.l #ikbd_mousex_it,$118.w ; queue different irq vector for mouse packet
bra.s ikbd_endit_stack
ikbd_yes_joystick1: move.l #ikbd_poll_joystick1,$118.w ; queue joystick 1 irq for next packet
bra.s ikbd_endit_stack
ikbd_yes_joystick0: move.l #ikbd_poll_joystick0,$118.w ; queue joystick 0 irq for next packet
bra.s ikbd_endit_stack
ikbd_no_mouse: move.b d0,d1
lea IKBD_Keyboard,a0
and.l #$7f,d1 ; mask scancode
tas d0
spl 0(a0,d1.w) ; store -1 in scancode table
ikbd_endit_stack: movem.l (sp)+,d0-d1/a0
ikbd_endit:
bclr #6,$fffffa11.w ; acknowledge IKBD interrupt
rte ; ... and terminate the ISR
ikbd_mousex_it:
btst #0,$fffffc00.w
beq.s ikbd_endit
move.w d0,-(sp)
move.b $fffffc02.w,d0
ext.w d0
add.w d0,IKBD_MouseX
move.w (sp)+,d0
move.l #ikbd_mousey_it,$118.w
bra.s ikbd_endit
ikbd_mousey_it:
btst #0,$fffffc00.w
beq.s ikbd_endit
move.w d0,-(sp)
move.b $fffffc02.w,d0
ext.w d0
add.w d0,IKBD_MouseY
move.w (sp)+,d0
move.l #IKBD_Main,$118.w
bra.s ikbd_endit
ikbd_poll_joystick1:
btst #0,$fffffc00.w
beq.s ikbd_endit
move.b $fffffc02.w,IKBD_Joystick1
move.l #IKBD_Main,$118.w
bra.s ikbd_endit
ikbd_poll_joystick0:
btst #0,$fffffc00.w
beq.s ikbd_endit
move.b $fffffc02.w,IKBD_Joystick0
move.l #IKBD_Main,$118.w
bra.s ikbd_endit
Regards
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
ACIA mouse question
|
Thadoss
|
Dec,03.2015-18:06
|
Re: ACIA mouse question
|
dml
|
Dec,03.2015-21:15
|
Re: ACIA mouse question
|
Thadoss
|
Dec,03.2015-21:28
|
Re: ACIA mouse question
|
ggn
|
Dec,04.2015-10:08
|
Re: ACIA mouse question
|
Thadoss
|
Dec,04.2015-11:21
|
Re: ACIA mouse question
|
Thadoss
|
Dec,04.2015-11:33
|
Re: ACIA mouse question
|
ggn
|
Dec,04.2015-12:09
|
Re: ACIA mouse question
|
defjam
|
Dec,04.2015-22:21
|
Re: ACIA mouse question
|
Thadoss
|
Dec,05.2015-00:06
|
Re: ACIA mouse question
|
Thadoss
|
Dec,05.2015-12:19
|
Re: ACIA mouse question
|
dml
|
Dec,05.2015-15:57
|
Re: ACIA mouse question
|
dml
|
Dec,05.2015-16:03
|
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|
|
|