Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: ACIA mouse question
Posted by: dml Dec,05.2015-15:57 

A few things...


- make sure your IKBD handler completes quickly. no hanging around. rather than processing the data in the interrupt, place it in a queue ASAP and let something else process it. obviously with mouse packets you need to process them immediately but interpreting keyboard stuff - better not.

- if you are changing SR inside an interrupt on 68030, I recommend the sequence ori #$0700,sr; <do exclusive sequence of work>; andi #$f3ff,sr; <do interruptible work>; Don't move directly to SR. Or just avoid changing it. I'll explain why another time..

- make sure you observe the error/overflow bits in the control register. This affects how you deal with subsequent data. overflows can occur if the interrupt ISR is busy too long or SR is raised too long when more packets are arriving.

- on 68030, be careful to keep written data/variables a good distance away from interrupt handlers. I've seem some weird stuff happen during interrupts - some freaky problems relating to the data cache and interrupts. Didn't get to the bottom of it but the proximity of written vars to the handler in supervisor mode always seemed to be involved, especially if the variable is used by the interrupt (e.g. a jump address).

The rest is down to making sure you don't miss packets, and you correctly interpret all the types of packets arriving. Providing you do that you shouldn't have issues with freaky keypresses.

There is one problem with ghost keypresses which seems to be caused by the keyboard matrix itself when you hold down 3 or more keys and release one of them. The release code sometimes arrives as a 'wrong' keypress. This one is nasty, especially for games where keyboard+mouse are needed together for direction/steering etc. I had a lot of fun with that :-/












[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


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson