README.OS2
changeset 1442 e3242177fe4a
parent 1190 173c063d4f55
child 1659 14717b52abc0
equal deleted inserted replaced
1441:b9f034536fa0 1442:e3242177fe4a
     1 
     1 
     2 ===========
     2 ===========
     3 SDL on OS/2
     3 SDL on OS/2
     4 ===========
     4 ===========
     5 
     5 
     6 Last updated on Oct 02, 2005.
     6 Last updated on Feb. 26, 2006.
     7 
     7 
     8 
     8 
     9 1. How to compile?
     9 1. How to compile?
    10 ------------------
    10 ------------------
    11 
    11 
    13 - The OS/2 Developer's Toolkit
    13 - The OS/2 Developer's Toolkit
    14 - The OpenWatcom compiler 
    14 - The OpenWatcom compiler 
    15   (http://www.openwatcom.org)
    15   (http://www.openwatcom.org)
    16 - The FSLib library
    16 - The FSLib library
    17   (ftp://ftp.netlabs.org/pub/SDL)
    17   (ftp://ftp.netlabs.org/pub/SDL)
       
    18 
       
    19 First of all, you have to put the OS/2-specific Watcom makefiles into the
       
    20 source code tree by unzipping the file Watcom-OS2.zip here.  This will
       
    21 result in a Watcom.mif and a setvars.cmd file in this folder, and several
       
    22 Makefile.wat files in the src\ folder and in some of its subfolders.
    18 
    23 
    19 Please edit the second, fourth and fifth lines of setvars.cmd file
    24 Please edit the second, fourth and fifth lines of setvars.cmd file
    20 to set the folders where the toolkit, the OW compiler and the FSLib are. 
    25 to set the folders where the toolkit, the OW compiler and the FSLib are. 
    21 You won't need NASM yet (The Netwide Assembler), you can leave that line.
    26 You won't need NASM yet (The Netwide Assembler), you can leave that line.
    22 Run setvars.cmd, and you should get a shell in which you can
    27 Run setvars.cmd, and you should get a shell in which you can
   105 and 8 when using a joystick with 2 axes. Notice however these are limitations 
   110 and 8 when using a joystick with 2 axes. Notice however these are limitations 
   106 of the Joystick Port hardware, not OS/2.
   111 of the Joystick Port hardware, not OS/2.
   107 
   112 
   108 
   113 
   109 
   114 
   110 6. Next steps...
   115 6. Proportional windows
       
   116 -----------------------
       
   117 
       
   118 For some SDL applications it can be handy to have proportional windows, so
       
   119 the windows will keep their aspect ratio when resized.
       
   120 This can be achieved in two ways:
       
   121 
       
   122 - Before starting the given SDL application, set the
       
   123   SDL_USE_PROPORTIONAL_WINDOW environment variable to something, e.g.:
       
   124 
       
   125   SET SDL_USE_PROPORTIONAL_WINDOW=1
       
   126   dosbox.exe
       
   127 
       
   128 - If you have a HOME environment variable set, then SDL will look for a file
       
   129   in there called ".sdl.proportionals". If that file contains the name of the
       
   130   currently running SDL executable, then that process will have proportional
       
   131   windows automatically.
       
   132 
       
   133   Please note that this file is created automatically with default values
       
   134   at the first run.
       
   135 
       
   136 
       
   137 
       
   138 7. Audio in SDL applications
       
   139 ----------------------------
       
   140 
       
   141 Audio effects are one of the most important features in games. Creating audio
       
   142 effects in sync with the game and without hickups and pauses in the audio are
       
   143 very important things.
       
   144 
       
   145 However there are multithreaded SDL applications that have tight loops as their
       
   146 main logic loop. This kills performance in OS/2, and takes too much CPU from
       
   147 other threads in the same process, for example from the thread to create the 
       
   148 sound effects.
       
   149 
       
   150 For this reason, the OS/2 port of SDL can be instructed to run the audio thread
       
   151 in high priority, which makes sure that there will be enough time for the 
       
   152 processing of the audio data.
       
   153 
       
   154 At default, SDL/2 runs the audio thread at ForegroundServer+0 priority. Well 
       
   155 written and well behaving SDL applications should work well in this mode.
       
   156 For other applications, you can tell SDL/2 to run the audio thread at 
       
   157 TimeCritical priority by setting an env.variable before starting the SDL app:
       
   158 
       
   159     SET SDL_USE_TIMECRITICAL_AUDIO=1
       
   160 
       
   161 Please note that this is a bit risky, because if the SDL application runs a
       
   162 tight infinite loop in this thread, this will make the whole system 
       
   163 unresponsive, so use it with care, and only for applications that need it!
       
   164 
       
   165 
       
   166 
       
   167 8. Next steps...
   111 ----------------
   168 ----------------
   112 
   169 
   113 Things to do:
   170 Things to do:
   114 - Implement missing stuffs (look for 'TODO' string in source code!)
   171 - Implement missing stuffs (look for 'TODO' string in source code!)
   115 - Finish video driver (the 'wincommon' can be a good example for missing
   172 - Finish video driver (the 'wincommon' can be a good example for missing
   117 - Enable MMX/SSE/SSE2 acceleration functions
   174 - Enable MMX/SSE/SSE2 acceleration functions
   118 - Rewrite CDROM support using DOS Ioctl for better support.
   175 - Rewrite CDROM support using DOS Ioctl for better support.
   119 
   176 
   120 
   177 
   121 
   178 
   122 7. Contacts
   179 9. Contacts
   123 -----------
   180 -----------
   124 
   181 
   125    You can contact the developers for bugs:
   182    You can contact the developers for bugs:
   126 
   183 
   127    Area					Developer		email
   184    Area					Developer		email
   129    CDROM and Joystick			Caetano			daniel@caetano.eng.br
   186    CDROM and Joystick			Caetano			daniel@caetano.eng.br
   130 
   187 
   131    Notice however that SDL/2 is 'in development' stage so ... if you want to help,
   188    Notice however that SDL/2 is 'in development' stage so ... if you want to help,
   132 please, be our guest and contact us!
   189 please, be our guest and contact us!
   133 
   190 
       
   191 
       
   192 
       
   193 10. Changelog of the OS/2 port
       
   194 ------------------------------
       
   195 
       
   196 Version 1.2 - 2006-02-26  - Doodle
       
   197  - Updated the official SDL version with the OS/2 specific changes.
       
   198  - Added support for real unicode keycode conversion.
       
   199 
       
   200 Version 1.2.7 - 2006-01-20  - Doodle
       
   201  - Added support for selectively using timecritical priority for
       
   202    audio threads by SDL_USE_TIMECRITICAL_AUDIO environment variable.
       
   203    (e.g.: 
       
   204     SET SDL_USE_TIMECRITICAL_AUDIO=1
       
   205     dosbox.exe
       
   206    )
       
   207 
       
   208 Version 1.2.7 - 2005-12-22  - Doodle
       
   209  - Added support for proportional SDL windows.
       
   210    There are two ways to have proportional (aspect-keeping) windows for
       
   211    a given SDL application: Either set the SDL_USE_PROPORTIONAL_WINDOW
       
   212    environment variable to something before starting the application
       
   213    (e.g.: 
       
   214     SET SDL_USE_PROPORTIONAL_WINDOW=1
       
   215     dosbox.exe
       
   216    )
       
   217    or, if you have the HOME environment variable set, then SDL.DLL will
       
   218    create a file in that directory called .sdl.proportionals, and you can
       
   219    put there the name of executable files that will be automatically made
       
   220    proportional.
       
   221 
       
   222 Version 1.2.7 - 2005-10-14  - Doodle
       
   223  - Enabled Exception handler code in FSLib to be able to restore original
       
   224    desktop video mode in case the application crashes.
       
   225  - Added the missing FSLib_Uninitialize() call into SDL.
       
   226    (The lack of it did not cause problems, but it's cleaner this way.)
       
   227  - Fixed a mouse problem in Fullscreen mode where any mouse click
       
   228    re-centered the mouse.
       
   229 
       
   230 Version 1.2.7 - 2005-10-09  - Doodle
       
   231  - Implemented window icon support
       
   232 
       
   233 Version 1.2.7 - 2005-10-03  - Doodle
       
   234  - Reworked semaphore support again
       
   235  - Tuned thread priorities
       
   236 
       
   237 Version 1.2.7 - 2005-10-02  - Doodle
       
   238  - Added support for custom mouse pointers
       
   239  - Fixed WM_CLOSE processing: give a chance to SDL app to ask user...
       
   240  - Added support for MMX-accelerated audio mixers
       
   241  - Other small fixes
       
   242 
       
   243 Version 1.2.7 - 2005-09-12  - Doodle
       
   244  - Small fixes for DosBox incorporated into public release
       
   245  - Fixed semaphore support (SDL_syssem.c)
       
   246  - Fixed FSLib to have good clipping in scaled window mode,
       
   247    and to prevent occasional desktop freezes.
       
   248 
       
   249 Version 1.2.7 - 2004-09-08a - Caetano
       
   250 	- Improved joystick support (general verifications about hardware).
       
   251 	- Added support up to 8 buttons in 2 axes joysticks and 6 buttons in 3 axes joysticks.
       
   252 	- Added support to environment variable SDL_OS2_JOYSTICK to specify a joystick.
       
   253 	- Improved Joystick test to handle every type of joystick and display only relevant information.
       
   254 	- Merged with Doodle 2004-09-08
       
   255 	- Little tid up in README.OS2
       
   256 	- Added explanation about SDL_OS2_JOYSTICK environment variable on README.OS2
       
   257 
       
   258 Version 1.2.7 - 2004-09-07 - Caetano
       
   259 	- Merged with changes in headers for GCC compiling.
       
   260 	- Added Joystick support using basic IBM GAME$ support, allowing it to work with all joystick drivers since OS/2 2.1.
       
   261 	- Improved joystick detection (hacked!). OS/2 do not allow real joystick detection, so... 
       
   262 	- 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).
       
   263 	- Created separated Joystick test program to test only joystick functions.
       
   264 	- Improved joystick auto-centering.
       
   265 	- Improved the coordinate correction routine to use two scale factors for each axis.
       
   266 
       
   267 Version 1.2.7 - 2004-07-05 - Caetano
       
   268 	- Corrected the time returned by status in CDROM support (it was incorrect)
       
   269 	- Added the testcdrom.c and corrected the linking directive (it was causing an error)
       
   270 
       
   271 Version 1.2.7 - 2004-07-02a - Caetano
       
   272 	- Corrected a little problem in a comment at SDL-1.2.7\test\torturethread.c, line 18 (missing */, nested comment)
       
   273 	- Added CDROM support to tree (SDL-1.2.7\src\cdrom\os2\SDL_syscdrom.c)
       
   274 	- Modified makefile (SDL-1.2.7\src\makefiles.wat and SDL-1.2.7\watcom.mif) to build with CDROM support
       
   275 	- Added the "extra" SDL_types.h forgotten in 2004-07-02 version.
       
   276 
       
   277 <End-Of-File>