Search site Dead Hackers Society
Other BBSes »

Silly Venture 2019

Sommarhack 2019
Demoscene   º   Coding   º   CT60   º   Buy/sell   º   Misc/crap   º   Alive magazine   º   SNDH/Tracking

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

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

IKBD_MouseOff: move.b #$14,$fffffc02.w

IKBD_MouseOn: move.b #$08,$fffffc02.w

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

bclr #6,$fffffa11.w ; acknowledge IKBD interrupt
rte ; ... and terminate the ISR

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
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
btst #0,$fffffc00.w
beq.s ikbd_endit
move.b $fffffc02.w,IKBD_Joystick1
move.l #IKBD_Main,$118.w
bra.s ikbd_endit

btst #0,$fffffc00.w
beq.s ikbd_endit
move.b $fffffc02.w,IKBD_Joystick0
move.l #IKBD_Main,$118.w
bra.s ikbd_endit


[All messages in this 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

Message board and comments are now read-only

Due to abuse of the message boards we have put the entire site in read-only mode. That means you can't post new threads or reply to old messages and you can't add comments in VideoDB and PicDB.

Some messages have been erased from reading, but are stored in case they need to surface again.

After 17 years and 45000 messages we're shutting down due to one person.

© 1994-2019 Dead Hackers Society Contact: Anders Eriksson