annotate src/video/ataricommon/SDL_xbiosinterrupt.S @ 1310:a201a8c62522

Add flag to post mouse button events or not, and use defined function to post them
author Patrice Mandin <patmandin@gmail.com>
date Tue, 31 Jan 2006 21:33:35 +0000
parents 0fb50bfaea7f
children c9b51268668f
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
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
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
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Library General Public
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2 of the License, or (at your option) any later version.
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
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Library General Public License for more details.
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Library General Public
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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 #ifdef SAVE_RCSID
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 static char rcsid =
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 "@(#) $Id$";
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 #endif
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 * XBIOS mouse & joystick vectors
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 * Patrice Mandin
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 .text
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 .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
37 .globl _SDL_AtariXbios_Restore
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 .globl _SDL_AtariXbios_MouseVector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 .globl _SDL_AtariXbios_JoystickVector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 .globl _SDL_AtariXbios_mouseb
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 .globl _SDL_AtariXbios_mousex
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43 .globl _SDL_AtariXbios_mousey
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 .globl _SDL_AtariXbios_joystick
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 /*--- Vector installer ---*/
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 _SDL_AtariXbios_Install:
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 movel sp@(4),a0
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 /* Stop interrupts */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53 movew #0x2700,sr
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 /* Save old mouse vector, set our routine */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56
820
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
57 clrl oldmousevector
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58 movel sp@(8),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 beqs no_new_mouse_vector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60 movel a0@(16),oldmousevector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 movel d0,a0@(16)
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 no_new_mouse_vector:
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 /* Save old joystick vector, set our routine */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65
820
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
66 clrl oldjoystickvector
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67 movel sp@(12),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
68 beqs no_new_joystick_vector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69 movel a0@(24),oldjoystickvector
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
70 movel d0,a0@(24)
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
71 no_new_joystick_vector:
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 /* Restart interrupts */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
74
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
75 movew #0x2300,sr
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
76
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
77 rts
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
78
820
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
79 /*--- Vector restorer ---*/
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
80
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
81 _SDL_AtariXbios_Restore:
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
82 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
83
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
84 /* Stop interrupts */
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 movew #0x2700,sr
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
87
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
88 /* Restore mouse vector */
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
89
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
90 movel oldmousevector,d0
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
91 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
92 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
93 no_restore_mouse:
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
94
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
95 /* Restore joystick vector */
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
96
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
97 movel oldjoystickvector,d0
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
98 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
99 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
100 no_restore_joystick:
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 /* Restart interrupts */
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
103
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
104 movew #0x2300,sr
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
105
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
106 rts
0b9b4bf3c1e7 Important crash fix: system vectors for mouse/joystick were not restored
Patrice Mandin <patmandin@gmail.com>
parents: 305
diff changeset
107
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
108 /*--- Our mouse vector ---*/
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
109
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 .text
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112 .ascii "XBRA"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 .ascii "LSDL"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114 .comm oldmousevector,4*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 _SDL_AtariXbios_MouseVector:
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
116 movel d0,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118 /* Mouse buttons */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 moveb (a0),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120 andw #3,d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 movew d0,_SDL_AtariXbios_mouseb
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123 /* X movement */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
124 moveb a0@(1),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 extw d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 addw d0,_SDL_AtariXbios_mousex
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 /* Y movement */
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129 moveb a0@(2),d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130 extw d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
131 addw d0,_SDL_AtariXbios_mousey
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
133 /* Jump through old vector */
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
134 movel sp@+,d0
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
135
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
136 movel oldmousevector,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
137 rts
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
138
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
139 .data
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
140 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
141 .comm _SDL_AtariXbios_mousex,2*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
142 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
143 .comm _SDL_AtariXbios_mousey,2*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
144 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
145 .comm _SDL_AtariXbios_mouseb,2*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
146
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
147 /*--- Our joystick vector ---*/
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 .text
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
150 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
151 .ascii "XBRA"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
152 .ascii "LSDL"
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
153 .comm oldjoystickvector,4*1
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154 _SDL_AtariXbios_JoystickVector:
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
155 movel d0,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
156
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
157 /* New joystick state */
1063
0fb50bfaea7f Used wrong offset in joystick packet
Patrice Mandin <patmandin@gmail.com>
parents: 987
diff changeset
158 moveb a0@(2),d0
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
159 andw #0x8f,d0
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
160 movew d0,_SDL_AtariXbios_joystick
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
161
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
162 /* Jump through old vector */
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
163 movel sp@+,d0
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
164
987
d9f3b5bb7870 Do not use registers when not necessary
Patrice Mandin <patmandin@gmail.com>
parents: 820
diff changeset
165 movel oldjoystickvector,sp@-
305
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
166 rts
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
167
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
168 .data
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
169 .even
9c6613983e85 Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
170 .comm _SDL_AtariXbios_joystick,2*1