Windows Mobile Port for OTTD r18674 (03jan2010)
Moderator: OpenTTD Developers
Windows Mobile Port for OTTD r18674 (03jan2010)
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
- Attachments
-
- usefuls_wm_v1.zip
- (249.8 KiB) Downloaded 717 times
-
- opentt_wm5_installer.zip
- - added networking
- (1.83 MiB) Downloaded 1393 times
-
- openttd-0.7.2-RC2_wm5.0_v3.diff
- (112.62 KiB) Downloaded 659 times
Last edited by rwt33 on 31 Dec 2009 23:34, edited 11 times in total.
Re: Windows Mobile Port (0.7.x)
I don't speak for the devs, but I'm guessing that's not going to be particularly interesting.
A patch against trunk, however, has a decent chance of catching the interest of the developers. Especially if it's clean (no unrelated fixes) and follows the coding style, as listed in the wiki.
A patch against trunk, however, has a decent chance of catching the interest of the developers. Especially if it's clean (no unrelated fixes) and follows the coding style, as listed in the wiki.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Windows Mobile Port (0.7.x)
Salut,
If you can, you should test your modifications also on a, say "normal" windows platform, just to make sure you don't break compilation for existing platforms.
Nice! Yet another port Definitely you should post your patches. But indeed they're only of real interest to the devs, if you make your patch against latest trunk of OpenTTD as that's the only place where development happens and where changes possibly might make it into the main development repository. Obeying the coding style guidelines of OpenTTD helps also tremendously.rwt33 wrote: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.
If I get a good response I'd be more than happy to clean up the code and post patches. I am pretty confident that the existing platform ports should still work as I've made all my changes conditional but haven't tested it.
If you can, you should test your modifications also on a, say "normal" windows platform, just to make sure you don't break compilation for existing platforms.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Windows Mobile Port (0.7.x)
Nice work.rwt33 wrote: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.
There is a bit of a problem, how will you get good response without posting the patches? Mind that as soon as you post a binary you have to post the source too.If I get a good response I'd be more than happy to clean up the code and post patches.
Last edited by Yexo on 30 Jul 2009 07:53, edited 1 time in total.
-
- Engineer
- Posts: 44
- Joined: 06 Sep 2008 12:41
- Location: Hamburg, Germany
Re: Windows Mobile Port (0.7.x)
hi,
I am as a windows mobile user also interested in this patch. Maybe you could post links for the nessessary dlls and libraries to get openttd compiled for wm.
thanks
I am as a windows mobile user also interested in this patch. Maybe you could post links for the nessessary dlls and libraries to get openttd compiled for wm.
thanks
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Windows Mobile Port (0.7.x)
Gooood, It felt really bad to play the 0.6.0 beta 4 in the age of 0.7.2.rwt33 wrote: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.
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.
If I get a good response I'd be more than happy to clean up the code and post patches. I am pretty confident that the existing platform ports should still work as I've made all my changes conditional but haven't tested it.
Rob
I tried to create a new port myself once, but failed.
And welcome to the forums, congrats for a great entree
PS: Does multiplayer work?
Re: Windows Mobile Port (0.7.x)
Good work, waiting for the binary now
The 0.6.0-beta one worked on WinCE too, does this one?
The 0.6.0-beta one worked on WinCE too, does this one?
Re: Windows Mobile Port (0.7.x)
esoftinteractive did not the best job in creating clean, readable and usable code. I hope you can top that. I once spent some time on WinCE port myself .. failed mostly, because it kept on crashing for reasons I couldn't figure out So I hope you can supply us with clean working patches, if possible against trunk
The only thing necessary for the triumph of evil is for good men to do nothing.
-
- Engineer
- Posts: 19
- Joined: 27 Apr 2009 23:49
- Location: Montevideo, Uruguay
- Contact:
Re: Windows Mobile Port (0.7.x)
Please do, if you can also provide a .cab file, even betterIf I get a good response I'd be more than happy to clean up the code and post patches.
Resistance is NEVER futile...
Re: Windows Mobile Port (0.7.x)
Hi, I really would apriciate a WM Port of 0.7.x .
If you could make this happend you will be my hero !
Thanks in advance, Kenny_23
If you could make this happend you will be my hero !
Thanks in advance, Kenny_23
Re: Windows Mobile Port (0.7.x)
I compiled it, but it cannot run.
error 0x8007007e
error 0x8007007e
I speak Chinglish...
Re: Windows Mobile Port (0.7.x)
Hi,
I installed the CAP file you kindly provided on my SE Xperia with WM 6.1 .
Seems that everything is running, except that the game won't recognize the phone buttons anymore.
( D-Pad for scrolling, Center for rightclick emulation )
This was working with the 6-beta version from Esoft.
I opend the config-file as txt, but the only thing I could find that semed related was "right click emulation"
wich i set to "true", but that diden't solve the problem.
There is a way to fix this ?
Many thanks in advance Kenny_23
PS: Please excuse my english...
I installed the CAP file you kindly provided on my SE Xperia with WM 6.1 .
Seems that everything is running, except that the game won't recognize the phone buttons anymore.
( D-Pad for scrolling, Center for rightclick emulation )
This was working with the 6-beta version from Esoft.
I opend the config-file as txt, but the only thing I could find that semed related was "right click emulation"
wich i set to "true", but that diden't solve the problem.
There is a way to fix this ?
Many thanks in advance Kenny_23
PS: Please excuse my english...
Re: Windows Mobile Port (0.7.x)
Re: keys on phone issue.
Unfortunately the phone I have (HTC Touch HD) doesn't have any keys on it any way so I have no way of testing this. If someone's interested in having a look and make some headground, let me know
Cheers,
Rob
Unfortunately the phone I have (HTC Touch HD) doesn't have any keys on it any way so I have no way of testing this. If someone's interested in having a look and make some headground, let me know
Cheers,
Rob
Re: Windows Mobile Port (0.7.x)
Same problem with mine (HTC Touch Diamond) no hardware keys work. I also can't press any of the menu buttons on the top right, only buttons from Company Info onwards.
Shame
Shame
Re: Windows Mobile Port (0.7.x)
It can run now, but at 320x240 it can't show everything on the screen.
I think I must buy a new phone now....
I think I must buy a new phone now....
I speak Chinglish...
Re: Windows Mobile Port (0.7.x)
Mate, this is awesome. First I would like to say a big thank you for this release [and to others that have worked on it]. Would it be possible to compile it with network support please? [or am I doing something wrong? ]
Quick question, how do I pan the screen with a purely touch phone? I have just bought a smart phone for the first time [Omnia i8000, only has Call, End Call, volume control, back and camera buttons] and unfortunately even with pan on edge of screen enabled, it isn't really smooth and panning the map in the map window is not possible with edge pan.... maybe the option to map a phone key as right click? In any case, still VERY cool.
Cheers !
Quick question, how do I pan the screen with a purely touch phone? I have just bought a smart phone for the first time [Omnia i8000, only has Call, End Call, volume control, back and camera buttons] and unfortunately even with pan on edge of screen enabled, it isn't really smooth and panning the map in the map window is not possible with edge pan.... maybe the option to map a phone key as right click? In any case, still VERY cool.
Cheers !
Last edited by jezza333 on 08 Aug 2009 15:02, edited 1 time in total.
Re: Windows Mobile Port (0.7.x)
Did you try to enable the option "Advanced Settings->Interface->Interaction->Pan window when mouse is at the edge"?jezza333 wrote:Mate, this is awesome. First I would like to say a big thank you for this release [and to others that have worked on it]. Would it be possible to compile it with network support please? [or am I doing something wrong? ]
Quick question, how do I pan the screen with a purely touch phone? I have just bought a smart phone for the first time and having this available for WinMo is just brilliant!
-
- Engineer
- Posts: 19
- Joined: 27 Apr 2009 23:49
- Location: Montevideo, Uruguay
- Contact:
Re: Windows Mobile Port (0.7.x)
Hi, I faced the same issue (I have an Omnia i900), solved it by enabling left click scrolling. Go to Advanced Settings, Interface, Interaction, Left Click Scrolling: On.how do I pan the screen with a purely touch phone?
I have not been able to discover how to do a right click though, if someone can enlighten me, it would be great (tried enabling right click emulation but it didn't work)
EDIT: BTW, thank you Rob for the cab!!
Resistance is NEVER futile...
Re: Windows Mobile Port (0.7.x)
Yeah, that worked, so I edited my post after I found itYexo wrote:Did you try to enable the option "Advanced Settings->Interface->Interaction->Pan window when mouse is at the edge"?jezza333 wrote:Mate, this is awesome. First I would like to say a big thank you for this release [and to others that have worked on it]. Would it be possible to compile it with network support please? [or am I doing something wrong? ]
Quick question, how do I pan the screen with a purely touch phone? I have just bought a smart phone for the first time and having this available for WinMo is just brilliant!
It'd be great to have an option to map a phone key [maybe the camera key, useless most of the time] as a right click when the game is running.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests