slouken@281
|
1 |
==============================================================================
|
slouken@281
|
2 |
Using the Simple DirectMedia Layer on Atari
|
slouken@281
|
3 |
==============================================================================
|
slouken@281
|
4 |
|
patmandin@1083
|
5 |
|
patmandin@1083
|
6 |
If you want to build SDL from sources to create SDL programs on Atari:
|
patmandin@1083
|
7 |
see sections I - II.
|
patmandin@1083
|
8 |
|
patmandin@1083
|
9 |
If you want to create SDL programs on Atari using SDL binary build,
|
patmandin@1083
|
10 |
download it from my web site (URL at end of this file).
|
patmandin@1083
|
11 |
|
patmandin@1083
|
12 |
If you want to configure a program using SDL on Atari,
|
patmandin@1083
|
13 |
see sections IV - VI.
|
patmandin@1083
|
14 |
|
patmandin@1083
|
15 |
|
slouken@281
|
16 |
==============================================================================
|
slouken@281
|
17 |
I. Building the Simple DirectMedia Layer libraries:
|
slouken@281
|
18 |
(This step isn't necessary if you have the SDL binary distribution)
|
slouken@281
|
19 |
|
slouken@281
|
20 |
Do the classic configure, with --disable-shared --enable-static and:
|
slouken@281
|
21 |
|
slouken@281
|
22 |
Tos version (should run everywhere):
|
slouken@398
|
23 |
--disable-threads
|
slouken@398
|
24 |
Tos does not support threads.
|
slouken@281
|
25 |
|
slouken@281
|
26 |
MiNT version (maybe Magic, only for multitasking OS):
|
slouken@281
|
27 |
--disable-pthreads --enable-pth
|
slouken@281
|
28 |
Mint and Magic may supports threads, so audio can be used with current
|
slouken@281
|
29 |
devices, like Sun audio, or disk-writing support. Like Tos, interrupt
|
slouken@281
|
30 |
audio without threads is more suited for Atari machines.
|
slouken@281
|
31 |
|
slouken@281
|
32 |
Then you can make ; make install it.
|
slouken@281
|
33 |
|
slouken@281
|
34 |
==============================================================================
|
slouken@281
|
35 |
II. Building the Simple DirectMedia Layer test programs:
|
slouken@281
|
36 |
|
slouken@281
|
37 |
Do the classic configure, then make.
|
slouken@281
|
38 |
|
slouken@281
|
39 |
Run them !
|
slouken@281
|
40 |
|
slouken@281
|
41 |
==============================================================================
|
slouken@281
|
42 |
III. Enjoy! :)
|
slouken@281
|
43 |
|
slouken@281
|
44 |
If you have a project you'd like me to know about, or want to ask questions,
|
slouken@281
|
45 |
go ahead and join the SDL developer's mailing list by sending e-mail to:
|
slouken@281
|
46 |
|
slouken@281
|
47 |
sdl-request@libsdl.org
|
slouken@281
|
48 |
|
slouken@281
|
49 |
and put "subscribe" into the subject of the message. Or alternatively you
|
slouken@281
|
50 |
can use the web interface:
|
slouken@281
|
51 |
|
slouken@281
|
52 |
http://www.libsdl.org/mailman/listinfo/sdl
|
slouken@281
|
53 |
|
slouken@281
|
54 |
==============================================================================
|
slouken@281
|
55 |
IV. What is supported:
|
slouken@281
|
56 |
|
slouken@319
|
57 |
Keyboard (GEMDOS, BIOS, GEM, Ikbd)
|
slouken@281
|
58 |
Mouse (XBIOS, GEM, Ikbd)
|
slouken@281
|
59 |
Video (XBIOS (Fullscreen), GEM (Windowed and Fullscreen))
|
slouken@557
|
60 |
Timer (VBL vector, GNU pth library)
|
patmandin@963
|
61 |
Joysticks and joypads (Ikbd, Hardware)
|
patmandin@724
|
62 |
Audio (Hardware, XBIOS, GSXB, MCSN, STFA, /dev/audio if threads enabled)
|
patmandin@724
|
63 |
Threads (Multitasking OS only via GNU pth library)
|
patmandin@724
|
64 |
Shared object loader (using LDG library from http://ldg.atari.org/)
|
patmandin@724
|
65 |
Audio CD (MetaDOS)
|
patmandin@978
|
66 |
OpenGL (using Mesa offscreen rendering driver)
|
slouken@281
|
67 |
|
patmandin@1112
|
68 |
- Dependent driver combinations:
|
patmandin@1112
|
69 |
Video Kbd Mouse Timer Joysticks
|
patmandin@1112
|
70 |
xbios ikbd ikbd vbl(2) ikbd
|
patmandin@1237
|
71 |
xbios gemdos xbios vbl(2) xbios(3)
|
patmandin@1237
|
72 |
xbios bios xbios vbl(2) xbios(3)
|
patmandin@1237
|
73 |
gem gem gem(1) vbl(2) xbios(3)
|
patmandin@1112
|
74 |
|
patmandin@1112
|
75 |
Audio O/S Misc
|
patmandin@1112
|
76 |
dma8 All Uses MFP Timer A interrupt
|
patmandin@1112
|
77 |
xbios TOS Uses MFP Timer A interrupt
|
patmandin@1112
|
78 |
xbios MiNT Uses MiNT thread
|
patmandin@1112
|
79 |
xbios Magic Disabled
|
patmandin@1112
|
80 |
stfa All Uses MFP interrupt
|
patmandin@1112
|
81 |
mcsn TOS Uses MFP Timer A interrupt
|
patmandin@1112
|
82 |
mcsn MiNT Uses MiNT thread
|
patmandin@1112
|
83 |
mcsn Magic Disabled
|
patmandin@1112
|
84 |
gsxb All Uses GSXB callback
|
patmandin@1112
|
85 |
|
patmandin@1112
|
86 |
Joypad driver always uses hardware access.
|
patmandin@1112
|
87 |
OpenGL driver always uses OSMesa.
|
slouken@319
|
88 |
|
slouken@557
|
89 |
(1) GEM does not report relative mouse motion, so xbios mouse driver is used
|
patmandin@1237
|
90 |
to report this type event. Under MiNT, using XBIOS mouse driver is not possible.
|
slouken@281
|
91 |
|
slouken@557
|
92 |
(2) If you build SDL with threads using the GNU pth library, timers are
|
slouken@557
|
93 |
supported via the pth library.
|
slouken@557
|
94 |
|
patmandin@1237
|
95 |
(3) Redirecting XBIOS vectors does not work under MiNT, so it is disabled in
|
patmandin@1237
|
96 |
this case.
|
patmandin@1237
|
97 |
|
slouken@281
|
98 |
==============================================================================
|
slouken@281
|
99 |
V. Environment variables:
|
slouken@281
|
100 |
|
slouken@398
|
101 |
SDL_VIDEODRIVER:
|
slouken@398
|
102 |
Set to 'xbios' to force xbios video driver
|
slouken@398
|
103 |
Set to 'gem' to force gem video driver
|
slouken@398
|
104 |
|
patmandin@1007
|
105 |
SDL_VIDEO_GL_DRIVER:
|
patmandin@1007
|
106 |
Set to filename to load as OpenGL library, if you use SDL_GL_LoadLibrary()
|
patmandin@1007
|
107 |
|
slouken@398
|
108 |
SDL_AUDIODRIVER:
|
patmandin@644
|
109 |
Set to 'mint_gsxb' to force Atari GSXB audio driver
|
patmandin@644
|
110 |
Set to 'mint_mcsn' to force Atari MCSN audio driver
|
patmandin@644
|
111 |
Set to 'mint_stfa' to force Atari STFA audio driver
|
patmandin@644
|
112 |
Set to 'mint_xbios' to force Atari Xbios audio driver
|
patmandin@644
|
113 |
Set to 'mint_dma8' to force Atari 8 bits DMA audio driver
|
slouken@398
|
114 |
Set to 'audio' to force Sun /dev/audio audio driver
|
slouken@398
|
115 |
Set to 'disk' to force disk-writing audio driver
|
slouken@398
|
116 |
|
slouken@281
|
117 |
SDL_ATARI_EVENTSDRIVER
|
slouken@281
|
118 |
Set to 'ikbd' to force IKBD 6301 keyboard driver
|
slouken@281
|
119 |
Set to 'gemdos' to force gemdos keyboard driver
|
slouken@281
|
120 |
Set to 'bios' to force bios keyboard driver
|
slouken@281
|
121 |
|
slouken@302
|
122 |
SDL_JOYSTICK_ATARI:
|
slouken@302
|
123 |
Use any of these strings in the environment variable to enable or
|
slouken@302
|
124 |
disable a joystick:
|
slouken@302
|
125 |
|
slouken@305
|
126 |
'ikbd-joy1-[on|off]' for IKBD joystick on port 1 (hardware access)
|
slouken@305
|
127 |
'xbios-joy1-[on|off]' for IKBD joystick on port 1 (xbios access)
|
slouken@302
|
128 |
'porta-pad-[on|off]' for joypad on port A
|
slouken@302
|
129 |
'porta-joy0-[on|off]' for joystick 0 on port A
|
slouken@302
|
130 |
'porta-joy1-[on|off]' for joystick 1 on port A
|
slouken@302
|
131 |
'porta-lp-[on|off]' for lightpen on port A
|
slouken@302
|
132 |
'porta-anpad-[on|off]' for analog paddle on port A
|
slouken@302
|
133 |
'portb-pad-[on|off]' for joypad on port B
|
slouken@302
|
134 |
'portb-joy0-[on|off]' for joystick 0 on port B
|
slouken@302
|
135 |
'portb-joy1-[on|off]' for joystick 1 on port B
|
slouken@302
|
136 |
'portb-anpad-[on|off]' for analog paddle on port B
|
slouken@302
|
137 |
|
slouken@302
|
138 |
Default configuration is:
|
slouken@302
|
139 |
'ikbd-joy1-on' (if IKBD events driver enabled)
|
slouken@305
|
140 |
'xbios-joy1-on' (if gemdos/bios/gem events driver enabled)
|
slouken@302
|
141 |
'porta-pad-on portb-pad-on' (if available on the machine)
|
slouken@302
|
142 |
|
slouken@302
|
143 |
port[a|b]-[pad|joy?|lp|anpad]-* strings are mutually exclusives.
|
slouken@302
|
144 |
On such a port, you can only use a joypad OR 1 or 2 joysticks OR
|
slouken@302
|
145 |
a lightpen OR an analog paddle. You must disable joypad before
|
slouken@302
|
146 |
setting another controller.
|
slouken@302
|
147 |
|
slouken@302
|
148 |
The second joystick port on IKBD is used by the mouse, so not usable.
|
patmandin@1087
|
149 |
Another problem with the IKBD: mouse buttons and joystick fire buttons
|
patmandin@1087
|
150 |
are wired together at the hardware level, it means:
|
patmandin@1106
|
151 |
port 0 port 0 port 1
|
patmandin@1106
|
152 |
mouse left button = joystick fire 0 = joystick fire 1
|
patmandin@1106
|
153 |
mouse right button = joystick fire 1 = joystick fire 0
|
slouken@302
|
154 |
|
patmandin@963
|
155 |
Descriptions of joysticks/joypads:
|
patmandin@963
|
156 |
- Joypads: 1 hat, 17 buttons (Atari Jaguar console-like).
|
patmandin@963
|
157 |
- Joysticks: 1 hat, 1 button.
|
patmandin@963
|
158 |
- Lightpen, analog paddles: 2 axis, 2 buttons. The 2 buttons are those
|
patmandin@963
|
159 |
affected to 1 button joysticks on the same port.
|
slouken@302
|
160 |
|
slouken@319
|
161 |
==============================================================================
|
slouken@319
|
162 |
VI. More informations about drivers:
|
slouken@319
|
163 |
|
patmandin@1007
|
164 |
OpenGL:
|
patmandin@1007
|
165 |
The default is to use the Mesa offscreen driver (osmesa.ldg). If you want
|
patmandin@1007
|
166 |
to use an older OpenGL implementation, like mesa_gl.ldg or tiny_gl.ldg,
|
patmandin@1007
|
167 |
your program must use SDL_GL_LoadLibrary() to do so, and retrieve the
|
patmandin@1007
|
168 |
needed function pointers with SDL_LoadFunction(). In all cases, the OpenGL
|
patmandin@1007
|
169 |
context is taken care of by SDL itself, you just have to use gl* functions.
|
patmandin@1007
|
170 |
|
patmandin@1007
|
171 |
However, there is one OpenGL call that has a different prototype in the old
|
patmandin@1007
|
172 |
implementations: glOrtho(). In the old implementations, it has 6 float as
|
patmandin@1007
|
173 |
parameters, in the standard one, it has 6 double parameters. If you want
|
patmandin@1007
|
174 |
to compile testdyngl, or any other SDL program that loads its OpenGL
|
patmandin@1007
|
175 |
library, you must change the glOrtho() prototype used in this program. In
|
patmandin@1064
|
176 |
osmesa.ldg, you can retrieve a glOrtho() with double parameters, by
|
patmandin@1064
|
177 |
searching for the function "glOrtho6d".
|
patmandin@1007
|
178 |
|
slouken@319
|
179 |
Xbios video:
|
slouken@319
|
180 |
Video chip is detected using the _VDO cookie.
|
slouken@319
|
181 |
Screen enhancers are not supported, but could be if you know how to
|
slouken@319
|
182 |
use them.
|
slouken@319
|
183 |
|
slouken@319
|
184 |
ST, STE, Mega ST, Mega STE:
|
slouken@319
|
185 |
320x200x4 bits, shades of grey, available only for the purpose
|
slouken@319
|
186 |
of testing SDL.
|
slouken@319
|
187 |
TT:
|
slouken@319
|
188 |
320x480x8 and 320x240x8 (software double-lined mode).
|
slouken@319
|
189 |
Falcon:
|
slouken@319
|
190 |
All modes supported by the current monitor (RVB or VGA).
|
patmandin@1064
|
191 |
BlowUp and Centscreen extended modes, ScreenBlaster 3 current mode.
|
slouken@319
|
192 |
Clones and any machine with monochrome monitor:
|
slouken@319
|
193 |
Not supported.
|
slouken@319
|
194 |
|
slouken@319
|
195 |
Gem video:
|
slouken@319
|
196 |
Automatically used if xbios not available.
|
slouken@319
|
197 |
|
slouken@319
|
198 |
All machines:
|
slouken@319
|
199 |
Only the current resolution, if 8 bits or higher depth.
|
slouken@319
|
200 |
|
slouken@319
|
201 |
IKBD keyboard, mouse and joystick driver:
|
slouken@319
|
202 |
Available if _MCH cookie is ST, Mega ST, STE, Mega STE, TT or Falcon.
|
slouken@319
|
203 |
|
slouken@319
|
204 |
Hades has an IKBD, but xbios is not available for video, so IKBD
|
slouken@319
|
205 |
driver is disabled.
|
slouken@319
|
206 |
|
slouken@319
|
207 |
Gemdos and bios keyboard driver:
|
slouken@319
|
208 |
Available on all machines.
|
slouken@319
|
209 |
|
slouken@319
|
210 |
Mouse and joystick xbios driver:
|
slouken@319
|
211 |
Available on all machines (I think).
|
slouken@319
|
212 |
|
slouken@319
|
213 |
Joypad driver:
|
slouken@319
|
214 |
Available if _MCH cookie is STE or Falcon.
|
slouken@319
|
215 |
|
slouken@557
|
216 |
PTH timer driver:
|
slouken@557
|
217 |
Available with multitasking OS.
|
slouken@557
|
218 |
|
slouken@319
|
219 |
VBL timer driver:
|
slouken@398
|
220 |
Available on all machines (I think).
|
slouken@398
|
221 |
|
patmandin@644
|
222 |
Audio drivers:
|
patmandin@644
|
223 |
Cookies _SND, MCSN, STFA and GSXB used to detect supported audio
|
patmandin@1112
|
224 |
capabilities.
|
slouken@398
|
225 |
|
slouken@398
|
226 |
STE, Mega STE, TT:
|
slouken@398
|
227 |
8 bits DMA (hardware access)
|
patmandin@644
|
228 |
STFA, MCSN or GSXB driver if installed
|
patmandin@644
|
229 |
Falcon:
|
patmandin@644
|
230 |
8 bits DMA (hardware access)
|
slouken@398
|
231 |
Xbios functions
|
patmandin@644
|
232 |
STFA, MCSN or GSXB driver if installed
|
slouken@398
|
233 |
Other machines:
|
patmandin@644
|
234 |
STFA, MCSN or GSXB driver if installed
|
patmandin@644
|
235 |
|
patmandin@644
|
236 |
STFA driver:
|
patmandin@644
|
237 |
http://removers.free.fr/softs/stfa.html
|
patmandin@644
|
238 |
GSXB driver:
|
patmandin@644
|
239 |
http://assemsoft.atari.org/gsxb/
|
patmandin@644
|
240 |
MacSound driver:
|
patmandin@644
|
241 |
http://jf.omnis.ch/software/tos/
|
patmandin@644
|
242 |
MagicSound driver (MCSN,GSXB compatible):
|
patmandin@644
|
243 |
http://perso.wanadoo.fr/didierm/
|
patmandin@644
|
244 |
X-Sound driver (GSXB compatible):
|
patmandin@644
|
245 |
http://www.uni-ulm.de/~s_thuth/atari/xsound_e.html
|
slouken@319
|
246 |
|
slouken@281
|
247 |
--
|
slouken@281
|
248 |
Patrice Mandin <pmandin@caramail.com>
|
slouken@314
|
249 |
http://membres.lycos.fr/pmandin/
|