tune the preloads a bit
[sdl_omap.git] / README.OS2
CommitLineData
e14743d1 1
2===========
3SDL on OS/2
4===========
5
6Last updated on May. 17, 2006.
7
8
91. How to compile?
10------------------
11
12To compile this, you'll need the followings installed:
13- The OS/2 Developer's Toolkit
14- The OpenWatcom compiler
15 (http://www.openwatcom.org)
16
17First of all, you have to unzip the Watcom-OS2.zip file. This will result in a
18file called "makefile" and a file called "setvars.cmd" in this folder (and some
19more files...).
20
21Please edit the second, fourth and fifth lines of setvars.cmd file
22to set the folders where the toolkit, the OW compiler and the FSLib are.
23You won't need NASM yet (The Netwide Assembler), you can leave that line.
24Run setvars.cmd, and you should get a shell in which you can
25compile SDL.
26
27Check the "makefile" file. There is a line in there which determines if the
28resulting SDL.DLL will be a 'debug' or a 'release' build. The 'debug' version
29is full of printf()'s, so if something goes wrong, its output can help a lot
30for debugging.
31
32Then run "wmake".
33This should create the SDL12.DLL and the corresponding SDL12.LIB file here.
34
35To test applications, it's a good idea to use the 'debug' build of SDL, and
36redirect the standard output and standard error output to files, to see what
37happens internally in SDL.
38(like: testsprite >stdout.txt 2>stderr.txt)
39
40To rebuild SDL, use the following commands in this folder:
41wmake clean
42wmake
43
44
45
462. How to compile the testapps?
47-------------------------------
48
49Once you have SDL12.DLL compiled, navigate into the 'test' folder, copy in
50there the newly built SDL12.DLL, and copy in there FSLib.DLL.
51
52Then run "wmake" in there to compile some of the testapps.
53
54
55
563. What is missing?
57-------------------
58
59The following things are missing from this SDL implementation:
60- MMX, SSE and 3DNOW! optimized video blitters?
61- HW Video surfaces
62- OpenGL support
63
64
65
664. Special Keys / Full-Screen support
67-------------------------------------
68
69There are two special hot-keys implemented:
70- Alt+Home switches between fullscreen and windowed mode
71- Alt+End simulates closing the window (can be used as a Panic key)
72Only the LEFT Alt key will work.
73
74
75
765. Joysticks on SDL/2
77---------------------
78
79The Joystick detection only works for standard joysticks (2 buttons, 2 axes
80and the like). Therefore, if you use a non-standard joystick, you should
81specify its features in the SDL_OS2_JOYSTICK environment variable in a batch
82file or CONFIG.SYS, so SDL applications can provide full capability to your
83device. The syntax is:
84
85SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS]
86
87So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls,
88the line should be:
89
90SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0
91
92If you want to add spaces in your joystick name, just surround it with
93quotes or double-quotes:
94
95SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0
96
97or
98
99SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0
100
101 Notive However that Balls and Hats are not supported under OS/2, and the
102value will be ignored... but it is wise to define these correctly because
103in the future those can be supported.
104 Also the number of buttons is limited to 2 when using two joysticks,
1054 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
106and 8 when using a joystick with 2 axes. Notice however these are limitations
107of the Joystick Port hardware, not OS/2.
108
109
110
1116. Proportional windows
112-----------------------
113
114For some SDL applications it can be handy to have proportional windows, so
115the windows will keep their aspect ratio when resized.
116This can be achieved in two ways:
117
118- Before starting the given SDL application, set the
119 SDL_USE_PROPORTIONAL_WINDOW environment variable to something, e.g.:
120
121 SET SDL_USE_PROPORTIONAL_WINDOW=1
122 dosbox.exe
123
124- If you have a HOME environment variable set, then SDL will look for a file
125 in there called ".sdl.proportionals". If that file contains the name of the
126 currently running SDL executable, then that process will have proportional
127 windows automatically.
128
129 Please note that this file is created automatically with default values
130 at the first run.
131
132
133
1347. Audio in SDL applications
135----------------------------
136
137Audio effects are one of the most important features in games. Creating audio
138effects in sync with the game and without hickups and pauses in the audio are
139very important things.
140
141However there are multithreaded SDL applications that have tight loops as their
142main logic loop. This kills performance in OS/2, and takes too much CPU from
143other threads in the same process, for example from the thread to create the
144sound effects.
145
146For this reason, the OS/2 port of SDL can be instructed to run the audio thread
147in high priority, which makes sure that there will be enough time for the
148processing of the audio data.
149
150At default, SDL/2 runs the audio thread at ForegroundServer+0 priority. Well
151written and well behaving SDL applications should work well in this mode.
152For other applications, you can tell SDL/2 to run the audio thread at
153TimeCritical priority by setting an env.variable before starting the SDL app:
154
155 SET SDL_USE_TIMECRITICAL_AUDIO=1
156
157Please note that this is a bit risky, because if the SDL application runs a
158tight infinite loop in this thread, this will make the whole system
159unresponsive, so use it with care, and only for applications that need it!
160
161
162
1638. Next steps...
164----------------
165
166Things to do:
167- Implement missing stuffs (look for 'TODO' string in source code!)
168- Finish video driver (the 'wincommon' can be a good example for missing
169 things like application icon and so on...)
170- Enable MMX/SSE/SSE2 acceleration functions
171- Rewrite CDROM support using DOS Ioctl for better support.
172
173
174
1759. Contacts
176-----------
177
178 You can contact the developers for bugs:
179
180 Area Developer email
181 General (Audio/Video/System) Doodle doodle@scenergy.dfmk.hu
182 CDROM and Joystick Caetano daniel@caetano.eng.br
183
184 Notice however that SDL/2 is 'in development' stage so ... if you want to help,
185please, be our guest and contact us!
186
187
188
18910. Changelog of the OS/2 port
190------------------------------
191
192Version 1.2.10 - 2006-05-17 - Doodle
193 - Small modifications for v1.2.10 release
194 - Changed DLL name to include version info (currently SDL12.dll)
195
196Version 1.2 - 2006-05-01 - Doodle
197 - Modified makefile system to have only one makefile
198 - Included FSLib headers, DLL and LIB file
199
200Version 1.2 - 2006-02-26 - Doodle
201 - Updated the official SDL version with the OS/2 specific changes.
202 - Added support for real unicode keycode conversion.
203
204Version 1.2.7 - 2006-01-20 - Doodle
205 - Added support for selectively using timecritical priority for
206 audio threads by SDL_USE_TIMECRITICAL_AUDIO environment variable.
207 (e.g.:
208 SET SDL_USE_TIMECRITICAL_AUDIO=1
209 dosbox.exe
210 )
211
212Version 1.2.7 - 2005-12-22 - Doodle
213 - Added support for proportional SDL windows.
214 There are two ways to have proportional (aspect-keeping) windows for
215 a given SDL application: Either set the SDL_USE_PROPORTIONAL_WINDOW
216 environment variable to something before starting the application
217 (e.g.:
218 SET SDL_USE_PROPORTIONAL_WINDOW=1
219 dosbox.exe
220 )
221 or, if you have the HOME environment variable set, then SDL12.DLL will
222 create a file in that directory called .sdl.proportionals, and you can
223 put there the name of executable files that will be automatically made
224 proportional.
225
226Version 1.2.7 - 2005-10-14 - Doodle
227 - Enabled Exception handler code in FSLib to be able to restore original
228 desktop video mode in case the application crashes.
229 - Added the missing FSLib_Uninitialize() call into SDL.
230 (The lack of it did not cause problems, but it's cleaner this way.)
231 - Fixed a mouse problem in Fullscreen mode where any mouse click
232 re-centered the mouse.
233
234Version 1.2.7 - 2005-10-09 - Doodle
235 - Implemented window icon support
236
237Version 1.2.7 - 2005-10-03 - Doodle
238 - Reworked semaphore support again
239 - Tuned thread priorities
240
241Version 1.2.7 - 2005-10-02 - Doodle
242 - Added support for custom mouse pointers
243 - Fixed WM_CLOSE processing: give a chance to SDL app to ask user...
244 - Added support for MMX-accelerated audio mixers
245 - Other small fixes
246
247Version 1.2.7 - 2005-09-12 - Doodle
248 - Small fixes for DosBox incorporated into public release
249 - Fixed semaphore support (SDL_syssem.c)
250 - Fixed FSLib to have good clipping in scaled window mode,
251 and to prevent occasional desktop freezes.
252
253Version 1.2.7 - 2004-09-08a - Caetano
254 - Improved joystick support (general verifications about hardware).
255 - Added support up to 8 buttons in 2 axes joysticks and 6 buttons in 3 axes joysticks.
256 - Added support to environment variable SDL_OS2_JOYSTICK to specify a joystick.
257 - Improved Joystick test to handle every type of joystick and display only relevant information.
258 - Merged with Doodle 2004-09-08
259 - Little tid up in README.OS2
260 - Added explanation about SDL_OS2_JOYSTICK environment variable on README.OS2
261
262Version 1.2.7 - 2004-09-07 - Caetano
263 - Merged with changes in headers for GCC compiling.
264 - Added Joystick support using basic IBM GAME$ support, allowing it to work with all joystick drivers since OS/2 2.1.
265 - Improved joystick detection (hacked!). OS/2 do not allow real joystick detection, so...
266 - Modified makefile in test to compile "testjoystick". Anyway, it's useless, since it seems to cause a lot of trouble in OS/2 (because os video routines, not Joystick support).
267 - Created separated Joystick test program to test only joystick functions.
268 - Improved joystick auto-centering.
269 - Improved the coordinate correction routine to use two scale factors for each axis.
270
271Version 1.2.7 - 2004-07-05 - Caetano
272 - Corrected the time returned by status in CDROM support (it was incorrect)
273 - Added the testcdrom.c and corrected the linking directive (it was causing an error)
274
275Version 1.2.7 - 2004-07-02a - Caetano
276 - Corrected a little problem in a comment at SDL-1.2.7\test\torturethread.c, line 18 (missing */, nested comment)
277 - Added CDROM support to tree (SDL-1.2.7\src\cdrom\os2\SDL_syscdrom.c)
278 - Modified makefile (SDL-1.2.7\src\makefiles.wat and SDL-1.2.7\watcom.mif) to build with CDROM support
279 - Added the "extra" SDL_types.h forgotten in 2004-07-02 version.
280
281<End-Of-File>