Run fenix GP2X games on linux possible?


b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,485
I just installed Fenix on my Ubuntu Linux desktop and extracted a ruckage gp2x game to see if it is possible to execute the game on another device then the GP2X.

GPE that starts Ruck-man:

#!/bin/sh
cd runtime
./fxi ../data/ruckman.dcb -s233
cd /usr/gp2x
exec /usr/gp2x/gp2xmenu

it seems that fxi is the fenix GP2X executable and ruckman.dcb is the game itself. Now I installed fenix but the fxi command is not recognized. Nothing that starts with fenix as well.
Running fxi from the gp2x results (no surprise) in bash: ./fxi: cannot execute binary file: Exec format error

I have installed fenix-dev, fenix-plugins:386 and fenix-plugins-mpeg:386 - no other fenix packages is available in the repo.

Then installed http://manpages.ubuntu.com/manpages/xenial/en/man1/fenix-fxi.1.html and after that

fenix-fxi ruckman.dcb results in'ruckman.dcb': file does not exist or it's not a DCB version 6 file or compatible

Ubuntu fenix-fxi version is 0.92 and I think ruckage used 0.8 so could be incompatible. I haven't found a 0.8 deb yet or source that can be compiled.
http://fenix.divsite.net/ doesn't really help..

I have seen a comment of someone that managed to execute a ruckage game on his Linux PC so I hope it is possible. Any suggestions?
 
The binaries are in package "fenix".
Code:
$ dpkg -L fenix | grep /bin/
/usr/bin/fenix-fpg
/usr/bin/fenix-fxc
/usr/bin/fenix-fxi
/usr/bin/fenix-map
/usr/bin/fenix

EDIT: Should have read your post to the end, seems like you already got there...
[doublepost=1515935312,1515933983][/doublepost]The fenix site seems to be pretty broken, the SourceForge project page should be more useful: https://sourceforge.net/projects/fenix/files/Fenix/

Code:
sudo apt-get build-dep fenix
should be helpful when trying to build fenix. The absence of 64bit debs probably means that it has to be built as a 32bit program, so the compiler and linker options have to be adjusted accordingly.
 
The fenix site seems to be pretty broken, the SourceForge project page should be more useful: https://sourceforge.net/projects/fenix/files/Fenix/

Thanks, GP2X seems to be using 0.84 but that version is not available so I downloaded 0.82

Code:
sudo apt-get build-dep fenix
should be helpful when trying to build fenix. The absence of 64bit debs probably means that it has to be built as a 32bit program, so the compiler and linker options have to be adjusted accordingly.

This is uncharted territory for me, probably too advanced to solved it.
Unless it can be fixed by adjusting the make file or add an argument to make. Need some guidance then though..

Code:
# target=win32
# SDL=/win32

all:
#    cd map; make
#    cd fpg; make
    cd fxc; make
    cd fxi; make

clean:
#    (cd map; make clean)
#    (cd fpg; make clean)
    (cd fxc; make clean)
    (cd fxi; make clean)
    rm -f core *.dcb *.exe *.dll bin/fxi bin/fxc bin/*.exe

dist:
    make clean
    (cd .. ; tar zcvf fenix-src.tgz fenix)
    make debug=false ; mv bin dist ; make clean ; mv dist bin
    (cd .. ; tar zcvf fenix-linux-i386.tgz fenix \
         --exclude fenix/src \
         --exclude fenix/SDL)
    make clean
    (PATH=/win32/bin:$$PATH make target=win32 debug=false SDL=/win32 ; \
     mv bin/* . ; cp /win32/lib/*.dll .)
    (cd .. ; zip -r fenix-win32.zip fenix/* ; \
     zip -d fenix-win32.zip fenix/src/* fenix/src/*/* \
        fenix/SDL/*/*/* fenix/SDL/*/* fenix/SDL/* fenix/SDL)

backup:    clean
    tar zcvf ../divc.tgz .

Tried make without any arguments or adjustments..

cd fxc; make
make[1]: Entering directory '/home/bob/Downloads/fenix/fxc'
cd src; make
make[2]: Entering directory '/home/bob/Downloads/fenix/fxc/src'
cc -Wall -O2 -g -DDEBUG -g -DTARGET_mac -I/usr/include/SDL -I../../include -I../inc -I/usr/local/include/SDL -I/sw/include -c -o main.o main.c
In file included from /usr/include/SDL/SDL_stdinc.h:63:0,
from /usr/include/SDL/SDL_types.h:28,
from ../inc/fxc.h:37,
from main.c:31:
../../include/strings.h:43:37: error: unknown type name ‘file’
extern void string_load (file *) ;
^
../../include/strings.h:44:37: error: unknown type name ‘file’
extern void string_save (file *) ;
^
main.c:87:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main (int argc, char **argv)
^
<builtin>: recipe for target 'main.o' failed
make[2]: *** [main.o] Error 1
make[2]: Leaving directory '/home/bob/Downloads/fenix/fxc/src'
Makefile:3: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/bob/Downloads/fenix/fxc'
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2
 
I've had a quick look at version 0.82, and I dont think it is worth bothering with. I fixed the first couple of compilation errors, but they just keep coming. The linux build ("make target=linux") is simply broken in this version.

More importantly tough, I've looked at the Ruck-Man (GP2X version) .dcb file, and it seems to be file format version 2. The code for fenix 0.82 seems to only support version 0 (see fxi/src/dcbr.c).
[doublepost=1515974336,1515971261][/doublepost]Had another look - the next downloadable version (0.86) already requires file format version 5. The first version in CVS (2005) also already requires version 3.
 
I have found fenixb4_src.zip from archive.org's copy of Puck's old site (gp32wip.com). Unfortunately, they have not archived a copy of fenixb6_src.zip, which seems to be the ultimate version.

With some hacking, I have gotten Ruck-Man running with that version. It appears that this version was ported to the GP2X without any concerns for compatibility with existing platforms - ie GP2X and ARM-specific stuff was put in there unconditionally. That all had to be reverted to make it compile and run. There are still some graphical issues, and some controls are not mapped sensibly.

ruck.png


Maybe Puck still has a copy of the b6 sources code - then again, if the changes in there are only GP2X specific, they might not be needed in order to get stuff running on the PC.

I might work on this some more - I think it would be cool to have a version of fxi available that can run GP2X-era DCBs.
 
I might work on this some more - I think it would be cool to have a version of fxi available that can run GP2X-era DCBs.

Awesome - would love to see that. I have a few Linux PC's around with different versions of Ubuntu to test if needed.
 
Small update:
- I have fixed the graphics errors
- Implemented input remapping via config file
- Activated scale2x
- The games no longer have control of some screen options

Tried some more games: Protozoa, GPNoid, Ghost Pix work

ghost.png

Some other games have issues:
- Nazca Runners runs, but you cannot move
- Malvado does not run due to file name case sensitivity

Still need to investigate mouse/touchscreen support.
 
Last edited:
It is already working very nicely, thanks :)

A game like snake on dope that needs accurate input has no problems at all and seems to respond just like the gp2x (only played for a few minutes). No graphical glitches or problems with sound.

I couldn't start ruck-man though, enter key isn't accepted to start the game. Pushed all keys on the keyboard. Also created a fxi-2x84.conf but that didn't help.
It does exit when I press enter combined with space and in other Ruckage games it works fine as well (usually pauses the game)

[keys]
up=up
down=down
left=left
Right=right
select=space
start=return
a=a
b=d
x=s
y=w
l=1
r=3
push=p
vol_up=none
vol_down=none
 
Ruck-Man should definitely work. It should react to the "B" button, so the "D" key in your config (left "Alt" key by default).

Meanwhile, I have been experimenting with OpenGL-based scaling, and it is running smoothly. With --scale2x, my (admittedly slow) laptop was struggling to even make the 30FPS cap set by Ruck-Man (33ms/frame). Scale2x and SDL_UpdateRect (which puts the pixels onto the screen) took about 15ms each.
Doing the scaling/conversion/blitting via OpenGL is much faster. There are still issues with alpha blending though, for example in Ghost Pix (the yellow highlights visible in my screenshot above are rendered as solid black).
 
Yes, you're right. The d key was working. Not sure why it didn't work the first time I tried, maybe caps lock.. oh well..
On my main system ruck-man is working brilliantly with scale2x but that system is pretty fast.
Will using OpenGL make full screen feasible?

Is it possible to assign one key for simultaneously pressing two keys? Reason is to exit ruck-man with one key (e.g 'q' or escape) instead of pressing select+start.
 
You can map "start=q" and "select=q", but then you can only press both at the same time. That would make it impossibe to pause the game for example. I guess what you want is to map "start=return,q" and "select=space,q", but that is currently not possible.

Fullscreen is on the to-do list. Coincidentally, the primary reason i disabled it was because where was no convenient way to get out of some of the DCBs I tried that ran in fullscreen.

Originally, there were three ways to quit the interpreter (independent of the game):

- (only on GP2X): the special joystick button combo (L+R+PUSH)
- (only if the DCB file is set to debug mode) ALT-X
- (only if the DCB file is set to debug mode) Closing the window, (ie ALT-F4), only works in window mode for obvious reasons

I have made the last one unconditional, so that always works now. The second one i have coupled to the "-d" (debugger) command line option at the moment, along with the console (ALT-C) and profiler (ALT-P/ALT-S), but these should really be kept separate from the debugger.

I'll probably make it so that ALT-F4 always works, and add separate options for enabling the console/profiler.
 
You can map "start=q" and "select=q", but then you can only press both at the same time. That would make it impossibe to pause the game for example.

This solution works fine and not a problem for ruck-man. created a conf with q to exit, return to start and escape to go back to previous selection. Seems the most intuitive configuration at least for ruck-man as a stand-alone game.
 
Released a new build: https://gitlab.com/chenz/fenix-2x84/tags/2x84-0.2 See release notes/README for details. Fullscreen support is still "dumb" at the moment, ie not trying to preserve aspect ratio.

Does anyone know of a GP2X-released 0.84 game that uses the touch screen?

BTW I think this thread should eventually be moved to the Fenix/Bennu section.
 
Released a new build: https://gitlab.com/chenz/fenix-2x84/tags/2x84-0.2 See release notes/README for details. Fullscreen support is still "dumb" at the moment, ie not trying to preserve aspect ratio.

Works like a charm :)
One error though, my .conf file is not accepted anymore.
ERROR: in file '/home/bob/.config/fxi-2x84.conf':

[keys]
up=up
down=down
left=left
Right=right
select=q
start=q
a=escape
b=return
x=escape
y=w
l=1
r=3
push=p
vol_up=none
vol_down=none

Does anyone know of a GP2X-released 0.84 game that uses the touch screen?

Ruckage made some games that used the touch screen (not sure if that was specifically for 0.84 though)
http://dl.openhandhelds.org/cgi-bin/gp2x.cgi?0,0,0,0,27,2527


BTW I think this thread should eventually be moved to the Fenix/Bennu section.


Yes - certainly with the updates you've provided. In the off topic section it will be lost for others.

@TrashyMG @Binky @mods : see request from hmn.
 
ERROR: in file '/home/bob/.config/fxi-2x84.conf':
Hmm, that error message should only look like that if the file cannot be opened for reading, or if there is a syntax error. I'll improve the error message.
 
Back
Top