22 October 2020, 13:57 | #1 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 828
|
Keyboard int (PORTS)
I saw few times following situation in PORTS int ($68 + vbr).
1. read keycode from $bfec01 2. clear or set $ff to $bfec01 Mean Code:
intPORTS: moveq #0,d0 move.b $bfec01,d0 clr.b $bfec01 ; move.b #$ff,$bfec01 .... rte |
22 October 2020, 14:20 | #2 |
Registered User
Join Date: Sep 2019
Location: Leicester / England
Posts: 201
|
After reading the value, one of the bits needs setting to acknowledge they key has been read. See this thread http://eab.abime.net/showthread.php?t=102943 for more details.
|
22 October 2020, 14:35 | #3 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Hi Asman,
you can overwrite keycode in $bfec01 (CIA registers are r/w). So if an external code (out of IRQ) get it, a $00 or $ff is read. |
22 October 2020, 14:39 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,503
|
Looks like too simple key read code. If new code is zero or ff = no new key, skip. Checking CIA interrupt bits is too difficult
|
22 October 2020, 14:42 | #5 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
22 October 2020, 14:48 | #6 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
All coders are a bit lazy, right?
Otherwise why spend all that effort to get the computer to do stuff for us instead of doing it ourself? |
22 October 2020, 15:03 | #7 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBCC: complain about static int (*calltrap)(...) = (int (*)(...))0xF0FF60; | mbergmann-sh | Coders. C/C++ | 3 | 17 March 2017 01:19 |
asm game - how implement exit to OS via PORTS int | Asman | Coders. General | 4 | 28 June 2011 11:07 |
ASM: false int vector ($60) | Asman | Coders. General | 2 | 13 September 2010 09:22 |
ASM: VERTB int and 16 colored sprites. | Asman | Coders. Tutorials | 5 | 28 April 2010 14:18 |
INT-2 modification on Cyberstorm boards? | astuermer | support.Hardware | 2 | 06 October 2005 15:23 |
|
|