Skip to content

Latest commit

 

History

History
262 lines (191 loc) · 9.65 KB

README.OS2

File metadata and controls

262 lines (191 loc) · 9.65 KB
 
Nov 23, 2005
Nov 23, 2005
1
2
3
4
5
6
7
8
9
===========
SDL on OS/2
===========
1. How to compile?
------------------
Feb 12, 2021
Feb 12, 2021
10
11
12
Open Watcom 1.9 (http://www.openwatcom.org) or newer is tested.
For the new Open Watcom V2 fork, see: https://github.com/open-watcom/ and
https://open-watcom.github.io
Feb 26, 2006
Feb 26, 2006
13
Feb 12, 2021
Feb 12, 2021
14
15
WATCOM ervironment variable must to be set to the Open Watcom install
directory. To compile, run: wmake -f Makefile.os2
Nov 23, 2005
Nov 23, 2005
16
Feb 12, 2021
Feb 12, 2021
17
Check the "Makefile.os2" file. There is a line in there which determines if the
May 2, 2006
May 2, 2006
18
19
20
resulting SDL.DLL will be a 'debug' or a 'release' build. The 'debug' version
is full of printf()'s, so if something goes wrong, its output can help a lot
for debugging.
Nov 23, 2005
Nov 23, 2005
21
22
Feb 12, 2021
Feb 12, 2021
23
24
25
26
2. Video drivers
----------------
See SDL_config_os2.h for two OS/2 video drivers:
Nov 23, 2005
Nov 23, 2005
27
Feb 12, 2021
Feb 12, 2021
28
29
30
- SDL_VIDEO_DRIVER_OS2FS: The old OS/2 Video Output using FSLib.
Disabled by default. Requires FSLib.dll and preinstalled SciTech SNAP
graphics drivers.
Nov 23, 2005
Nov 23, 2005
31
Feb 12, 2021
Feb 12, 2021
32
33
- SDL_VIDEO_DRIVER_OS2GROP: New OS/2 video output driver using 'GrOp'
library. Enabled by default.
Nov 23, 2005
Nov 23, 2005
34
Feb 12, 2021
Feb 12, 2021
35
36
37
You can set the SDL_VIDEODRIVER environment variable to select/control
the video output drivers. E.g.:
SET SDL_VIDEODRIVER=DIVE
Nov 23, 2005
Nov 23, 2005
38
Feb 12, 2021
Feb 12, 2021
39
Valid values for the GrOp driver:
Nov 23, 2005
Nov 23, 2005
40
Feb 12, 2021
Feb 12, 2021
41
42
43
- DIVE: This is the default. Allows you to easily scale the window.
For full-screen mode uses the current video mode and maximized PM
window with scaled image.
Nov 23, 2005
Nov 23, 2005
44
Feb 12, 2021
Feb 12, 2021
45
46
47
- VMAN: Low-level access to the video system.
For full-screen mode uses the current video mode and maximized PM
window with centered image.
Nov 23, 2005
Nov 23, 2005
48
Feb 12, 2021
Feb 12, 2021
49
50
51
- VMANFS: More productive. Uses real fullscreen mode.
Video mode switching in VMAN subsystem is unstable and may cause
system hang. Use it at your own risk!
Nov 23, 2005
Nov 23, 2005
52
Feb 12, 2021
Feb 12, 2021
53
Valid values for the FSLib driver:
Nov 23, 2005
Nov 23, 2005
54
Feb 12, 2021
Feb 12, 2021
55
56
57
- FSLIB: Chooses the FSLib driver, if was enabled at compile time.
OpenGL is not supported by any of the drivers.
Nov 23, 2005
Nov 23, 2005
58
Feb 12, 2021
Feb 12, 2021
59
60
61
You may significantly increase video output speed with OS4 kernel and patched
files vman.dll and dive.dll or with latest versions of ACPI support and video
driver Panorama.
Nov 23, 2005
Nov 23, 2005
62
Feb 12, 2021
Feb 12, 2021
63
64
65
You may significantly increase video output speed with OS4 kernel and patched
files vman.dll and dive.dll or with latest versions of ACPI support and video
driver Panorama.
Nov 23, 2005
Nov 23, 2005
66
Feb 12, 2021
Feb 12, 2021
67
68
69
Latest versions of OS/4 kernel:
http://gus.biysk.ru/os4/
(Info: https://www.os2world.com/wiki/index.php/Phoenix_OS/4)
Nov 23, 2005
Nov 23, 2005
70
Feb 12, 2021
Feb 12, 2021
71
72
73
74
75
Patched files vman.dll and dive.dll:
http://gus.biysk.ru/os4/test/pached_dll/PATCHED_DLL.RAR
3. Special Keys / Full-Screen support
Nov 23, 2005
Nov 23, 2005
76
77
78
79
80
-------------------------------------
There are two special hot-keys implemented:
- Alt+Home switches between fullscreen and windowed mode
- Alt+End simulates closing the window (can be used as a Panic key)
Feb 12, 2021
Feb 12, 2021
81
Only the LEFT Alt key will work.
Nov 23, 2005
Nov 23, 2005
82
83
Feb 12, 2021
Feb 12, 2021
84
85
4. Joysticks in SDL
-------------------
Nov 23, 2005
Nov 23, 2005
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
The Joystick detection only works for standard joysticks (2 buttons, 2 axes
and the like). Therefore, if you use a non-standard joystick, you should
specify its features in the SDL_OS2_JOYSTICK environment variable in a batch
file or CONFIG.SYS, so SDL applications can provide full capability to your
device. The syntax is:
SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS]
So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls,
the line should be:
SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0
If you want to add spaces in your joystick name, just surround it with
quotes or double-quotes:
SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0
or
SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0
Notive However that Balls and Hats are not supported under OS/2, and the
value will be ignored... but it is wise to define these correctly because
in the future those can be supported.
Also the number of buttons is limited to 2 when using two joysticks,
4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
and 8 when using a joystick with 2 axes. Notice however these are limitations
of the Joystick Port hardware, not OS/2.
Feb 12, 2021
Feb 12, 2021
119
120
5. Proportional windows (FSLib driver only)
-------------------------------------------
Feb 26, 2006
Feb 26, 2006
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
For some SDL applications it can be handy to have proportional windows, so
the windows will keep their aspect ratio when resized.
This can be achieved in two ways:
- Before starting the given SDL application, set the
SDL_USE_PROPORTIONAL_WINDOW environment variable to something, e.g.:
SET SDL_USE_PROPORTIONAL_WINDOW=1
dosbox.exe
- If you have a HOME environment variable set, then SDL will look for a file
in there called ".sdl.proportionals". If that file contains the name of the
currently running SDL executable, then that process will have proportional
windows automatically.
Please note that this file is created automatically with default values
at the first run.
Feb 12, 2021
Feb 12, 2021
141
6. Audio in SDL applications
Feb 26, 2006
Feb 26, 2006
142
143
----------------------------
Feb 12, 2021
Feb 12, 2021
144
145
146
The OS/2 port of SDL can be instructed to run the audio thread in high
priority, which makes sure that there will be enough time for the processing
of the audio data.
Feb 26, 2006
Feb 26, 2006
147
Feb 12, 2021
Feb 12, 2021
148
By default, SDL runs the audio thread at ForegroundServer+0 priority. Well
Feb 26, 2006
Feb 26, 2006
149
written and well behaving SDL applications should work well in this mode.
Feb 12, 2021
Feb 12, 2021
150
151
152
For other applications, you can tell SDL to run the audio thread at
TimeCritical priority by setting an environment variable before starting the
SDL app:
Feb 26, 2006
Feb 26, 2006
153
154
155
156
157
158
159
160
SET SDL_USE_TIMECRITICAL_AUDIO=1
Please note that this is a bit risky, because if the SDL application runs a
tight infinite loop in this thread, this will make the whole system
unresponsive, so use it with care, and only for applications that need it!
Feb 12, 2021
Feb 12, 2021
161
7. Authors
Nov 23, 2005
Nov 23, 2005
162
163
-----------
Feb 12, 2021
Feb 12, 2021
164
165
166
- Andrey Vasilkin <digi@os2.snc.ru> Video (GrOp library)
- Doodle <doodle@scenergy.dfmk.hu> General (Audio/Video/System)
- Caetano <daniel@caetano.eng.br> CDROM and Joystick
Nov 23, 2005
Nov 23, 2005
167
Feb 26, 2006
Feb 26, 2006
168
Feb 12, 2021
Feb 12, 2021
169
8. Changelog of the OS/2 port
Feb 26, 2006
Feb 26, 2006
170
171
------------------------------
Feb 12, 2021
Feb 12, 2021
172
173
174
Version 1.2.16 - 2021-01-22
- Imported new video driver (os2grop) by Andrey Vasilkin
May 17, 2006
May 17, 2006
175
176
177
178
Version 1.2.10 - 2006-05-17 - Doodle
- Small modifications for v1.2.10 release
- Changed DLL name to include version info (currently SDL12.dll)
May 2, 2006
May 2, 2006
179
180
181
182
Version 1.2 - 2006-05-01 - Doodle
- Modified makefile system to have only one makefile
- Included FSLib headers, DLL and LIB file
Feb 26, 2006
Feb 26, 2006
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
Version 1.2 - 2006-02-26 - Doodle
- Updated the official SDL version with the OS/2 specific changes.
- Added support for real unicode keycode conversion.
Version 1.2.7 - 2006-01-20 - Doodle
- Added support for selectively using timecritical priority for
audio threads by SDL_USE_TIMECRITICAL_AUDIO environment variable.
(e.g.:
SET SDL_USE_TIMECRITICAL_AUDIO=1
dosbox.exe
)
Version 1.2.7 - 2005-12-22 - Doodle
- Added support for proportional SDL windows.
There are two ways to have proportional (aspect-keeping) windows for
a given SDL application: Either set the SDL_USE_PROPORTIONAL_WINDOW
environment variable to something before starting the application
(e.g.:
SET SDL_USE_PROPORTIONAL_WINDOW=1
dosbox.exe
)
May 17, 2006
May 17, 2006
204
or, if you have the HOME environment variable set, then SDL12.DLL will
Feb 26, 2006
Feb 26, 2006
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
create a file in that directory called .sdl.proportionals, and you can
put there the name of executable files that will be automatically made
proportional.
Version 1.2.7 - 2005-10-14 - Doodle
- Enabled Exception handler code in FSLib to be able to restore original
desktop video mode in case the application crashes.
- Added the missing FSLib_Uninitialize() call into SDL.
(The lack of it did not cause problems, but it's cleaner this way.)
- Fixed a mouse problem in Fullscreen mode where any mouse click
re-centered the mouse.
Version 1.2.7 - 2005-10-09 - Doodle
- Implemented window icon support
Version 1.2.7 - 2005-10-03 - Doodle
- Reworked semaphore support again
- Tuned thread priorities
Version 1.2.7 - 2005-10-02 - Doodle
- Added support for custom mouse pointers
- Fixed WM_CLOSE processing: give a chance to SDL app to ask user...
- Added support for MMX-accelerated audio mixers
- Other small fixes
Version 1.2.7 - 2005-09-12 - Doodle
- Small fixes for DosBox incorporated into public release
- Fixed semaphore support (SDL_syssem.c)
- Fixed FSLib to have good clipping in scaled window mode,
and to prevent occasional desktop freezes.
Version 1.2.7 - 2004-09-08a - Caetano
- Improved joystick support (general verifications about hardware).
- Added support up to 8 buttons in 2 axes joysticks and 6 buttons in 3 axes joysticks.
- Added support to environment variable SDL_OS2_JOYSTICK to specify a joystick.
- Improved Joystick test to handle every type of joystick and display only relevant information.
- Merged with Doodle 2004-09-08
- Little tid up in README.OS2
- Added explanation about SDL_OS2_JOYSTICK environment variable on README.OS2
Version 1.2.7 - 2004-09-07 - Caetano
- Merged with changes in headers for GCC compiling.
- Added Joystick support using basic IBM GAME$ support, allowing it to work with all joystick drivers since OS/2 2.1.
- Improved joystick detection (hacked!). OS/2 do not allow real joystick detection, so...
- 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).
- Created separated Joystick test program to test only joystick functions.
- Improved joystick auto-centering.
- Improved the coordinate correction routine to use two scale factors for each axis.
Version 1.2.7 - 2004-07-05 - Caetano
- Corrected the time returned by status in CDROM support (it was incorrect)
- Added the testcdrom.c and corrected the linking directive (it was causing an error)
Version 1.2.7 - 2004-07-02a - Caetano
- Corrected a little problem in a comment at SDL-1.2.7\test\torturethread.c, line 18 (missing */, nested comment)
- Added CDROM support to tree (SDL-1.2.7\src\cdrom\os2\SDL_syscdrom.c)
- Modified makefile (SDL-1.2.7\src\makefiles.wat and SDL-1.2.7\watcom.mif) to build with CDROM support
- Added the "extra" SDL_types.h forgotten in 2004-07-02 version.