2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 * XBIOS mouse & joystick vectors
31 .globl _SDL_AtariXbios_Install
32 .globl _SDL_AtariXbios_Restore
33 .globl _SDL_AtariXbios_MouseVector
34 .globl _SDL_AtariXbios_JoystickVector
36 .globl _SDL_AtariXbios_mouselock
37 .globl _SDL_AtariXbios_mouseb
38 .globl _SDL_AtariXbios_mousex
39 .globl _SDL_AtariXbios_mousey
40 .globl _SDL_AtariXbios_joystick
42 /*--- Vector installer ---*/
44 _SDL_AtariXbios_Install:
51 /* Save old mouse vector, set our routine */
55 beqs no_new_mouse_vector
56 movel a0@(16),oldmousevector
60 /* Save old joystick vector, set our routine */
62 clrl oldjoystickvector
64 beqs no_new_joystick_vector
65 movel a0@(24),oldjoystickvector
67 no_new_joystick_vector:
69 /* Restart interrupts */
75 /*--- Vector restorer ---*/
77 _SDL_AtariXbios_Restore:
84 /* Restore mouse vector */
86 movel oldmousevector,d0
91 /* Restore joystick vector */
93 movel oldjoystickvector,d0
94 beqs no_restore_joystick
98 /* Restart interrupts */
104 /*--- Our mouse vector ---*/
110 .comm oldmousevector,4*1
111 _SDL_AtariXbios_MouseVector:
117 movew d0,_SDL_AtariXbios_mouseb
122 addw d0,_SDL_AtariXbios_mousex
127 addw d0,_SDL_AtariXbios_mousey
129 /* Lock mouse position ? */
130 tstw _SDL_AtariXbios_mouselock
136 /* Jump through old vector */
139 movel oldmousevector,sp@-
144 .comm _SDL_AtariXbios_mouselock,2*1
145 .comm _SDL_AtariXbios_mousex,2*1
146 .comm _SDL_AtariXbios_mousey,2*1
147 .comm _SDL_AtariXbios_mouseb,2*1
149 /*--- Our joystick vector ---*/
155 .comm oldjoystickvector,4*1
156 _SDL_AtariXbios_JoystickVector:
159 /* New joystick state */
162 movew d0,_SDL_AtariXbios_joystick
164 /* Jump through old vector */
167 movel oldjoystickvector,sp@-
172 .comm _SDL_AtariXbios_joystick,2*1