annotate README.OS2 @ 1276:ca3718c215af

Wacky! :)
author Sam Lantinga <slouken@libsdl.org>
date Fri, 27 Jan 2006 07:02:19 +0000
parents 173c063d4f55
children e3242177fe4a
rev   line source
1190
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
1
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
2 ===========
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
3 SDL on OS/2
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
4 ===========
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
5
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
6 Last updated on Oct 02, 2005.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
7
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
8
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
9 1. How to compile?
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
10 ------------------
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
11
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
12 To compile this, you'll need the followings installed:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
13 - The OS/2 Developer's Toolkit
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
14 - The OpenWatcom compiler
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
15 (http://www.openwatcom.org)
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
16 - The FSLib library
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
17 (ftp://ftp.netlabs.org/pub/SDL)
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
18
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
19 Please edit the second, fourth and fifth lines of setvars.cmd file
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
20 to set the folders where the toolkit, the OW compiler and the FSLib are.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
21 You won't need NASM yet (The Netwide Assembler), you can leave that line.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
22 Run setvars.cmd, and you should get a shell in which you can
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
23 compile SDL.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
24
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
25 Check the "Watcom.mif" file. This is the file which is included by all the
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
26 Watcom makefiles, so changes here will affect the whole build process.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
27 There is a line in there which determines if the resulting SDL.DLL will be
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
28 a 'debug' or a 'release' build. The 'debug' version is full of printf()'s,
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
29 so if something goes wrong, its output can help a lot for debugging.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
30
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
31 Then go to the 'src' folder, and run "wmake -f makefile.wat".
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
32 This should create the SDL.DLL and the corresponding SDL.LIB file there.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
33
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
34 To test applications, it's a good idea to use the 'debug' build of SDL, and
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
35 redirect the standard output and standard error output to files, to see what
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
36 happens internally in SDL.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
37 (like: testsprite >stdout.txt 2>stderr.txt)
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
38
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
39 To rebuild SDL, use the following commands in 'src' folder:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
40 wmake -f makefile.wat clean
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
41 wmake -f makefile.wat
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
42
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
43
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
44
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
45 2. How to compile the testapps?
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
46 -------------------------------
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
47
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
48 Once you have SDL.DLL compiled, navigate into the 'test' folder, copy in there
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
49 the newly built SDL.DLL, and copy in there FSLib.DLL.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
50
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
51 Then run "wmake -f makefile.wat" in there to compile some of the testapps.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
52
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
53
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
54
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
55 3. What is missing?
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
56 -------------------
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
57
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
58 The following things are missing from this SDL implementation:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
59 - MMX, SSE and 3DNOW! optimized video blitters?
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
60 - HW Video surfaces
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
61 - OpenGL support
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
62
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
63
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
64
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
65 4. Special Keys / Full-Screen support
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
66 -------------------------------------
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
67
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
68 There are two special hot-keys implemented:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
69 - Alt+Home switches between fullscreen and windowed mode
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
70 - Alt+End simulates closing the window (can be used as a Panic key)
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
71 Only the LEFT Alt key will work.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
72
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
73
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
74
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
75 5. Joysticks on SDL/2
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
76 ---------------------
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
77
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
78 The Joystick detection only works for standard joysticks (2 buttons, 2 axes
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
79 and the like). Therefore, if you use a non-standard joystick, you should
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
80 specify its features in the SDL_OS2_JOYSTICK environment variable in a batch
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
81 file or CONFIG.SYS, so SDL applications can provide full capability to your
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
82 device. The syntax is:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
83
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
84 SET SDL_OS2_JOYSTICK=[JOYSTICK_NAME] [AXES] [BUTTONS] [HATS] [BALLS]
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
85
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
86 So, it you have a Gravis GamePad with 4 axes, 2 buttons, 2 hats and 0 balls,
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
87 the line should be:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
88
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
89 SET SDL_OS2_JOYSTICK=Gravis_GamePad 4 2 2 0
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
90
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
91 If you want to add spaces in your joystick name, just surround it with
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
92 quotes or double-quotes:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
93
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
94 SET SDL_OS2_JOYSTICK='Gravis GamePad' 4 2 2 0
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
95
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
96 or
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
97
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
98 SET SDL_OS2_JOYSTICK="Gravis GamePad" 4 2 2 0
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
99
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
100 Notive However that Balls and Hats are not supported under OS/2, and the
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
101 value will be ignored... but it is wise to define these correctly because
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
102 in the future those can be supported.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
103 Also the number of buttons is limited to 2 when using two joysticks,
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
104 4 when using one joystick with 4 axes, 6 when using a joystick with 3 axes
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
105 and 8 when using a joystick with 2 axes. Notice however these are limitations
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
106 of the Joystick Port hardware, not OS/2.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
107
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
108
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
109
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
110 6. Next steps...
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
111 ----------------
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
112
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
113 Things to do:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
114 - Implement missing stuffs (look for 'TODO' string in source code!)
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
115 - Finish video driver (the 'wincommon' can be a good example for missing
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
116 things like application icon and so on...)
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
117 - Enable MMX/SSE/SSE2 acceleration functions
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
118 - Rewrite CDROM support using DOS Ioctl for better support.
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
119
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
120
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
121
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
122 7. Contacts
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
123 -----------
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
124
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
125 You can contact the developers for bugs:
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
126
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
127 Area Developer email
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
128 General (Audio/Video/System) Doodle doodle@scenergy.dfmk.hu
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
129 CDROM and Joystick Caetano daniel@caetano.eng.br
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
130
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
131 Notice however that SDL/2 is 'in development' stage so ... if you want to help,
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
132 please, be our guest and contact us!
173c063d4f55 OS/2 port!
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
133