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

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 »

Lampje wrote:@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.
OK, I can try to test this. At this moment I use a combination of a lot of different mods, but the most of them hardly influence, I think that main point is the ECS set and some vehicle sets (I use DB set, Long Vehicle set and New Ships). I remember, that HEQS vehicles often coused the error in rwt33's build. Don't think that some specified NewGRF couses the error. It just has some limit when occurs some action that occupies the memory. For example the train departure.
However in the previous build by ESoft this error didi't occured with any combination of a numerous NewGRFs. Just the game was slower when the memory was isufficient.

The error message:
Can't find Iu bytes
Out of memory!
I wonder, what is Iu bytes?.. :)
Last edited by bardem on 03 Jan 2010 22:07, edited 1 time in total.
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 for OTTD r18674 (03jan2010)

Post by CommanderZ »

But in the previous build by ESoft this error didi't occured with any combination of big NewGRF sets. Just the game was slower when the memory was isufficient.
Esoft build was 0.6.0 beta 4, so it wasn't compatible with some of today's GRFs. Also, I think slow is a bit weak word in this case (it took me like two minutes to get into main menu with my favorite GRF list).
Lampje
Engineer
Engineer
Posts: 7
Joined: 30 Dec 2009 21:00

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

Post by Lampje »

Code: Select all

	#define PRINTF_SIZE "%Iu"
I think WM doesn't recognize this prefix.
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 »

CommanderZ wrote:Also, I think slow is a bit weak word in this case (it took me like two minutes to get into main menu with my favorite GRF list).
It's off course, I got used to it! But I tell about the gameplay speed when the game allready completly loaded. With the great numer of NerwGRFs or on a device with small operating memory the game was slow to play. But it was'nt error. And now the game is still fast, but the error occurs. If I set a very lot of "heavy" NewGRFs, the error occurs quite after the game starts... And when I switched off all today plugins and other things to free the memory, the error occured a little bit more rearly (I tested it for rwt33's build). But a going train allwais coused the error.
Prefer to play TTD on my Pocket PC (Windows Mobile 5.0 Fujitsu-Siemens Pocket Loox C550). Make a good WM port pleeez!
Player701
Engineer
Engineer
Posts: 8
Joined: 12 Jan 2010 10:22
Location: Russia

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

Post by Player701 »

Hello everybody, I'm new here.

This port runs fine on my Toshiba G810, with one exception: it is too uncomfortable in portrait screen mode. When I try to switch the resolution to landscape (240x320 or something like this), game crashes.

I've also tried setting landscape screen mode in WM settings, but this had no effect.

I suggest that this problem is SDL-related. If others can make this port run in landscape on QVGA screen, this may be hardware-related then.

I would like to see the compiled binaries without SDL here, maybe they will work properly on my PDA.

P.S. Sorry for bad English.
qtong
Engineer
Engineer
Posts: 1
Joined: 16 Jan 2010 15:20

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

Post by qtong »

I tried installing the cab file you provided in 1st post attachment but i cant find the game itself.
I figure it's not so easy as one-file install so could someone create a little tutorial on how to instal this game?
I've got HTC HD2.
veka8
Engineer
Engineer
Posts: 1
Joined: 05 Feb 2010 19:53

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

Post by veka8 »

hello, is it hard to compile a version for wm2003se as fsc loox 720 has no way update to wm5 please im a huge fan it works ver 6.x please make 7.x so could play internet &lan and also put name.
sorry bad english
feiyuzb78
Engineer
Engineer
Posts: 4
Joined: 19 Mar 2010 06:39

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

Post by feiyuzb78 »

Code: Select all

core/random_func.hpp(87) : error C2556: “uint32 OTTD_Random(void)”。
core/random_func.hpp(87) : error C2371: “OTTD_Random”
The error is about the code , or the compiler did’t identify ,to makes it error ?
Last edited by feiyuzb78 on 28 Mar 2010 13:36, edited 1 time in total.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

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

Post by petert »

feiyuzb78 wrote:when the code turn up at here ,there is an error ,it shows :./core/random_func.hpp(87) : error C2556: “uint32 OTTD_Random(void)”。core/random_func.hpp(87) : error C2371: “OTTD_Random”
The error is about the code , or the compiler makes it error ?
That (sounds) like a bug. Can you post your crash.* files located in your personal directory?
feiyuzb78
Engineer
Engineer
Posts: 4
Joined: 19 Mar 2010 06:39

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

Post by feiyuzb78 »

Code: Select all

/* $Id: random_func.hpp 16060 2009-04-14 21:13:07Z rubidium $ */

/** @file random_func.hpp Pseudo random number generator. */

#ifndef RANDOM_FUNC_HPP
#define RANDOM_FUNC_HPP

#if defined(__APPLE__)
	/* Apple already has Random declared */
	#define Random OTTD_Random
#endif /* __APPLE__ */

/**************
 * Warning: DO NOT enable this unless you understand what it does
 *
 * If enabled, in a network game all randoms will be dumped to the
 *  stdout if the first client joins (or if you are a client). This
 *  is to help finding desync problems.
 *
 * Warning: DO NOT enable this unless you understand what it does
 **************/

//#define RANDOM_DEBUG


/**
 * Structure to encapsulate the pseudo random number generators.
 */
struct Randomizer {
	/** The state of the randomizer */
	uint32 state[2];

	/**
	 * Generate the next pseudo random number
	 * @return the random number
	 */
	uint32 Next();

	/**
	 * Generate the next pseudo random number scaled to max
	 * @param max the maximum value of the returned random number
	 * @return the random number
	 */
	uint32 Next(uint16 max);

	/**
	 * (Re)set the state of the random number generator.
	 * @param seed the new state
	 */
	void SetSeed(uint32 seed);
};
extern Randomizer _random; ///< Random used in the game state calculations
extern Randomizer _interactive_random; ///< Random used every else where is does not (directly) influence the game state

/** Stores the state of all random number generators */
struct SavedRandomSeeds {
	Randomizer random;
	Randomizer interactive_random;
};

/** Saves the current seeds
 * @param storage Storage for saving
 */
static inline void SaveRandomSeeds(SavedRandomSeeds *storage)
{
	storage->random = _random;
	storage->interactive_random = _interactive_random;
}

/** Restores previously saved seeds
 * @param storage Storage where SaveRandomSeeds() stored th seeds
 */
static inline void RestoreRandomSeeds(const SavedRandomSeeds &storage)
{
	_random = storage.random;
	_interactive_random = storage.interactive_random;
}

void SetRandomSeed(uint32 seed);
#ifdef RANDOM_DEBUG
	#define Random() DoRandom(__LINE__, __FILE__)
	uint32 DoRandom(int line, const char *file);
	#define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__)
	uint DoRandomRange(uint max, int line, const char *file);
#else
	static FORCEINLINE uint32 Random()
	{
		return _random.Next();
	}

	static FORCEINLINE uint32 RandomRange(uint16 max)
	{
		return _random.Next(max);
	}
#endif

static FORCEINLINE uint32 InteractiveRandom()
{
	return _interactive_random.Next();
}

static FORCEINLINE uint32 InteractiveRandomRange(uint16 max)
{
	return _interactive_random.Next(max);
}

/**
 * Checks if a given randomize-number is below a given probability.
 *
 * This function is used to check if the given probability by the fraction of (a/b)
 * is greater than low 16 bits of the given randomize-number r.
 *
 * Do not use this function twice on the same random 16 bits as it will yield
 * the same result. One can use a random number for two calls to Chance16I,
 * where one call sends the low 16 bits and the other the high 16 bits.
 *
 * @param a The numerator of the fraction
 * @param b The denominator of the fraction, must of course not be null
 * @param r The given randomize-number
 * @return True if the probability given by r is less or equal to (a/b)
 */
static FORCEINLINE bool Chance16I(const uint a, const uint b, const uint32 r)
{
	assert(b != 0);
	return (((uint16)r * b + b / 2) >> 16) < a;
}

/**
 * Flips a coin with a given probability.
 *
 * This macro can be used to get true or false randomized according to a
 * given probability. The parameter a and b create a percent value with
 * (a/b). The macro returns true in (a/b) percent.
 *
 * @see Chance16I()
 * @param a The numerator of the fraction
 * @param b The denominator of the fraction
 * @return True in (a/b) percent
 */
static FORCEINLINE bool Chance16(const uint a, const uint b)
{
	return Chance16I(a, b, Random());
}

/**
 * Flips a coin with a given probability and saves the randomize-number in a variable.
 *
 * This function uses the same parameters as Chance16. The third parameter
 * must be a variable the randomize-number from Random() is saved in.
 *
 * The low 16 bits of r will already be used and can therefor not be passed to
 * Chance16I. One can only send the high 16 bits to Chance16I.
 *
 * @see Chance16I()
 * @param a The numerator of the fraction
 * @param b The denominator of the fraction
 * @param r The variable to save the randomize-number from Random()
 * @return True in (a/b) percent
 */
static FORCEINLINE bool Chance16R(const uint a, const uint b, uint32 &r)
{
	r = Random();
	return Chance16I(a, b, r);
}

#endif /* RANDOM_FUNC_HPP */
the same file always turn to error ?????
feiyuzb78
Engineer
Engineer
Posts: 4
Joined: 19 Mar 2010 06:39

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

Post by feiyuzb78 »

Code: Select all

Project : error PRJ0019: A tool returned an error code from "Determining version number"
What is the reason?
halihmed
Engineer
Engineer
Posts: 1
Joined: 26 May 2010 18:26

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

Post by halihmed »

Hi guys,
i have installed this OTTD on my Samsung omnia II but i!m receiving error "Invalid language packs (wrong versions?)". Any idea how to solve it? thanks

all required files are in right directory.
fryc88
Engineer
Engineer
Posts: 1
Joined: 14 Jun 2010 06:31

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

Post by fryc88 »

Hi,
I was trying to install OTTD on my SE X1 with WM 6.5 ROM, but unfortunatly i got "No available language packs (invalid versions?)" error when trying to start it.
I made a copy from my original TTD for Win95 CD to "(card)\Program Files\openttd\data\" directory, also i see 'english' and 'english_US' in Lang directory, so i don't get whats the problem here...

Any clues how to get it working? I really wish to have this game :)
Tressy
Engineer
Engineer
Posts: 2
Joined: 15 Sep 2010 15:41

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

Post by Tressy »

Player701 wrote:Hello everybody, I'm new here.

This port runs fine on my Toshiba G810, with one exception: it is too uncomfortable in portrait screen mode. When I try to switch the resolution to landscape (240x320 or something like this), game crashes.

I've also tried setting landscape screen mode in WM settings, but this had no effect.

I suggest that this problem is SDL-related. If others can make this port run in landscape on QVGA screen, this may be hardware-related then.

I would like to see the compiled binaries without SDL here, maybe they will work properly on my PDA.

P.S. Sorry for bad English.

I have similiar problem.Any solution for this issue?
bkf1
Engineer
Engineer
Posts: 3
Joined: 29 Jan 2011 19:44

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

Post by bkf1 »

Hello all,
have anyone any idea where to get other languages? I tryed langs from other TTD ports and from 0.7.2 RC2 PC port but none of them worked :( Can you please help me or better send me working lang files?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

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

Post by Alberth »

Download the exact revision you have, and build the language files with strgen.
(Language files are very revision specific, language strings change a lot.)
bkf1
Engineer
Engineer
Posts: 3
Joined: 29 Jan 2011 19:44

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

Post by bkf1 »

I have LNG files from exact revision 0.7.2-RC2 but they are not working :(
I have bigger problem... on my WVGA device (Touch HD) is TTD nearly unplayaple because of tiny controls :( I tryed to change resoluton to 320x240 (best it would be 400x240 - for wide resolution devices) but where setting windows is so high it can't be closed then :( I have tested latest revision from Lampje in emulators and I know than his revison is capable of QVGA and WQVGA but HOW TO FORCE these resolutions on VGA/WVGA devices on TTD startup?
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

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

Post by Rubidium »

bkf1 wrote:I have LNG files from exact revision 0.7.2-RC2 but they are not working
Then (obviously) the only conclusion I can make is that the version of OpenTTD you're trying to run is not 0.7.2-RC2, or in other words: if the port says it's 0.7.2-RC2 it is lieing.
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

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

Post by SHADOW-XIII »

small info for interested (not sure if correct topic but hey, I searched) ...
Microsoft is banning/prohibiting any app on it's marketplace (Zune/Windows Phone) that has to come with additional licence file.
That includes all GPL type licences, so no official OTTD on it anymore.
what are you looking at? it's a signature!
Henry381
Engineer
Engineer
Posts: 3
Joined: 02 Mar 2011 12:34

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

Post by Henry381 »

Hi everyone, I'm new here and to OpenTTD. Not sure if people are still having problems with the "out of memory, can't allocate IU bytes" but I was having this error everytime my first train left the depot (or a minute or so after it left), whether I had new GRF files installed or not, until I changed the pathfinder for trains and buses (not sure if it is necessary for buses) from YAPF to NPF. I've not had a crash since.

Anyway, my problem is with the downloadable content. I'm using an Omnia 2 and can download content fine but when I go to apply it in New GRF settings or AI Settings, the program can't find it. I've checked and the content has downloaded to the relevant folder ('date' or 'ai') in the 'downloaded content' folder but the game still can't detect it. I've re-installed twice as well.

This isn't really a problem with New GRF files as I can install them manually but I can't seem to install an AI at all which means the game is isn't as much fun if I'm the only company. Is anyone else having this problem? Am I missing something really obvious, I just installed Cab and copied original graphics files, sample cat etc over, is there anything else I should have done when installing?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 8 guests