Bennu Port

Sandman

Still Fresh
Joined
Jan 18, 2008
Messages
70
Well first preview of a Bennu port to the GP2X. :)

Well I actually have had it done for some weeks, just wanted to perfect it, but then my GP2X broke (well I broke it, will fix it this weekend if I have time). But anyway, here is the first release.

Let me know if it is to your liking. :)

'Burbruee' said:
It works pretty good, no problems yet and I like many of the features Bennu introduces since Fenix 0.92a. :)

Do you think it's possible to get networking up via usbnet on the f-100? So far I have a working code, but I need a libnetwork.so for the gp2x, I could only find a windows dll on the wiki. Thanks.
Cool to know you're using my network DLL. :) I will checkout porting it to the GP2X; this probably won't be too much hassle, if SDL_Net runs on it.

Another note: it is highly likely I will remove mod_gp2x in later versions and then more general modules will be added, so to keep the portability of Bennu code (think mod_sdcard, mod_battery or something).

Another thing: the Fenix port mapped some keys to the input (like _X and _ALT), however I think that's a weird thing to do. But my question: does anyone want that functionality? If so, I can make it optional.

PS: Thought I'd start a new topic about it.
 
Last edited by a moderator:

Burbruee

Member
Joined
Sep 28, 2006
Messages
302
Location
Skåne, Sweden.
Website
Visit site
Thanks again for the port, Bennu is great. :)
I don't think SDL_Net is available, so it would have to be ported too.

About the keys, I don't think it's a bad thing to map the keys like they were in the fenix interpreter 0.84 and 0.92 for the gp2x.
It would save some time when making our old fenix games Bennu compatible.

Here's what I usually include in the Global section of all my games, to not be confused:
CODE

//GP2X Controls
__A = _control;
__B = _alt;
__X = _x;
__Y = _z;
__SELECT = _space;
__START = _enter;
__R = _tab;
__L = _backspace;
__CLICK = _c;
__VOLm = _a;
__VOLp = _s;


But I guess the search and replace feature of any editor would work too if you decide not to do it.

Thanks again, I really like Bennu and can finally start using it. I saw on your forums that you could even run Bennu on a Wii through bliight, heh. :p
 
Last edited by a moderator:

Hooka

That Guy!
Joined
Jul 19, 2003
Messages
1,737
Age
36
Location
Canada
Website
Visit site
I did manage to compile SDL_Net, but never tested to see if it was functioning properly, so technically it compiles but is untested.
 

Burbruee

Member
Joined
Sep 28, 2006
Messages
302
Location
Skåne, Sweden.
Website
Visit site
Hello!
Did the behavior for the rand() function change with Bennu or did I just encounter a bug?

Not talking about the gp2x port at the moment but Bennu in general.
I was building a platform game and was just testing to set a randomized bg color and also a randomized start position for x.

So it should just be: (bg process)
CODE

Process Bg()
Begin
x = SIZE_X / 2;
y = SIZE_Y / 2;
z = 1000;
graph = new_map( SIZE_X, SIZE_Y, 16 );
map_clear( 0, graph, rgb( rand( 0, 255 ), rand( 0, 255 ), rand( 0, 255 ) ) );
loop
frame;
end;
End;



The background is exactly the same color every time I start the program, also in the player process:

CODE

x = rand( 0, SIZE_X );
y = -10;



The player will start at the exact same location every time.

I tested the same code in Fenix 0.92a just now, (the only difference to remove the imports mod_* in the beginning) and it worked. New bg color every time and random x-position spawn point for the player.

Hooka: Nice, is it available for download? :)
 
Last edited by a moderator:

Sandman

Still Fresh
Joined
Jan 18, 2008
Messages
70
Last edited by a moderator:

Burbruee

Member
Joined
Sep 28, 2006
Messages
302
Location
Skåne, Sweden.
Website
Visit site
'Sandman' said:
That's actually not so strange. I suggest doing:
CODE
rand_seed(time());

This will ensure 'randomness'. Fenix did this for you.

Also, have a look at the wiki pages:
>http://wiki.bennugd.org/index.php?title=Rand_seed
>http://wiki.bennugd.org/index.php?title=Rand

I will provide a mode so those inputs will be accepted too, it's not much work at all. However, it will be turned off by default, because keys are keys and joysticks are joysticks.

Ah, well of course, I should have known that. I remember doing srand(time(NULL)) in C++.
I blame Fenix for doing all things for me automatically, you get too used to that sometimes. :lol:
 
Last edited by a moderator:

Hooka

That Guy!
Joined
Jul 19, 2003
Messages
1,737
Age
36
Location
Canada
Website
Visit site
burbruee: I'll give a look around to see if I still have it kickin' around somewhere :) Might be a couple days...
 
Last edited by a moderator:

ruckage

Certified Guru
Joined
Oct 15, 2006
Messages
659
Damn - how did I miss this. I will definately try this out as from what I've seen of Bennu it's great. As for mapping the controls to _x, _alt it would be nice if that option was included, partly because it's what I've gotten used to now and as Burbruee said it would also make it easier for recompiling old gp2x fenix programs for the Bennu runtime.

I Will have to do some tests now to compare the speed of this with Fenix/Ufenix.

Thanks Sandman
 
Last edited by a moderator:

Imerion

Member
Joined
Feb 24, 2005
Messages
218
Hey, this is nice! I was thinking about switching from Fenix to Bennu and a GP2X port of Bennu would make that switch easier.

Also, as for mapping controls to buttons the same way GP2X Fenix does: as Ruckage already mentioned, that would be helpful for running old programs. I am also quite used to it, so I'd like to see such an option. :)
 
Last edited by a moderator:

Sandman

Still Fresh
Joined
Jan 18, 2008
Messages
70
Assuming the stick/dpad is mapped to key(_LEFT) etc, I've done the mapping now. Sorry for the delay, it was low on my list. ;) However, I will have to wait for a new Bennu revision to insert it, because I don't want to have this kind of difference in Bennu releases, after all, one of the goals is to make a platform independent VM. Well the input related modules are soon to be revised anyway, because I don't like them (sodding DIV being old hat and all). :lol:

So err, stay tuned.
 
Last edited by a moderator:

drumpi

Newbie
Joined
Dec 6, 2009
Messages
37
There is some little news... from some months ago ^^U
Sorry for not saying nothing here, but i'm noob with compilers and so on, and nobody helped me for such a thing ("read the web", "it's too simple", "i don't remember" or simply silence).
But i compiled Bennu for GP2X, based on r107. It's a little old, but it isn't as old as sandman's ^^U
You can donwload from the WIZ game competition page.

I don't say nothing because it don't works on official firms, it only works on Open2X firm, because i used his toolchains (i used the only tutorial i can understand, using cygwin). There is a problem with
ld-2.2.5.so
libc-2.2.5.so
libcrypt-2.2.5.so
libdl-2.2.5.so
libm-2.2.5.so
libnsl-2.2.5.so
libnss_dns-2.2.5.so
libnss_files-2.2.5.so
libresolv-2.2.5.so
librt-2.2.5.so
libutil-2.2.5.so
files, they are uncompatible between Open2x firm and official firms, and had absolute linking (to /usr/bin/ or so). So i can't solve it.

And i wasn't sure that this port was safe, but i was testing Echo on my GP2X without problems, and forcing speed of it to the limit (before it hangs :p). So, i thing you can use it without problems.
But you need open2x firm and compile your game on the gp2x (when you get your DCB, you don't need source code or BGDC on SD ;))
 
Top