From 81731431e004f62bb7a8172bcda7b3d4df17418e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 14 Dec 2001 12:37:34 +0000 Subject: [PATCH] Added support for building SDL for EPOC/SymbianOS 6.0 (thanks Hannu!) --- BUGS | 13 ++++ CREDITS | 2 + EpocBuildFiles.zip | Bin 0 -> 2012 bytes README.Epoc | 150 +++++++++++++++++++++------------------------ docs.html | 1 + 5 files changed, 85 insertions(+), 81 deletions(-) create mode 100644 EpocBuildFiles.zip diff --git a/BUGS b/BUGS index 5d20bc5d8..263eba223 100644 --- a/BUGS +++ b/BUGS @@ -135,6 +135,18 @@ IRIX: The keyboard modifiers are not set to the correct state on startup. +EPOC: + Only Crystal version of Epoc/SymbianOS is currently supported. + + SDL is implemented in static library only. SDL uses static/global + variables and that is not allowed in EPOC dll libraries. + + Sound is not yet supported. + + Joystick, OpenGL and cdrom is not supported (think about cdrom in a cell phone:-). + + No console output screen. Printing to stdout do not have any effect. + OpenBSD: -= NOT YET SUPPORTED =- This is reported to work, but I haven't verified this. @@ -208,3 +220,4 @@ AmigaOS: -= NOT YET SUPPORTED =- Continuous relative mouse motion is not implemented. The AmigaOS port was done by Gabriele.Greco@galactica.it + diff --git a/CREDITS b/CREDITS index b8446148a..2db981e57 100644 --- a/CREDITS +++ b/CREDITS @@ -19,6 +19,8 @@ Thanks to everyone who made this possible, including: * Patrick Trainor and Jim Boucher, for the QNX Neutrino port +* Hannu Viitala for the EPOC port + * Gabriele Greco, for the Amiga port * Carsten Griwodz for the AIX port diff --git a/EpocBuildFiles.zip b/EpocBuildFiles.zip new file mode 100644 index 0000000000000000000000000000000000000000..9de7244f97e583faca089e0a27331bc2b4c2aa18 GIT binary patch literal 2012 zcmZ`)2{aUH8y?Fv7#hpCmRw7gG-H_}oXRp73Na``VruLo%NWGOD9g=|Vt%7Cg(6&$ z<&xdluH{-1$x_*OGngz1{nKCP=lrMteCIpg_nz-O=l#y}zR&Zb&AGUt004jo;Ce3z zPQYpW?#PZ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UD}s8b=U7`Sj$_P>Qw=23#KPQ;LZLS$hwVmvn>|}RXW`vn>{P0rNx8zUU$EXaw|@*iIan z)wi92U;*tkUXGbujF*K{-&eX`N(hdqcgX2RKcXtkek}Eu0;zOzCM!uBTl3AzD)?I} zV+B2=3=pfk*+Ro_%&aaS6KFy~u%(BJh* z({n`BWf%k+2itIMm8q)Ukp|_|XtEfJRG5~PucER{M>%a4lc*Ez z3+-Dlwe^~{x7Jz$)G%~|M_iThTOC&jt$;?bVj|OZzsdIu{wdgNhWqlapX zB)^EPgZX>BI{Ss~fv?!y39!!~H+&EV=kJO6;f7t`*^3zzCB{_;3t?t>rMjR<)4M{j z*LNlVHpst5>7LX!Ib&8@897VT9wg8Mq#C>?jHF)pL*)54qYZvDhI&B9)p1Vc(>JO} z6w%$j z5cn$_-Up_!tMt>94}yLrf_;z`Hvn)z5(k05>VSP98Tdc_fHnsn`u+@LFERF4ivAP* E8v=-0$p8QV literal 0 HcmV?d00001 diff --git a/README.Epoc b/README.Epoc index 780e4c2ca..380cb2527 100644 --- a/README.Epoc +++ b/README.Epoc @@ -1,87 +1,75 @@ -31.8.2001 HJV -SDL for EPOC/Symbian OS -======================= +============================================================================== +Using the Simple DirectMedia Layer with EPOC/SymbianOS 6.0 +============================================================================== -This is an Epoc port of SDL (1.2.0). It is not yet complete, but good enough for starting to port all those wonderful SDL based demos, games and other programs to Epoc! I have tested a bunch of demos and test programs in Nokia 9210 Communicator, which is a fancy device with combined PDA/GSM phone features, Symbian OS (Crystal), a full keyboard and a color screen (640x200x12bit). +============================================================================== +I. Building the Simple DirectMedia Layer libraries: -Btw. Also SDLDoom works over SDL Epoc port now (CDoom)! + You can get Symbian SDK from: + http://www.symbian.com. + First create "Epoc" directory under SDL main directory and unpack + EpocBuildFiles.zip in it. + + To build the librarys goto "epoc" directory and type: + bldmake bldfiles + abld makefile vc6 (for creating Microsoft Visual C++ makefiles) + abld build wins udeb (building for wins emulator) + abld build armi urel (building for real device) + +============================================================================== +II. Building the Simple DirectMedia Layer programs: + + Building SDL test programs is easy once you have built the libraries: + abld test build wins udeb + abld test build armi urel + + Supported real screen resolutions + 320 x 200 x 8 bit + 320 x 200 x 12 bit + 640 x 200 x 8 bit + 640 x 200 x 12 bit + Supported "emulated" screen resolutions + 640 x 400 x 8 bit + 640 x 400 x 12 bit + 640 x 480 x 8 bit + 640 x 480 x 12 bit + "Emulated" resolutions are implemented by by shrinking the screen vertically + i.e. only every second scanline is drawn. This is mainly ment to be used for + testing quick ports of programs. Using faked resolutions is a waste of memory + and cpu power! + +============================================================================== +III. Running test programs + + Copy executable to the device and run it from the File manager. The Esc + key quits demo programs. In Crystal, Exe programs do not appear in task list + nor in Extras :-(. Test programs are tested in Nokia 9210 Communicator. + + Special keys used in SDL: + The Caps lock key enables or disables the virtual cursor. + Function keys are mapped as follows: + F1=chr+q, F2=chr+w,..., F8=chr+i, + F9=chr+a,..., F12=chr+d. + +============================================================================== +IV. Enjoy! :) + + If you have a project you'd like me to know about, or want to ask questions, + go ahead and join the SDL developer's mailing list by sending e-mail to: + + sdl-request@libsdl.org + + and put "subscribe" into the subject of the message. Or alternatively you + can use the web interface: + + http://www.libsdl.org/mailman/listinfo/sdl + + You can find more info about Epoc version of SDL from Hannu Viitala's + homepage + http://www.mbnet.fi/~haviital + +============================================================================== -How to install to device -======================== -Extract binary packets of the demo and test programs and copy the files to N9210. - - -How to use -========== - -Run exe's from the File manager. The Caps lock key enables or disables the virtual cursor. -The Esc key quits demo programs. -Function keys are mapped as follows: -- F1=chr+q, F2=chr+w,..., F8=chr+i, -- F9=chr+a,..., F12=chr+d. - -In Crystal, Exe programs do not appear in task list nor in Extras :-( - - -How to build -============ - -Building SDL, SDL_IMAGE and tests & demos: -- Build files are in "\sdl\epoc\" and "\sdl_image\epoc\" directories -- Building as usual: "bldmake bldfiles" "abld build wins udeb" "abld build armi urel" -- Test and demos programs are build: "abld test build wins udeb" "abld test build armi urel" - - -Building and sources -==================== -Information about the Epoc implementation: -- Made over SDL 1.2.0 -- Ported sources: SDL, SDL_image, xflame, fire, warp, newvox, graywin, testalpha, SDLDoom(CDoom) -- Test programs do not have any major changes: usually only screen size and depth is - changed for 9210, if needed -- Like in all the other platform implementations, the Epoc specific code is in "Epoc" subdirectories. All build files for Epoc are in the directory \sdl\epoc\. Adding a new OS support requires always some changes also in generic files (search for "#ifdef __SYMBIAN32__"). -- Currently, two resolutions and bit depths are supported: 320x200 and 640x200 with 8 or 12 bit color. -- I addition, two faked resolutions are supported: 640x400, 640x480. These are implemented by shrinking the screen vertically i.e. only every second scanline is drawn. This can be used for testing and for non-resource intensive programs. Thought, using faked resolutions is a waste of memory and cpu power! - -Change history -============== - -31.8.2001 Alpha 0.2: -- Now you should build ARMI binaries instead of THUMB. It runs faster. -- sdl_main.cpp: removed check for existing instance of sdlprogram -- sdl_error.h: Added debug macros under conditional compilation in Epoc -- sdl_epocevents.cpp: Added focus lost&gained event handling, added modifier handling, added a lot more key event handling (function keys and others). Function keys are mapped as follows: - F1=chr+q, F2=chr+w,..., F8=chr+i, F9=chr+a,..., F12=chr+d. -- sdl_epocvideo.h: Added EPOC_ScreenOffset variable. Added EPOC_IsWindowFocused variable (but not used for anything yet!). Added RedrawWindowL() function. -- sdl_epocvideo.cpp: Added debugging functions: Debug_AvailMem2() and Debug_AvailMem(). - Changed window to have white background. Centralize game screen if it is not full size. - Added RedrawWindowL() function. Force other windows to redraw if SDL window lost focus. This cleans up possible game graphics from screen. Redraw after getting focus again. - - -Todo -==== - -This Epoc port is (of course;-) not thoroughly tested. For testing, I have compiled and run a couple of test programs and demos in N9210. Still, e.g. thread related functions have not been tested at all. - -Known bugs and unimplemented features: -- No sound -- No console output screen. Printing to stdout do not have any effect. -- Epoc do not allow static/global variables in DLL libraries. So I could only use static linking with SDL. -- Some test programs may take so much cpu in 9210 that e.g. SMS sending and receiving is not possible at a same time. Also screen may look awkward if there appear visible notes, dialogs etc. when an sdl program is active. SDL program runs in the lowest possible priority for minimum interference in the system. Unfortunately, this is always not enough. Perhaps some Delay() commands are needed. - -P.s. I have ported also the SDL version of MirrorMagic puzzle game to Epoc. I will put the sources and binaries available as soon as I bother to clean the ported sources a bit... - - -Open Source & "bazaar" style software development -================================================= - -You can take part in this porting project. This is Open Source software and you are very welcome to try it, test it, improve the code and implement the missing pieces. If you have any fix suggestions, improvements, code excerpts etc., contact me by email. Please start the mail subject with a string "EPOC SDL:". - -Cheers, -Hannu - -Mail:hannu.j.viitala@mbnet.fi -Homepage of SDL for Epoc: www.mbnet.fi/~haviital diff --git a/docs.html b/docs.html index 8481f9209..a749a5c69 100644 --- a/docs.html +++ b/docs.html @@ -16,6 +16,7 @@

Major changes since SDL 1.0.0:

    +
  • 1.2.4: Added support for building SDL for EPOC/SymbianOS 6.0
  • 1.2.4: Added support for Xi Graphics XME fullscreen extension
  • 1.2.3: Added X11 Xinerama support - fullscreen starts on screen 0
  • 1.2.3: Added platform independent OpenGL header - SDL_opengl.h