Mercurial > sdl-ios-xcode
annotate src/video/ataricommon/SDL_xbiosinterrupt.S @ 968:4675910b0b7b
Date: Mon, 11 Oct 2004 15:17:27 +0300 (EEST)
From: Hannu Savolainen
Subject: Re: SDL uses obsolete OSS features
I did some work on getting OSS to work better with SDL. There have been
some problems with select which should be fixed now.
I'm having some problems in understanding what is the purpose of the
DSP_WaitAudio() routine. I added a return to the very beginning of this
routine and commendted out the define for USE_BLOCKING_WRITES. At least
lbreakout2 seems to work as well as earlier. The latencies are the same.
An ordinary blocking write does exactly the same thing than DSP_WaitAudio
does. So I would recommend using the USE_BLOCKING_WRITES approach and
removing everything from the DSP_WaitAudio routine. Also enabling
USE_BLOCKING_WRITES makes it possible to simplify DSP_PlayAudio() because
you don't need to handle the partial writes (the do-while loop).
Attached is a patch against SDL-1.2.7. After these changes SDL will use
OSS as it's designed to be used (make it as simple as possible). This code
should work with all OSS implementations because it uses only the very
fundamental features that have been there since the jurassic times.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 12 Nov 2004 21:39:04 +0000 |
parents | 0b9b4bf3c1e7 |
children | d9f3b5bb7870 |
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: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 moveml d0/a1,sp@- |
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 */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
134 movel oldmousevector,a1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
135 jsr (a1) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
136 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
137 moveml sp@+,d0/a1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
138 rts |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
139 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
140 .data |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
141 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
142 .comm _SDL_AtariXbios_mousex,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
143 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
144 .comm _SDL_AtariXbios_mousey,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
145 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
146 .comm _SDL_AtariXbios_mouseb,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
147 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
148 /*--- Our joystick vector ---*/ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
149 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
150 .text |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
151 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
152 .ascii "XBRA" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
153 .ascii "LSDL" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
154 .comm oldjoystickvector,4*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
155 _SDL_AtariXbios_JoystickVector: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
156 moveml d0/a1,sp@- |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
157 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
158 /* New joystick state */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
159 moveb a0@(1),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
160 andw #0x8f,d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
161 movew d0,_SDL_AtariXbios_joystick |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
162 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
163 /* Jump through old vector */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
164 movel oldjoystickvector,a1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
165 jsr (a1) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
166 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
167 moveml sp@+,d0/a1 |
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 |