Mercurial > sdl-ios-xcode
annotate src/video/ataricommon/SDL_xbiosinterrupt.S @ 2860:6ce28e5287e9
Date: Sun, 07 Dec 2008 13:35:23 +0100
From: Couriersud
Subject: SDL: Mouse last_x, last_y into SDL_Mouse
the attached diff moves the static vars last_x and last_y into
SDL_Mouse. These, as far as I understand it, should be tied to the
individual mouse.
The patch also makes the code check for out of window conditions of
mouse->x,y when relative movements are passed to MouseSendMotion.
Also attached is the latest DirectFB code (dfb20081208) supporting
multiple mice and keyboards. This works quite well with sdlmame now. It
however needs more testing with different directfb configurations.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 08 Dec 2008 00:52:12 +0000 |
parents | 99210400e8b9 |
children | 2da8b4494ceb |
rev | line source |
---|---|
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
2859 | 3 Copyright (C) 1997-2009 Sam Lantinga |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1063
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1063
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1063
diff
changeset
|
13 Lesser General Public License for more details. |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1063
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1063
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1063
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 /* |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 * XBIOS mouse & joystick vectors |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 * |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 * Patrice Mandin |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 .text |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 .globl _SDL_AtariXbios_Install |
820
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
32 .globl _SDL_AtariXbios_Restore |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 .globl _SDL_AtariXbios_MouseVector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 .globl _SDL_AtariXbios_JoystickVector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 |
2023
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
36 .globl _SDL_AtariXbios_mouselock |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 .globl _SDL_AtariXbios_mouseb |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 .globl _SDL_AtariXbios_mousex |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 .globl _SDL_AtariXbios_mousey |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 .globl _SDL_AtariXbios_joystick |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 /*--- Vector installer ---*/ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 _SDL_AtariXbios_Install: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 movel sp@(4),a0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
46 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
47 /* Stop interrupts */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 movew #0x2700,sr |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
50 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
51 /* Save old mouse vector, set our routine */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
52 |
820
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
53 clrl oldmousevector |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 movel sp@(8),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
55 beqs no_new_mouse_vector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 movel a0@(16),oldmousevector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 movel d0,a0@(16) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
58 no_new_mouse_vector: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
60 /* Save old joystick vector, set our routine */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
61 |
820
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
62 clrl oldjoystickvector |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
63 movel sp@(12),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
64 beqs no_new_joystick_vector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 movel a0@(24),oldjoystickvector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
66 movel d0,a0@(24) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 no_new_joystick_vector: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
68 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
69 /* Restart interrupts */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 movew #0x2300,sr |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
72 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 rts |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 |
820
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
75 /*--- Vector restorer ---*/ |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
76 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
77 _SDL_AtariXbios_Restore: |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
78 movel sp@(4),a0 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
79 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
80 /* Stop interrupts */ |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
81 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
82 movew #0x2700,sr |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
83 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
84 /* Restore mouse vector */ |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
85 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
86 movel oldmousevector,d0 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
87 beqs no_restore_mouse |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
88 movel d0,a0@(16) |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
89 no_restore_mouse: |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
90 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
91 /* Restore joystick vector */ |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
92 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
93 movel oldjoystickvector,d0 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
94 beqs no_restore_joystick |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
95 movel d0,a0@(24) |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
96 no_restore_joystick: |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
97 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
98 /* Restart interrupts */ |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
99 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
100 movew #0x2300,sr |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
101 |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
102 rts |
0b9b4bf3c1e7
Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents:
305
diff
changeset
|
103 |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
104 /*--- Our mouse vector ---*/ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
106 .text |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 .ascii "XBRA" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
109 .ascii "LSDL" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
110 .comm oldmousevector,4*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
111 _SDL_AtariXbios_MouseVector: |
987
d9f3b5bb7870
Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents:
820
diff
changeset
|
112 movel d0,sp@- |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
114 /* Mouse buttons */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
115 moveb (a0),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 andw #3,d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
117 movew d0,_SDL_AtariXbios_mouseb |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
118 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
119 /* X movement */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
120 moveb a0@(1),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 extw d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 addw d0,_SDL_AtariXbios_mousex |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 /* Y movement */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 moveb a0@(2),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 extw d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 addw d0,_SDL_AtariXbios_mousey |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
128 |
2023
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
129 /* Lock mouse position ? */ |
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
130 tstw _SDL_AtariXbios_mouselock |
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
131 beq.s no_mouse_lock |
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
132 clrb a0@(1) |
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
133 clrb a0@(2) |
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
134 no_mouse_lock: |
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
135 |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
136 /* Jump through old vector */ |
987
d9f3b5bb7870
Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents:
820
diff
changeset
|
137 movel sp@+,d0 |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
138 |
987
d9f3b5bb7870
Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents:
820
diff
changeset
|
139 movel oldmousevector,sp@- |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
140 rts |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
141 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
142 .data |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
143 .even |
2023
b7d426b28c18
Allow mouse to be locked when grabbed with GEM driver
Patrice Mandin <patmandin@gmail.com>
parents:
1312
diff
changeset
|
144 .comm _SDL_AtariXbios_mouselock,2*1 |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
145 .comm _SDL_AtariXbios_mousex,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
146 .comm _SDL_AtariXbios_mousey,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
147 .comm _SDL_AtariXbios_mouseb,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
148 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
149 /*--- Our joystick vector ---*/ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
150 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
151 .text |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
152 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
153 .ascii "XBRA" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
154 .ascii "LSDL" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
155 .comm oldjoystickvector,4*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
156 _SDL_AtariXbios_JoystickVector: |
987
d9f3b5bb7870
Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents:
820
diff
changeset
|
157 movel d0,sp@- |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
158 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
159 /* New joystick state */ |
1063
0fb50bfaea7f
Used wrong offset in joystick packet
Patrice Mandin <patmandin@gmail.com>
parents:
987
diff
changeset
|
160 moveb a0@(2),d0 |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
161 andw #0x8f,d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
162 movew d0,_SDL_AtariXbios_joystick |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
163 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
164 /* Jump through old vector */ |
987
d9f3b5bb7870
Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents:
820
diff
changeset
|
165 movel sp@+,d0 |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
166 |
987
d9f3b5bb7870
Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents:
820
diff
changeset
|
167 movel oldjoystickvector,sp@- |
305
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
168 rts |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
169 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
170 .data |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
171 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
172 .comm _SDL_AtariXbios_joystick,2*1 |