GP2X Wip & Help Wanted: Porting Battle For Wesnoth


ivanovic

Active Member
Joined
Aug 4, 2006
Messages
784
Hi everyone!
In the last weeks grzywacz was working hard on making Wesnoth run on the GP2X. There now is a pre Alpha (only barely playable) available: wesnoth-gp2x-preAlpha-100506.tar.bz2
As I did state in the included readme we still have several problems left. The main problems are the general speed and the ram usage. The sources used for building this binary were taken directly taken from svn trunk: http://www.wesnoth.org/wiki/WesnothSVN
All the changes needed to improve the gp2x version will also go into that tree since it is not "only" some port but part of the main project.
If you want to help us improve the game for the gp2x (or in general) it would be great if you contacted us in the irc channel #wesnoth-dev on irc.freenode.net or in the official wesnoth forums . All help we can get is really appreciated. Somehow we might be able to get it work without "external" help from you, but it might take quite long... ;)
Greets,
Nils Kneuper aka Ivanovic
 
Well yes, memory usage is the most annoying problem atm, but I'm afraid that it's mostly Wesnoth's fault. 8) For the brave ones who would like to compile it themselves, here's my quick configure.ac patch (so that it doesn't try to run SDL test programs compiled for ARM on x86):

Code:
Index: configure.ac
===================================================================
--- configure.ac		(wersja 13762)
+++ configure.ac		(kopia robocza)
@@ -600,33 +600,11 @@
 # so recommend using fink sdl packages as a workaround
 
 ac_link="$LDPREFIX $ac_link"
-AC_CHECK_LIB([SDL_image],
-			[IMG_Load],
-			[if test -n "$LDPREFIX" -a -r `$SDL_CONFIG --prefix`/lib/libSDL_image.la
-then SDL_IMAGE_LIBS=`$SDL_CONFIG --prefix`/lib/libSDL_image.la
-else SDL_IMAGE_LIBS=-lSDL_image
-fi],
-			[AC_MSG_ERROR([*** SDL_image lib not found! Get SDL_image from
-http://www.libsdl.org/projects/SDL_image/index.html])])
 
-AC_CHECK_LIB([SDL_mixer],
-			[Mix_OpenAudio],
-			[if test -n "$LDPREFIX" -a -r `$SDL_CONFIG --prefix`/lib/libSDL_mixer.la
-then SDL_MIXER_LIBS=`$SDL_CONFIG --prefix`/lib/libSDL_mixer.la
-else SDL_MIXER_LIBS=-lSDL_mixer
-fi],
-			[AC_MSG_ERROR([*** SDL_mixer lib not found! Get SDL_mixer from
-http://www.libsdl.org/projects/SDL_mixer/index.html])])
+SDL_IMAGE_LIBS=-lSDL_image
+SDL_MIXER_LIBS=-lSDL_mixer
+SDL_NET_LIBS=-lSDL_net
 
-AC_CHECK_LIB([SDL_net],
-			[SDLNet_Init],
-			[if test -n "$LDPREFIX" -a -r `$SDL_CONFIG --prefix`/lib/libSDL_net.la
-then SDL_NET_LIBS=`$SDL_CONFIG --prefix`/lib/libSDL_net.la
-else SDL_NET_LIBS=-lSDL_net
-fi],
-			[AC_MSG_ERROR([*** SDL_net lib not found! Get SDL_net from
-http://www.libsdl.org/projects/SDL_net/index.html])])
-
 LIBS=$OLD_LIBS
 
 AC_SUBST([SDL_LIBS])

And my oversimplified (and probably broken :p) makefile which uses oopo's devkit. Set the paths as appropriate for your environments:

Code:
 GP2XDEV = /home/karol/programowanie/gp2xdev
 PATH	= $(GP2XDEV)/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/bin:/home/karol/bin
 PREFIX  = $(GP2XDEV)
 CC	  = gp2x-gcc
 CXX	 = gp2x-g++
 CFLAGS  = -Os -ffast-math -fomit-frame-pointer -mcpu=arm920t -I$(PREFIX)/include
 LDFLAGS = -L$(PREFIX)/lib
 FLAGS   = CC='$(CC) $(CFLAGS) $(LDFLAGS)' CXX='$(CXX) $(CFLAGS) $(LDFLAGS)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)'

wesnoth: /mnt/sd/wesnoth/wesnoth Makefile
/mnt/sd/wesnoth/wesnoth:
		$(FLAGS) make

konfiguracja:
		$(FLAGS) ./configure --prefix=/mnt/sd/wesnoth --disable-sdltest --enable-static --disable-nls --enable-tinygui --enable-gp2x --enable-lowmem --with-preferences-dir=.  --build=`uname -m` --host=gp2x

install:
		$(FLAGS) make install && gp2x-strip --strip-all /mnt/sd/wesnoth/bin/wesnoth

Just "make konfiguracja wesnoth install" and make sure that you have /mnt/sd writable on your box. :p
 
I don't suppose any progress has been made on the Wesnoth front? I'd LOVE to be able to play it on my '2x. 'twas great to see that version running, though obviously it's a bit too slow to play :p

Sadly I have no coding skills so can't help port it, all I can offer is my love you guys if you manage to get it playable <3 and some donations ofcourse.
 
ATM it looks rather bad for gp2x support since we are about to switch to opengl. Yes, that is needed to make sure that it works nicely on "normal" computers. Though we only stay with 2D opengl it probably still is a problem for the gp2x. We will probably drop SDL backwards compatibility. So if someone really wants to try porting, 1.2 is the version to do so. I have no idea if we will be able to do anything about an "official" gp2x port, but if someone manages to create it I am rather sure that we got some space in our SVN for him for this stuff.
So if you want to work on it you might want to visit #wesnoth-dev on irc.freenode.net or our forums at http://forum.wesnoth.org.
i', sorry that I have to submit these bad news.
 
Ivanovic posted on Dec 28 2006 at 04:12 PM said:
ATM it looks rather bad for gp2x support since we are about to switch to opengl. Yes, that is needed to make sure that it works nicely on "normal" computers. Though we only stay with 2D opengl it probably still is a problem for the gp2x.

If you do not use fancy features of openGl, gpu940, which comes with a simple openGl implementation, may help.
 
Last edited by a moderator:
Wesnoth runs awesomely slowly on the 2x right now, and I don't see it helping to try to run openGL code on it too :p

Is there any chance at all of ever creating a playable version? It'd be awesomely good! I realise the code is quite demanding; would it be possible to improve matters by reducing graphical prettiness somehow? I'm no coder so have no idea how viable this would be..
 
Ivanovic posted on Dec 28 2006 at 10:12 AM said:
ATM it looks rather bad for gp2x support since we are about to switch to opengl. Yes, that is needed to make sure that it works nicely on "normal" computers. Though we only stay with 2D opengl it probably still is a problem for the gp2x. We will probably drop SDL backwards compatibility. So if someone really wants to try porting, 1.2 is the version to do so. I have no idea if we will be able to do anything about an "official" gp2x port, but if someone manages to create it I am rather sure that we got some space in our SVN for him for this stuff.
So if you want to work on it you might want to visit #wesnoth-dev on irc.freenode.net or our forums at http://forum.wesnoth.org.
i', sorry that I have to submit these bad news.
Before you abandon development altogether, would you mind zipping together the source of what you did accomplish so any future developer will have a starting point?
 
Last edited by a moderator:
Before you abandon development altogether, would you mind zipping together the source of what you did accomplish so any future developer will have a starting point?
No need to zip anything, we do have an svn, everyone is free to download it. For any special changes, ask grzywacz for more details but I don't think there are many changes specific to the gp2x that were not merged already.
 
Last edited by a moderator:
Ivanovic posted on Dec 28 2006 at 10:12 AM said:
ATM it looks rather bad for gp2x support since we are about to switch to opengl.

have you seen rixed's 3d renderer / opengl implementation? if you don't get too fancy with opengl, it may actually help things. keep in mind that other than browse the cvs a little i haven't done anything with it, but you should at least check it out.

https://gna.org/projects/gpu940/
 
Last edited by a moderator:
Lately grzywacz was heavyly working on improving the gp2x port. He is working on it in an own branch in our rep and somehow it is a mixture of 1.2 (rules and stuff) with some changes from trunk that are in general too intrusive to be ported to 1.2 but that are needed to use Wesnoth on the gp2x. Today he did create a new alpha version and upload it to sf.net (no april fools day joke). Have a look at the forum thread about the gp2x version for some more infos on current progress: http://www.wesnoth.org/forum/viewtopic.php?p=224254#224254

As always: Any help is welcome and have a look at the readme file to get some infos about the (huge amount of) existing problems. So if you want to help with this port, just post in the thread linked above or visit us in our irc-chan #wesnoth-dev on irc.freenode.net.
 
Ivanovic posted on Apr 1 2007 at 02:07 AM said:
Lately grzywacz was heavyly working on improving the gp2x port. He is working on it in an own branch in our rep and somehow it is a mixture of 1.2 (rules and stuff) with some changes from trunk that are in general too intrusive to be ported to 1.2 but that are needed to use Wesnoth on the gp2x. Today he did create a new alpha version and upload it to sf.net (no april fools day joke). Have a look at the forum thread about the gp2x version for some more infos on current progress: http://www.wesnoth.org/forum/viewtopic.php?p=224254#224254

As always: Any help is welcome and have a look at the readme file to get some infos about the (huge amount of) existing problems. So if you want to help with this port, just post in the thread linked above or visit us in our irc-chan #wesnoth-dev on irc.freenode.net.

Maybe it's an good idea to upload the file to: http://archive.gp2x.de/cgi-bin/cfiles.cgi and the GP2X wiki in order to create more exposure and attract devlopers.
 
Last edited by a moderator:
In the last days grzywacz was really busy improving Wesnoth on the gp2x. The results of this is the latest alpha version that can be found here: http://www.wesnoth.org/forum/viewtopic.php?p=228268#228268.

Most important changes:
* Reduced memory usage that makes the game almost playable. A small campaign like Two Brothers might already be completely playable.
* Fixed scaling problems resulting in strange image artifacts. Now the images should look as nice as you are used to them from the "normal" game.

The downloadlink and a link to some more infos about the gp2x port of Wesnoth is available in the forum post in the Wesnoth forums that I linked above.
 
Couldnt you define an compile/configuration time dispatchable drawing interface that can be implemented in opengl and gp2x/sdl? Or do you need opengl specific features inside the game?
 
Back
Top