Page 3 of 5

Re: Windows Mobile Port (0.7.x)

Posted: 05 Sep 2009 23:26
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.

Re: Windows Mobile Port (0.7.x)

Posted: 05 Sep 2009 23:33
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.

Re: Windows Mobile Port (0.7.x)

Posted: 11 Sep 2009 11:45
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...

Re: Windows Mobile Port (0.7.x)

Posted: 11 Sep 2009 13:19
by CommanderZ
0.6.3
esoft's is 0.6.0 beta 4

Re: Windows Mobile Port (0.7.x)

Posted: 12 Sep 2009 21:26
by Crazy Photon
I guess I had meant to say 0.6.0 beta 3 but was distracted when posting, thanks for the correction.

Re: Windows Mobile Port (0.7.x)

Posted: 23 Sep 2009 19:45
by Sarvesh50
;( this wont work on my samsung star

Re: Windows Mobile Port (0.7.x)

Posted: 25 Sep 2009 22:27
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?

Re: Windows Mobile Port (0.7.x)

Posted: 30 Dec 2009 21:15
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

Re: Windows Mobile Port (0.7.x)

Posted: 30 Dec 2009 22:14
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.

Re: Windows Mobile Port (0.7.x)

Posted: 31 Dec 2009 00:02
by Crazy Photon
Lampje: Can you post the binaries please? :)

Re: Windows Mobile Port (0.7.x)

Posted: 31 Dec 2009 00:48
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.

Re: Windows Mobile Port (0.7.x)

Posted: 31 Dec 2009 01:13
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?

Re: Windows Mobile Port (0.7.x)

Posted: 31 Dec 2009 02:08
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

Re: Windows Mobile Port (0.7.x)

Posted: 31 Dec 2009 16:47
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).

Re: Windows Mobile Port

Posted: 01 Jan 2010 15:38
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?

Re: Windows Mobile Port

Posted: 01 Jan 2010 17:51
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...

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

Posted: 03 Jan 2010 20:36
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...

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

Posted: 03 Jan 2010 21:12
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.

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

Posted: 03 Jan 2010 21:18
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.

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

Posted: 03 Jan 2010 22:00
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?