Windows Mobile Port for OTTD r18674 (03jan2010)
Posted: 30 Jul 2009 02:07
Hi all,
I have successfully ported 0.7.2-RC2 to Windows Mobile. I have tested it in both the WM5.0 emulator at 320x240 (tiny) and on my WM6.5 HTC HD at 800x480.
Background
I started by getting the source provided by esoftinteractive working (0.6.0-beta) and then patched the changes and a few others to 0.7.2-RC2. The port uses the usual SDL, zlib, libpng and freetype libs. I built the SDL lib myself and found suitable zlib, libpng and freetype dlls.
Patch
Ok guys, the patch is attached. It was generated against 0.7.2-RC2 svn checkout. Simply use tortoisesvn or similar to apply patch.
eThe project is for Vis Studio 2008 with the WM5.0 SDK. After opening check the "Compiler|Proprocessor|Defines" and "Linker|Additional Dependencies" for the required dependencies. Either get/compile the libs yourself or use the "usefuls_wm"
I compiled SDL myself using the sources from libsdl.org, and zlib and libpng from http://www.tenik.co.jp/~adachi/wince/
A working install cab is also attached. The original ttd files are also obviously still needed.
Tips
- If you get "Error 0x8007007e" you need to make sure the following dlls are in the same dir as openttd.exe:
lpngce.dll
zlibce.dll
SDL.dll
msvcr90.dll - This is in "\Program Files\Microsoft Visual Studio 9.0\VC\ce\dll\armv4i" (will hopefully remove dependency of this eventually)
- If you get sound issues, try disabling the sound driver either in the cfg file (sounddriver="null") or by simply excluding win32_s.cpp from the project
Further work
Sound works but midi music doesn't. If someone wants to get this going go for it.
I was also interested in providing an OpenGL ES compatible SDL (the 1.2.x SDL uses the old GAPI API) which could make for some nice play on the new HTC devices. Please let me know if you're keen to work on or have any experience with OpenGL ES and or SDL 1.3.x on WinCE
I haven't tested actually 32-bit grf files, but I have tried setting 32-bit blitters with some success. Let me know if people are having any luck with this
If many people have a go with it and it gets perfected and cleaned up we might be able to have a go at bringing it into the main trunk!
Worth knowing about my efforts
It's worth mentioning that I'm not going to put any time into implementing features such as "making it more finger friendly" or "option to bring up input panel" etc. I'd really appreciate someone else to come in, grab the patch and give it a whirl themselves. Still, feel free to post requests etc as someone might then feel motivated to do them.
History
9\08\09: Added networking support - patch v3 and cab
6\08\09: Patch v2 with sound fix, added usefuls_wm_v1.zip
6\08\09: List of required dlls
5\08\09: Patch v1 posted
31\12\09: Lampje does a brilliant job of continuing porting development and provides new binaries. Thread title renamed to "Windows Mobile Port"
Rob
I have successfully ported 0.7.2-RC2 to Windows Mobile. I have tested it in both the WM5.0 emulator at 320x240 (tiny) and on my WM6.5 HTC HD at 800x480.
Background
I started by getting the source provided by esoftinteractive working (0.6.0-beta) and then patched the changes and a few others to 0.7.2-RC2. The port uses the usual SDL, zlib, libpng and freetype libs. I built the SDL lib myself and found suitable zlib, libpng and freetype dlls.
Patch
Ok guys, the patch is attached. It was generated against 0.7.2-RC2 svn checkout. Simply use tortoisesvn or similar to apply patch.
eThe project is for Vis Studio 2008 with the WM5.0 SDK. After opening check the "Compiler|Proprocessor|Defines" and "Linker|Additional Dependencies" for the required dependencies. Either get/compile the libs yourself or use the "usefuls_wm"
I compiled SDL myself using the sources from libsdl.org, and zlib and libpng from http://www.tenik.co.jp/~adachi/wince/
A working install cab is also attached. The original ttd files are also obviously still needed.
Tips
- If you get "Error 0x8007007e" you need to make sure the following dlls are in the same dir as openttd.exe:
lpngce.dll
zlibce.dll
SDL.dll
msvcr90.dll - This is in "\Program Files\Microsoft Visual Studio 9.0\VC\ce\dll\armv4i" (will hopefully remove dependency of this eventually)
- If you get sound issues, try disabling the sound driver either in the cfg file (sounddriver="null") or by simply excluding win32_s.cpp from the project
Further work
Sound works but midi music doesn't. If someone wants to get this going go for it.
I was also interested in providing an OpenGL ES compatible SDL (the 1.2.x SDL uses the old GAPI API) which could make for some nice play on the new HTC devices. Please let me know if you're keen to work on or have any experience with OpenGL ES and or SDL 1.3.x on WinCE
I haven't tested actually 32-bit grf files, but I have tried setting 32-bit blitters with some success. Let me know if people are having any luck with this
If many people have a go with it and it gets perfected and cleaned up we might be able to have a go at bringing it into the main trunk!
Worth knowing about my efforts
It's worth mentioning that I'm not going to put any time into implementing features such as "making it more finger friendly" or "option to bring up input panel" etc. I'd really appreciate someone else to come in, grab the patch and give it a whirl themselves. Still, feel free to post requests etc as someone might then feel motivated to do them.
History
9\08\09: Added networking support - patch v3 and cab
6\08\09: Patch v2 with sound fix, added usefuls_wm_v1.zip
6\08\09: List of required dlls
5\08\09: Patch v1 posted
31\12\09: Lampje does a brilliant job of continuing porting development and provides new binaries. Thread title renamed to "Windows Mobile Port"
Rob