Mercurial > sdl-ios-xcode
annotate src/video/ataricommon/SDL_xbiosinterrupt.S @ 466:91d9a962e126
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 24 Aug 2002 16:17:05 +0000 |
parents | 9c6613983e85 |
children | 0b9b4bf3c1e7 |
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 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 .globl _SDL_AtariXbios_MouseVector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 .globl _SDL_AtariXbios_JoystickVector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 .globl _SDL_AtariXbios_mouseb |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 .globl _SDL_AtariXbios_mousex |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 .globl _SDL_AtariXbios_mousey |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 .globl _SDL_AtariXbios_joystick |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 /*--- Vector installer ---*/ |
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 _SDL_AtariXbios_Install: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 movel sp@(4),a0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
50 /* Stop interrupts */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
51 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
52 movew #0x2700,sr |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
53 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 /* Save old mouse vector, set our routine */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
55 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 movel sp@(8),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 beqs no_new_mouse_vector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
58 movel a0@(16),oldmousevector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 movel d0,a0@(16) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
60 no_new_mouse_vector: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
61 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
62 /* Save old joystick vector, set our routine */ |
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 movel sp@(12),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 beqs no_new_joystick_vector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
66 movel a0@(24),oldjoystickvector |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 movel d0,a0@(24) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
68 no_new_joystick_vector: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
69 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 /* Restart interrupts */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
72 movew #0x2300,sr |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 rts |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
75 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
76 /*--- Our mouse vector ---*/ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
77 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
78 .text |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
79 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
80 .ascii "XBRA" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
81 .ascii "LSDL" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
82 .comm oldmousevector,4*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
83 _SDL_AtariXbios_MouseVector: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
84 moveml d0/a1,sp@- |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
85 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
86 /* Mouse buttons */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
87 moveb (a0),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
88 andw #3,d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 movew d0,_SDL_AtariXbios_mouseb |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
90 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 /* X movement */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 moveb a0@(1),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
93 extw d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
94 addw d0,_SDL_AtariXbios_mousex |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
95 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
96 /* Y movement */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
97 moveb a0@(2),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
98 extw d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
99 addw d0,_SDL_AtariXbios_mousey |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
100 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
101 /* Jump through old vector */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
102 movel oldmousevector,a1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
103 jsr (a1) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
104 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 moveml sp@+,d0/a1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
106 rts |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 .data |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
109 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
110 .comm _SDL_AtariXbios_mousex,2*1 |
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 .comm _SDL_AtariXbios_mousey,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
114 .comm _SDL_AtariXbios_mouseb,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
115 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 /*--- Our joystick vector ---*/ |
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 .text |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
119 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
120 .ascii "XBRA" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 .ascii "LSDL" |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 .comm oldjoystickvector,4*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 _SDL_AtariXbios_JoystickVector: |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 moveml d0/a1,sp@- |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 /* New joystick state */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 moveb a0@(1),d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
128 andw #0x8f,d0 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
129 movew d0,_SDL_AtariXbios_joystick |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
130 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
131 /* Jump through old vector */ |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
132 movel oldjoystickvector,a1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
133 jsr (a1) |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
134 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
135 moveml sp@+,d0/a1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
136 rts |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
137 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
138 .data |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
139 .even |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
140 .comm _SDL_AtariXbios_joystick,2*1 |
9c6613983e85
Atari port cleanups from Patrice
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
141 |