Windows Mobile Port for OTTD r18674 (03jan2010)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

DarkSoul
Engineer
Engineer
Posts: 68
Joined: 10 Aug 2005 11:01

Re: Windows Mobile Port (0.7.x)

Post by DarkSoul »

Crazy Photon wrote:
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!! :)
The i900 has hardware buttons (!). For the other dude that made it for mobile you would need to press the optical mouse button (the squared button) and then click on the map in order to scroll.

Talking about: http://www.esoftinteractive.com/openttd.html GL.
Crazy Photon
Engineer
Engineer
Posts: 19
Joined: 27 Apr 2009 23:49
Location: Montevideo, Uruguay
Contact:

Re: Windows Mobile Port (0.7.x)

Post by Crazy Photon »

Yes, but esoft's version is 0.6.3, and trying to do the same thing in this 0.7.0 RC2 version does not work.
Resistance is NEVER futile...
bardem
Engineer
Engineer
Posts: 6
Joined: 01 Sep 2009 14:33
Skype: barddm
Location: Russia
Contact:

Re: Windows Mobile Port (0.7.x)

Post by bardem »

Frequent error that crashes the game:
Can't find Iu bytes
Out of memory!
I booted my device in safe mode and had more than 30 Mb program memory, but it didn't help... :evil:
Evidently, I use some newgrf's like ECS. But in the Esoft's version I took much more extensions and it didn't crash the game. I noticed that the error doesn't occures right away even if I use several AI's that extremly slows the game, but when I just play without AI's with quite normal game behavior, this error happens sometimes anyway, to all appearance when some vehicle lieves a depot...
Prefer to play TTD on my Pocket PC (Windows Mobile 5.0 Fujitsu-Siemens Pocket Loox C550). Make a good WM port pleeez!
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Windows Mobile Port (0.7.x)

Post by CommanderZ »

0.6.3
esoft's is 0.6.0 beta 4
Crazy Photon
Engineer
Engineer
Posts: 19
Joined: 27 Apr 2009 23:49
Location: Montevideo, Uruguay
Contact:

Re: Windows Mobile Port (0.7.x)

Post by Crazy Photon »

I guess I had meant to say 0.6.0 beta 3 but was distracted when posting, thanks for the correction.
Resistance is NEVER futile...
Sarvesh50
Engineer
Engineer
Posts: 63
Joined: 31 Mar 2008 16:29

Re: Windows Mobile Port (0.7.x)

Post by Sarvesh50 »

;( this wont work on my samsung star
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Windows Mobile Port (0.7.x)

Post by DaleStan »

What happens? How does that differ from what you expect?

Does the binary fail to transfer to your samthing?
Does the screen display upside down?
Does your samthing start emitting smoke and/or earsplitting screeches?
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
Lampje
Engineer
Engineer
Posts: 7
Joined: 30 Dec 2009 21:00

Re: Windows Mobile Port (0.7.x)

Post by Lampje »

Well, I did it. :)

I have 'succesfully' ported the latest trunk (r18656M) to WM 5, and it runs on my Samsung Omnia Qwerty (WM6.5 WVGA device). Which means I just dropped the code that wouldn't compile on WinCE.
I looked at the diff from rwt33, copied all useful changes manually, and added a few changes required to get it working. Win32 build still runs.

I guess I have to open a new thread, since this one is 0.7.x related?

Best regards,

Erik
Last edited by Lampje on 30 Dec 2009 23:06, edited 1 time in total.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Windows Mobile Port (0.7.x)

Post by petert »

Lampje wrote:I guess I have to open a new thread, since this one is 0.7.x related?
Not really, you could post the diff here and ask the maker of the thread to update the title.
Crazy Photon
Engineer
Engineer
Posts: 19
Joined: 27 Apr 2009 23:49
Location: Montevideo, Uruguay
Contact:

Re: Windows Mobile Port (0.7.x)

Post by Crazy Photon »

Lampje: Can you post the binaries please? :)
Resistance is NEVER futile...
Lampje
Engineer
Engineer
Posts: 7
Joined: 30 Dec 2009 21:00

Re: Windows Mobile Port (0.7.x)

Post by Lampje »

I'm working at it, hold on...

I can supply the diff, though.

EDIT: updated the diff to include the readme.

EDIT 31-12-2009 20:23 :
- updated the diff to r18674M, and some fixes.
- added usefuls_wm5.zip. Copy this into the root of the trunk. Then it should compile.
Attachments
WM5_r18674M.patch
(96.97 KiB) Downloaded 145 times
usefuls_wm5.zip
(382.15 KiB) Downloaded 148 times
Last edited by Lampje on 31 Dec 2009 19:29, edited 2 times in total.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Windows Mobile Port (0.7.x)

Post by petert »

Lampje wrote:I'm working at it, hold on...

I can supply the diff, though.
Are these compiled on a regular computer for a Windows Mobile phone, or compiled on a Windows mobile phone?
Lampje
Engineer
Engineer
Posts: 7
Joined: 30 Dec 2009 21:00

Re: Windows Mobile Port (0.7.x)

Post by Lampje »

These are compiled on a regular computer, using VS 2008. I've added a new platform in the VS solution so the package can be quickly compiled for Win32 as well as for Windows Mobile devices.

Here is the install package. I've had to strip it down, because the package got quite big. No graphics or sound included, and only English languages. But those can be copied manually.

The port is not complete though, my C++ capabilities are quite limited, let's say. More information is inside the readme.

EDIT 31-12-2009 20:42 CET:
- Updated the binaries to r18674M
Attachments
OpenTTD_WM5_r18674M.zip
(2.03 MiB) Downloaded 304 times
readme_wm5.txt
(2.43 KiB) Downloaded 206 times
Last edited by Lampje on 31 Dec 2009 19:52, edited 1 time in total.
Tvel
Engineer
Engineer
Posts: 77
Joined: 29 Mar 2008 22:42
Skype: tvel___
Location: Bulgaria

Re: Windows Mobile Port (0.7.x)

Post by Tvel »

Thanks Lampje, you made my day. Your build works on my Win Ce 5.0 GPS

It is playable, but some windows can't fit in my low res (480x272).
bardem
Engineer
Engineer
Posts: 6
Joined: 01 Sep 2009 14:33
Skype: barddm
Location: Russia
Contact:

Re: Windows Mobile Port

Post by bardem »

Thank you, Lampje! :bow: I waited it for a long time. I can't wait to try it! :D

What about the "Out of memory" error? Can it be solved? Is it solved in the new build?
Prefer to play TTD on my Pocket PC (Windows Mobile 5.0 Fujitsu-Siemens Pocket Loox C550). Make a good WM port pleeez!
Lampje
Engineer
Engineer
Posts: 7
Joined: 30 Dec 2009 21:00

Re: Windows Mobile Port

Post by Lampje »

I haven't solved anything, I just made changes to get the code compiled for WM5.
If the new build has improvements to memory management then it could be that the problem is solved. You should just give it a try.

I have seen that networking works, internet works and even the new IPv6 layer works!

By the way, I've found a library (celib) for WM, which should make inifile saving and crash logging available. But it's not compatible with the current port, so I should port it again. Oh well...
bardem
Engineer
Engineer
Posts: 6
Joined: 01 Sep 2009 14:33
Skype: barddm
Location: Russia
Contact:

Re: Windows Mobile Port for OTTD r18674 (03jan2010)

Post by bardem »

Okay, it works! :D The "Out of memory error" occurs with some NewGRFs, for example when the first train leaves a depot. So I can't use any railroad transport. But without railroad transport everything is good. Maybe, without NewGRFs this error never occurs...
Another, a new one, problem, I noticed, is that some settings are not saved after restart of the game and impossibility to create a NewGRF preset...
Prefer to play TTD on my Pocket PC (Windows Mobile 5.0 Fujitsu-Siemens Pocket Loox C550). Make a good WM port pleeez!
Lampje
Engineer
Engineer
Posts: 7
Joined: 30 Dec 2009 21:00

Re: Windows Mobile Port for OTTD r18674 (03jan2010)

Post by Lampje »

Yes, I know, ini-file saving is disabled because the original porter (is such a person called that way?) didn't know how to move a file to a existing one.

It doesn't save changes to the configfile, sadly. OpenTTD creates a temporary configfile, and when it's complete, it copies it over the old one to make sure your configfile isn't shredded when OpenTTD crashes at that point.

I've adressed that, and I've succeeded in running OpenTTD without SDL, that fixes the orientation and dpad issues, and maybe takes up a little less memory. I have still issues with getting it totally fullscreen, though. And if the orientation changes, or the window size (yes pocketpc still has windows ;) ) the palette goes lost. I'm confused at this one, because the code already seems to handle it.

Music seems to be possible too, without too much effort. The only thing is that the default PocketPC midi device only produces sine-waves (read: flute-like tones).

The celib I mentioned earlier is, unfortunately, also a big bunch of hacks, so I won't implement that, but it's a useful source of code.

I think I should contact a developer. The port is now quite hacky, I'm trying to redesign it without modifying a lot of code. But I don't know what the preferred way is to introduce such a port.
Windows Mobile lacks a few essential functions compared to regular Windows, but a lot of those functions are quite simple (like deleting a file, for example) and can easily be reimplemented.

@bardem, could you be more specific which OpenGRF (or combination of more) cause the memory error? Then I can have a look at it. I won't promise anything, though.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Windows Mobile Port for OTTD r18674 (03jan2010)

Post by Yexo »

If you need any help with the patch you could start by uploading it here. That way other people can take a look and give advice.
Lampje
Engineer
Engineer
Posts: 7
Joined: 30 Dec 2009 21:00

Re: Windows Mobile Port for OTTD r18674 (03jan2010)

Post by Lampje »

OK, here it is, it's now quite a mess if you ask me.
The required usefuls are a few posts above.

And my first question is: should I use the definition WINCE for my modifications or should I use a new one like WINDOWS_MOBILE? The definition WINCE is already used in the original OpenTTD code, is this indeed for Windows Mobile devices or for real Windows CE platforms?
Attachments
WM5_r18674_without_sdl.patch
(101.74 KiB) Downloaded 132 times
Last edited by Lampje on 03 Jan 2010 22:13, edited 2 times in total.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 45 guests