OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: azalin on February 10, 2006, 08:30:42 am

Title: Gemrb
Post by: azalin on February 10, 2006, 08:30:42 am
Although it is not finished, this looks like a very interesting project:
http://gemrb.sourceforge.net/ (http://gemrb.sourceforge.net/)
As it will allow to run some very nice games like Baldurs gate (1, 2, expansions), Icewind Dale and most of all, Planescape Torment on Linux!
Did anyone try to compile it for the Zaurus before?
Title: Gemrb
Post by: TheWalt on February 10, 2006, 08:55:49 am
Quote
Although it is not finished, this looks like a very interesting project:
http://gemrb.sourceforge.net/ (http://gemrb.sourceforge.net/)
As it will allow to run some very nice games like Baldurs gate (1, 2, expansions), Icewind Dale and most of all, Planescape Torment on Linux!
Did anyone try to compile it for the Zaurus before?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114386\"][{POST_SNAPBACK}][/a][/div]

No Way!  That would be SWEET
Title: Gemrb
Post by: anunakin on February 10, 2006, 09:24:14 pm
I think this can works on Zx00 and Zx000 machines...    my BG CDs go see the light again!
Title: Gemrb
Post by: scoutme on February 11, 2006, 08:47:21 pm
c'mon, let's try!
Title: Gemrb
Post by: Cresho on February 11, 2006, 10:38:26 pm
Interesting.
Title: Gemrb
Post by: ThC on February 12, 2006, 06:36:53 am
on the screenshots section of the site, there's a gkrellm launched and one can notice that 70% of cpu is used and it don't seem to have any other program open ... I guess this would be a little heavy for our poor little Zs :s
Title: Gemrb
Post by: azalin on February 13, 2006, 03:50:42 am
Quote
on the screenshots section of the site, there's a gkrellm launched and one can notice that 70% of cpu is used and it don't seem to have any other program open ... I guess this would be a little heavy for our poor little Zs :s
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114553\"][{POST_SNAPBACK}][/a][/div]
Hmm, I wonder what kind of CPU that was. From what I remember BG engine used huge full colour bitmaps and scrolled those around. Now I wonder what speed increases you would get if you say downscale the graphic size and the amount of colours, processor utilisation would go down lots. Perhaps using the MMX instructions at some places may help too?
Title: Gemrb
Post by: desertrat on February 13, 2006, 08:56:46 am
Quote
Hmm, I wonder what kind of CPU that was. From what I remember BG engine used huge full colour bitmaps and scrolled those around. Now I wonder what speed increases you would get if you say downscale the graphic size and the amount of colours, processor utilisation would go down lots. Perhaps using the MMX instructions at some places may help too?

BG2 runs pretty slow on my 500MHz Celeron desktop. Admittedly it's got a crappy graphics card and I have to turn off almost all of the fancy graphical effects for it to run at a reasonable speed.

Whilst I would love to be able to play BG2 on the Z I'm afraid it might have to be on a future generation of Z. Still, if one can emulate a PS at full speed on the Z then there is hope yet!

Incidently, a full install of BG2 takes around 2.6GB, that's a good chunk of the microdrive gone  

-- cheers
Title: Gemrb
Post by: azalin on March 17, 2006, 08:21:39 am
A progress report of what I did so far:
The GemRB program needs the sound library OpenAL, that wraps to ALSA. So I compiled the OpenAL library, then it turned out that GemRB needs a function from alut as well. ALUT is the utility functions that belong to OpenAL (just as Glut are the utility functions for OpenGL). I copied the lib manually to the dev environment, and got the .h files from the common/include/AL directory in the openAL archive.
What I am stuck at now is the following: When making freealut, it stops at src/alutUtil.c with the error:

alutUtil.o
alutUtil.c: In function `alutSleep':
alutUtil.c:30: error: storage size of 't' isn't known
alutUtil.c:30: error: storage size of 'remainingTime' isn't known
alutUtil.c:35: warning: implicit declaration of function `nanosleep'
alutUtil.c:30: warning: unused variable `t'
alutUtil.c:30: warning: unused variable `remainingTime'

So I checked which include this struct was defined in, it is in
/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include/time.h
where I find:
#if !defined __timespec_defined && \
    ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timespec)

struct timespec
  {
    __time_t tv_sec;            /* Seconds.  */
    long int tv_nsec;           /* Nanoseconds.  */
  };

#endif
Not sure whether those defines are true, but if not then it is already defined elsewhere, I also see it in for example: aio.h, netdb.h, pthread.h, sched.h, semaphore.h and signal.h. But I think in those it is only used and not defined. So perhaps there is a missing include or I need to link a file where the machine bindings for timespec are defined somewhere.

Alternatively, I can leave out the ACMImporter library and the Nullsound module will be used in GemRB (after I figure out how to do that of course  I hope there's a configure --disable option for it, that would be easiest).

p.s. I got the alut and openal sources from http://www.openal.org/ (http://www.openal.org/)
p.p.s. Hmm I just found out that I couldn't find an ALSA library for pdaxrom, perhaps I should just use the nullsound for now. I should have checked that first ah well. Wierd that my OpenAL completed make but didn't complain about that, perhaps because I didn't link it yet to something else.
Title: Gemrb
Post by: azalin on March 20, 2006, 04:17:14 am
Little update:
Since I am trying to compile without sound now I modified the makefile.am files and the configure script then tried to run automake and autoconf.
However I ran into this bug:
http://www.pdaxrom.org/buglist.php?doactio...owbug&bugid=352 (http://www.pdaxrom.org/buglist.php?doaction=showbug&bugid=352)
Took a while to figure out, as I also needed to run aclocal.

So what I got is:
gemrb-0.2.6> automake
autom4te: need GNU m4 1.4 or later: /opt/native/i686/3.4.5-2.2.5/bin/m4
automake: autoconf failed with exit status: 1
gemrb-0.2.6> which m4
/usr/bin/m4
So the solution is:
M4=`which m4` automake
However I now get
gemrb-0.2.6> M4=`which m4` automake
configure.in:35: version mismatch. This is Automake 1.9.2,
configure.in:35: but the definition used by this AM_INIT_AUTOMAKE
configure.in:35: comes from Automake 1.7.9. You should recreate
configure.in:35: aclocal.m4 with aclocal and run automake again.

After doing
M4=`which m4` aclocal
M4=`which m4` automake
M4=`which m4` autoconf
M4=`which m4` autoheader
Then configure passes this point... and gives an error that the python version is
too old as the program needs Python 2.3.0 or greater.
Once it is configured (which does not work yet), make also needs to be
M4=`which m4` make

edit: Hmm strange, the Python libs are 2.4 so I am going to find out why it cannot find them now.
edit2: Hmm not sure what to think of this one, but I think I found what the problem is:

checking for python... /opt/cross/arm/3.4.5-xscale-softvfp/bin/python
checking if Python version >= 2.3.0... too old
configure: error:
*** You need Python (www.python.org) version 2.3.0 or greater to compile GemRB
file /opt/cross/arm/3.4.5-xscale-softvfp/bin/python
/opt/cross/arm/3.4.5-xscale-softvfp/bin/python: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped
It's the i386 version hmm.

cp /opt/cross/arm/3.4.5-xscale-softvfp/bin/python2.4 /opt/cross/arm/3.4.5-xscale-softvfp/bin/python
gives
cp: `/opt/cross/arm/3.4.5-xscale-softvfp/bin/python2.4' and `/opt/cross/arm/3.4.5-xscale-softvfp/bin/python' are the same file

So even though it's the i386 version, it should give a version number higher than 2.3.0.
The way I set up the dev environment is this:

#!/bin/bash
. /etc/profile
export PATH=/opt/cross/arm/3.4.5-xscale-softvfp/bin:$PATH
export QTDIR=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/qt
export KDEDIR=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/qt
export X11INC=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include
export X11LIB=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib
export PKG_CONFIG_PATH=/opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib/pkgconfig
export LD_LIBRARY_PATH=/opt/cross/arm/3.4.5-xscale-softvfp/lib
echo "Type exit for leave armv5tel-cacko-linux cross environment."
/bin/bash

I think that this is because the PATH variable makes it look in
/opt/cross/arm/3.4.5-xscale-softvfp/bin while it is found elsewhere (though not in /opt/cross/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/bin/ )
in my modified script.
There are a few things I am going to try now, perhaps just removing the check for python will
work.
The command I use to configure is:
LDFLAGS=-Wl,-rpath-link,/opt/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib/X11 ./configure --host=armv5tel-cacko-linux --build=i686-linux --x-includes=/opt/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/include/X11 --x-libraries=/opt/arm/3.4.5-xscale-softvfp/armv5tel-cacko-linux/lib/X11
My first try just removing some of the checks in configure.in resulted in:
config.status: creating config.h
config.status: config.h is unchanged
config.status: linking ././fnmatch_.h to ./fnmatch.h
config.status: error: ././fnmatch_.h: file not found
Probably it needs to set flags for certain functions (the ones I removed from the configure script!) and therefore it cannot create config.h, or am I wrong there?