Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Feb 21, 2019 12:46 am

All times are UTC




Post new topic  Reply to topic  [ 84 posts ]  Go to page 1 2 3 4 5 Next
Author Message
PostPosted: Thu Jul 30, 2009 2:07 am 
Offline
Engineer
Engineer

Joined: Thu Jul 30, 2009 1:58 am
Posts: 3
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


Attachments:
usefuls_wm_v1.zip [249.8 KiB]
Downloaded 604 times
File comment: - added networking
opentt_wm5_installer.zip [1.83 MiB]
Downloaded 1266 times
openttd-0.7.2-RC2_wm5.0_v3.diff [112.62 KiB]
Downloaded 512 times


Last edited by rwt33 on Thu Dec 31, 2009 11:34 pm, edited 11 times in total.
Top
   
PostPosted: Thu Jul 30, 2009 2:19 am 
Offline
TTDPatch Developer
TTDPatch Developer

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10285
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.

_________________
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


Top
   
PostPosted: Thu Jul 30, 2009 5:57 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9171
Location: Sol d
Salut,
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.

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.
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.

_________________
Image
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


Top
   
PostPosted: Thu Jul 30, 2009 6:25 am 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
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.
Nice work.

Quote:
If I get a good response I'd be more than happy to clean up the code and post patches.
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.


Last edited by Yexo on Thu Jul 30, 2009 7:53 am, edited 1 time in total.

Top
   
PostPosted: Thu Jul 30, 2009 6:41 am 
Offline
Engineer
Engineer

Joined: Sat Sep 06, 2008 12:41 pm
Posts: 44
Location: Hamburg, Germany
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


Top
   
PostPosted: Thu Jul 30, 2009 7:28 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 07, 2008 6:29 pm
Posts: 1872
Location: Czech Republic
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


Gooood, It felt really bad to play the 0.6.0 beta 4 in the age of 0.7.2.

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?


Top
   
PostPosted: Thu Jul 30, 2009 7:41 am 
Offline
Engineer
Engineer

Joined: Sat Mar 29, 2008 10:42 pm
Posts: 77
Skype: tvel___
Location: Bulgaria
Good work, waiting for the binary now :P

The 0.6.0-beta one worked on WinCE too, does this one?


Top
   
PostPosted: Thu Jul 30, 2009 9:03 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Mon May 31, 2004 9:21 am
Posts: 1310
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.


Top
   
PostPosted: Thu Jul 30, 2009 12:24 pm 
Offline
Engineer
Engineer

Joined: Thu Mar 05, 2009 6:40 pm
Posts: 27
I'm lovin' it!!!

_________________
I speak Chinglish...


Top
   
PostPosted: Mon Aug 03, 2009 11:52 am 
Offline
Engineer
Engineer

Joined: Mon Apr 27, 2009 11:49 pm
Posts: 19
Location: Montevideo, Uruguay
Quote:
If I get a good response I'd be more than happy to clean up the code and post patches.
Please do, if you can also provide a .cab file, even better :)

_________________
Resistance is NEVER futile...


Top
   
PostPosted: Wed Aug 05, 2009 9:21 am 
Offline
Engineer
Engineer

Joined: Wed Aug 05, 2009 8:26 am
Posts: 5
Hi, I really would apriciate a WM Port of 0.7.x .
If you could make this happend you will be my hero !

:bow:

Thanks in advance, Kenny_23


Top
   
PostPosted: Wed Aug 05, 2009 11:37 am 
Offline
Engineer
Engineer

Joined: Thu Mar 05, 2009 6:40 pm
Posts: 27
I compiled it, but it cannot run.
error 0x8007007e

_________________
I speak Chinglish...


Top
   
PostPosted: Thu Aug 06, 2009 1:26 pm 
Offline
Engineer
Engineer

Joined: Wed Aug 05, 2009 8:26 am
Posts: 5
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. :cry:
There is a way to fix this ?

Many thanks in advance Kenny_23

PS: Please excuse my english... :oops:


Top
   
PostPosted: Thu Aug 06, 2009 8:36 pm 
Offline
Engineer
Engineer

Joined: Thu Jul 30, 2009 1:58 am
Posts: 3
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


Top
   
PostPosted: Fri Aug 07, 2009 12:59 pm 
Offline
Engineer
Engineer

Joined: Fri Aug 07, 2009 12:56 pm
Posts: 1
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 :(


Top
   
PostPosted: Fri Aug 07, 2009 3:09 pm 
Offline
Engineer
Engineer

Joined: Thu Mar 05, 2009 6:40 pm
Posts: 27
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 speak Chinglish...


Top
   
PostPosted: Sat Aug 08, 2009 2:46 pm 
Offline
Engineer
Engineer

Joined: Sun Jun 03, 2007 1:47 am
Posts: 4
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? :P]

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 Sat Aug 08, 2009 3:02 pm, edited 1 time in total.

Top
   
PostPosted: Sat Aug 08, 2009 2:50 pm 
Offline
Tycoon
Tycoon

Joined: Thu Dec 20, 2007 12:49 pm
Posts: 3653
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? :P]

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!

Did you try to enable the option "Advanced Settings->Interface->Interaction->Pan window when mouse is at the edge"?


Top
   
PostPosted: Sat Aug 08, 2009 4:37 pm 
Offline
Engineer
Engineer

Joined: Mon Apr 27, 2009 11:49 pm
Posts: 19
Location: Montevideo, Uruguay
Quote:
how do I pan the screen with a purely touch phone?

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.

I have not been able to discover how to do a right click though, if someone can enlighten me, it would be great :wink: (tried enabling right click emulation but it didn't work)

EDIT: BTW, thank you Rob for the cab!! :)

_________________
Resistance is NEVER futile...


Top
   
PostPosted: Sun Aug 09, 2009 7:30 am 
Offline
Engineer
Engineer

Joined: Sun Jun 03, 2007 1:47 am
Posts: 4
Yexo wrote:
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? :P]

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!

Did you try to enable the option "Advanced Settings->Interface->Interaction->Pan window when mouse is at the edge"?


Yeah, that worked, so I edited my post after I found it :P

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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 84 posts ]  Go to page 1 2 3 4 5 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.