Bennu Game Development

English Forums => Helpdesk => Mensaje iniciado por: equinox en Febrero 25, 2010, 04:16:46 pm

Título: HELP with BENNU e ConText
Publicado por: equinox en Febrero 25, 2010, 04:16:46 pm
Hi at all,

I installed Bennu and Context: when I compile ->

C: \ context \ hello world program.: Does not exist or is not compatible BCD version 7

any help, please?
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Febrero 25, 2010, 04:26:25 pm
First of all you must create a ".dcb" file with yor ".prg" sourcecode.
In a dos-console or in a terminal you must go to the directory of your ".prg" and execute the next two commands:
Código: [Seleccionar]
bgdc "yournameofsorucecode".prg
bgdi  "yournameofsorucecode".dcb
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Febrero 25, 2010, 04:51:30 pm
Tanks for your reply. But I have to first experience with Bennu.

How do I create a BCD file?
Título: Re: HELP with BENNU e ConText
Publicado por: osk en Febrero 25, 2010, 05:02:59 pm
bgdc creates (from prg file) the dcb file you must use with bgdi.
prg file->source code
dcb file->"bytecode" to execute by bgdi
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Febrero 25, 2010, 05:09:59 pm
I have this screen: you tell me how can I, please?


(http://www.pctunerup.com/up/results/_201002/20100225180731_Immagine1.JPG)
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Febrero 25, 2010, 07:18:32 pm
I don`t know how use those program.
Probably there are a run option in the project or tools menu.
But, may be that you can not have bgdc and bgdi programs in the windows path.
You need add to the windows path the next directories
If you are using bennupack
c:\devbennu\bin
If you ar using the official installation you need add more than one directories:
c:\bennu\bin
c:\bennu\externals
c:\bennu\lib
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Febrero 26, 2010, 11:58:32 am
What kind of IDE do you use?

 I downloaded it and then helps me to set it?
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Febrero 26, 2010, 01:45:30 pm
I don`t understood your second affirmative or question. :(

For the first answer, I do not use any IDE, I use pspad to edit .prg files and after the command programs "bgdc" and "bgdi" to create ".dcb" files and execute it. There is a pluggin file for pspad to call to bgdc and bgdi automaticaly but I don't generally use it.
But there is a good IDE called flamebird that appears similar to your IDE.
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Febrero 26, 2010, 02:10:26 pm
Maybe you need the BennuPack:
Bennupack.blogspot.com
;)
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Febrero 26, 2010, 03:37:55 pm
Flamebir work,tnk.


now I want to compile for the Wiz. I downloaded "Wiz GP2X version" but I do not understand how to compile.

Does anyone know how?

Tnk1000.
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Febrero 26, 2010, 11:38:23 pm
WIZ version has his own bgdc and bgdi.
Have you seen the two examples includes? you must do the same:
1- Unzip Bennu WIZ in your SD
2- Have you seen Galaxian and Pacman directories? create your own folder.
3- Copy your code files and all other files you use (FPGs, FNTs, OGGs, WAVs...).
4- Copy the bgd-galaxian.gpe (from bgd-galaxian folder) to your folder. Rename it as you wish (but gpe extension).

You are done. Now go to browser icon and search for your .gpe, with it, bennu will compile and run your prg.
Maybe you want to do an ini file for watch it in "game" menu, but i don't know how to do it. Or maybe you don't want to share your prg, so you must open your gpe with an unix compatible text editor (notepad++, for example) and change it. I'm sure you can understand it ;)
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Febrero 27, 2010, 02:35:47 am
The compilling in wiz is not needed, or at least it  should not be.
The same .dcb obtainen in a windows or linux SO should be compatible with the bgdi program of wiz so, it said in words for newbies, you only need pass to the wiz the bgd-runtimes files, your resources files, you ".dcb" file and a script file ".gpe" that sais to the wiz how to run your .dcb with the bgd-runtimes files.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Febrero 28, 2010, 11:46:24 am
I could not understand, unfortunately. I can not compile.

There is written a tutorial to set Bennu for wiz?

or where I can find who wrote the Bennu?
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Febrero 28, 2010, 12:36:17 pm
Have you follow the steps i said to you? When failed the compilation?
Or else, DCelso give you another method better than mine (compile in your PC and copy to WIZ). DCB is your binary file, and you can use it in every platform, but you will need the BGDI of this platform, and must be THE SAME VERSION AS BGDC (this is why i told you to compile directly on WIZ).
Be carefull, there is a GP2X WIZ version of Bennu (the same of main page) and a GP2X version. GP2X and GP2X WIZ aren't the same handheld.

SplinterGU was the one who wrote Bennu, and he's in this forum.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Febrero 28, 2010, 05:34:13 pm
Getting Started:

 http://www.bennugd.org/?q=node/2

This is the page but there only the version for the Wiz? right?

I download this --> bgd-1.0.0RC11(r131)-openwiz.tar: it correct?

This ie only for wiz.
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Febrero 28, 2010, 11:28:15 pm
Yes, this is WIZ version.
So, first, you must unzip on your SD, maybe you want to do it on Game folder.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 01, 2010, 06:25:52 pm
Hi,
I tried to compile with Bennu for Win and it works ... but I can not create a test.exe. How do I?
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Marzo 01, 2010, 07:29:06 pm
You can't. You can generate a .DCB file. Then, you can run it with GBDI.exe (for windows) or BGDI (for other platforms).
But, BGDI must be for the target platform, in this case, the BGDI WIZ version you had downloaded before.

Just type "BGDI yourgame.dcb", or make a .GPE file with this command (and those who launch WIZ menu later). As I said before (a lot of times), see .GPE examples in WIZ pakage.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 02, 2010, 04:10:29 pm
Thanks for the explanation. I was very helpful.

1# With an IDE cè the opportunity 'to create an exe?

2# I would first program for the GP2X but I do not know where to find Bennu for GP2X.

 Here http://www.bennugd.org/?q=node/2  only for the WIZ...but i dont see GP2...

>>As I said before (a lot of times), see .GPE examples in WIZ pakage.

Yes, i see the example. but I have trouble understanding these examples :o(

In bgd-1.0.0RC11(r131)-openwiz-->bgd-runtime i found BGDI, not BGDI.exe.  

I writing BDGI. TEST.dcb....GPE is not created .




Tnk1000


Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Marzo 02, 2010, 08:26:38 pm
No, an IDE don't create any exe, because EXE only works on Windows. An iDE can generate the DCB using a button on it (an highlight with colours the languaje reserved words, and more), and optionaly can run your game to test it, but basically they use BGDC.exe and BGDI.exe at the same as you with command window.

The GP2X port of Bennu is not an official release, it's just a try by someone ;D
you can find it on http://www.fenixworld.com/e107_plugins//depot/files/fw75.bennugp2x.zip
But it only works on Open2X firmware. We are waiting for an update who can solve this trouble.

GP2X and WIZ uses a Linux OS, so exes don't exists as you know. In this case, BGDI and BGDC don't have any extension, so you must write:
BDGC TEST.prg
to get a DCB, and
BDGI TEST.dcb to run it (if there aren't errors).

The .GPE must be written by you, using a text editor with Unix format (any of Linux distributions, or notepad++ for windows).

You must write this:

Código: [Seleccionar]
#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime

export LD_LIBRARY_PATH
export PATH

echo 2 > /proc/cpu/alignment

bgdc test.prg
bgdi test.dcb


cd /usr/gp2x
exec /usr/gp2x/gp2xmenu


But if you wanna see the logs and errors must write:

Código: [Seleccionar]
#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime

export LD_LIBRARY_PATH
export PATH

echo 2 > /proc/cpu/alignment

bgdc test.prg >log1.txt 2>err1.txt
bgdi test.dcb >log2.txt 2>err2.txt


cd /usr/gp2x
exec /usr/gp2x/gp2xmenu

Be carefull: BGDC is not the same as bgdc, uppercase letters are distinct from lowercase letters.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 03, 2010, 03:48:06 pm
>But it only works on Open2X firmware. We are waiting for an update who can solve this trouble.

Yes, in fact pac for gp2x does not work. Back to the menu 'and exit.

>don't have any extension, so you must write:
BDGC TEST.prg
to get a DCB, and

I am in: fw75.bennugp2x-->bgd-runtime.

Do: Start-> Run then write BDGC TEST.prg but open the window asking me what program to open BDGC ...

Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 03, 2010, 03:56:24 pm
you need to add to your path the directory where you have the bgdc binary.
Some like this
Código: [Seleccionar]
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime
Or may be that in your bgd-runtime directory don't have "bgdc" program, because is not a mandatory program to run games in gp2x.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 03, 2010, 04:05:42 pm
in effects, in my directory

fw75.bennugp2x-->bgd-runtime

 I have these program:

bdcg------no.EXE
bdci------no.EXE

and lib "mod_sound.so" ecc.ecc.

Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 03, 2010, 04:47:24 pm
Sorry, I need more information for help you.
I will need all your SD structure directory. ie
/
|
+--bgd-runtime
|          |
|          +-    bgdc
|                 bgdi
|                  ...
|                 mod_sound.so
|                  ...
|
+--my_game
          |
          + -- my_recourses_directory
          |             |
          |             +-- my_image.png
          |
          +-- my_game.dcb
          |
          +-- my_game.prg
          |
          +-- my_game.gpe
            ....

I will need the information of your script tu run your application (normally called like your application but ending in ".gpe") ie my_game.gpe.
Código: [Seleccionar]
#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime

export LD_LIBRARY_PATH
export PATH

echo 2 > /proc/cpu/alignment

bgdc my_game.prg
bgdi my_game.dcb

cd /usr/gp2x
exec /usr/gp2x/gp2xmenu
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 03, 2010, 05:51:09 pm
One thing I did not understand:

+ - My_game.dcb: how do I do this dcb?

In the version for winxp --> BGDC.EXE ==. DCB(winxp)

,,, but for GP2, in my directory there bgdc but no extension.exe:  then as I do this dcb?

Tnk1000 for all help me.
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Marzo 03, 2010, 07:01:21 pm
Are you using enexfi? just use the browser (down center blue icon) and look for your .gpe.

In the GPE you got the line: bgdc yourgame.prg
This line generate your DCB, as same as windows (but in windows, BGDC got BGDC.EXE name, but it's the same). As i said before, LINUX DON'T HAVE EXEs, HAVE BINARY FILES to execute programs, without extensions.
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 04, 2010, 08:15:36 am
Sorry, I need more information for help you.
I will need all your SD structure directory. ie
/
|
+--bgd-runtime
|          |
|          +-    bgdc
|                 bgdi
|                  ...
|                 mod_sound.so
|                  ...
|
+--my_game
          |
          + -- my_recourses_directory
          |             |
          |             +-- my_image.png
          |
          +-- my_game.dcb
          |
          +-- my_game.prg
          |
          +-- my_game.gpe
            ....

I will need the information of your script tu run your application (normally called like your application but ending in ".gpe") ie my_game.gpe.
Código: [Seleccionar]
#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime

export LD_LIBRARY_PATH
export PATH

echo 2 > /proc/cpu/alignment

bgdc my_game.prg
bgdi my_game.dcb

cd /usr/gp2x
exec /usr/gp2x/gp2xmenu


Equinox, can you put this information?, please.
* Your SD structure
* Your ".gpe" information.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 04, 2010, 01:52:36 pm
Sorry for error. This the informations:

Disco rimovibile(j) == SD my GP2XF200. There is my_game.prg--->I compile with bgdc.exe, bgdi.exe(c:\devbennu\bin): run ok in winxp.

(http://www.pctunerup.com/up/results/_201003/20100304143635_Immagine1.JPG)

...then I'm going bgd-runtime\my_gameDIRECTORY, press on my-game.gpe .... but after 2 seconds back to the blue screen of gp2x ...NO .DCB is create.


/* basic template file for Bennu Game Development */
PROGRAM Template;
import "mod_text"
import "mod_key"
Begin
    While( !key(_esc) )
        delete_text(ALL_TEXT);
        if( key(_A) )
            write(0,160,120,4, "LEFT");
        end;
        if( key(_B) )
            write(0,160,120,4, "RIGHT");
        end;
        frame;
    End;
End

//---------------------------------
my_game.gpe
#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime

export LD_LIBRARY_PATH
export PATH

echo 2 > /proc/cpu/alignment

bgdc my_game.prg
bgdi my_game.dcb

cd /usr/gp2x
exec /usr/gp2x/gp2xmenu



...with all the lib .SO(mod_text.so..ecc.ecc.ecc)
//--------------
This my PC-dir in C:\ BENNU for winxp.
(http://www.pctunerup.com/up/results/_201003/20100304144909_Immagine2.JPG)


>Are you using enexfi?

I do not know what it is.

Yet again Tnk1000





Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Marzo 04, 2010, 02:07:16 pm
Enexfi is an utility for browse and execute aplications in GP2X. It has an orange background.

That's your problem: in your GPE you are lokking for runtime on ../bgd-runtime (it means, go up one folder and enter on another file called bgd-runtime), but you got your runtime on ../

So there are two solutions:
-Change your GPE to

#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../
PATH=$PATH:../

-Change the files location: bgd-runtime and my_game files must be in same file:
SD_drive
 |
 |-BBB
 |-bgd-runtime
 |-my_game

But bgdc, bgdi and al .so must be only on bgd-runtime folder. If you do that, you can play any bennu game without copiying al bennu files in every game, just like that:

SD_drive
 |
 |-BBB
 |-bgd-runtime
 |-my_game1
 |-my_game2
 |-my_game3
 |-my_game4

NOTE: use ONLY ONE of this two solutions, don't use both at same tiem or it don't works :D :D :D
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 04, 2010, 02:39:00 pm
Equinox, you should do the drumpi second solution better.
1.- You need create a directoy called "my_game" in the root of your SD.
2.- You need move to this directory my_game.prg and my_game.dcb
3.- You need move the rest of files to the directory bgd-runtime
4.- You can remove the directory called j:\bgd-runtime\my_game because it is not neccesary now.

Finally you will get the next structure in your SD.

Disco rimovibile (J:)\
         |
         +--BBB
         |
         +--bgd-runtime
         |          |
         |          +-    bgdc
         |                 bgdi
         |                  ...
         |                 mod_sound.so
         |                  ...
         |
         +--my_game
                   |
                   +-- my_game.gpe
                   +-- my_game.prg
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 04, 2010, 03:50:39 pm
Disco rimovibile(j) == SD my GP2XF200

In summary:
I created the directory bgd-runtime. Inside there are only libraries. SO

(http://www.pctunerup.com/up/results/_201003/20100304164228_Immagine1.JPG)

after...I created the directory my_game. Inside there are only my_game.prg and my_game.gpe

(http://www.pctunerup.com/up/results/_201003/20100304164313_Immagine2.JPG)

my_game_gpe-->

#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime

export LD_LIBRARY_PATH
export PATH

echo 2 > /proc/cpu/alignment

bgdc my_game.prg
bgdi my_game.dcb

cd /usr/gp2x
exec /usr/gp2x/gp2xmenu



....but i dont see nothing in display gp2x....
and not see .DCB in dir my_game on GP2....  :o(
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 04, 2010, 04:13:13 pm
yeah, it seems right.
we need know the information of bgdc throws.
Can you put the next gpe and put the information on stdout.txt and stderr.txt files?
Código: [Seleccionar]
#!/bin/sh
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../bgd-runtime
PATH=$PATH:../bgd-runtime

export LD_LIBRARY_PATH
export PATH

echo 2 > /proc/cpu/alignment

bgdc my_game.prg >stdout_bgdc.txt 2>stderr_bgdc.txt
bgdi my_game.dcb >stdout_bgdi.txt 2>stderr_bgdi.txt

cd /usr/gp2x
exec /usr/gp2x/gp2xmenu
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 04, 2010, 04:45:48 pm
Yes.

stderr_bgdi.txt

bgdi: /lib/libc.so.6: version `GLIBC_2.3' not found (required by ../bgd-runtime/libbgdrtm.so)

the other 3 files are all empty - no written
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 04, 2010, 04:56:06 pm
ah,oh,eh.
Your problem is that you don't have in your gp2x the open2x firmware.
This problem was said for Drumpi.
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 04, 2010, 05:17:55 pm
so I can not compile anything. There is no solution?
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 04, 2010, 05:22:53 pm
Yes, update your gp2x to open2xfirmware.
But I don't help you with this task, sure that Drumpi can.
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Marzo 04, 2010, 06:06:39 pm
So, the PM was about installing Open2X? I think you was talking about installing Bennu for GP2X.

To install Open2X you must first download it from GP2x scene webs (http://www.gp32x.com or http://www.gp32spain.com, the lastest betas are on:
http://www.gp32x.com/board/index.php?/topic/47311-open2x-dr7-for-f100-and-f200/
Or just look for on his download section for the previous release, who it's i'm using.

His instalation is easy to do: you only need a small SD (about 256MB, 512MB or 1GB SD, not SDHC) recently formatted to FAT32, fully charged batteries (or 220v adapter) and follow STEP BY STEP the readme file. If you do it, it will works fine.

You can install then the official firm again if you don't like. But be carefull to don't mistake versions (F100 or F200).
For more information, you can go to gp32x.com and ask him.

I hope we can get a new version with official firm compatibility soon :(
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 04, 2010, 06:34:55 pm
Tnk1000 for help.

Where can I find the original FW?

my: gp2x f200 (B)
Título: Re: HELP with BENNU e ConText
Publicado por: Drumpi en Marzo 05, 2010, 04:30:52 am
Same sites ;)
But be carefull, GP2X F200 needs an especific official firm, otherwise... :S
So, read CAREFULLY all posts and instructions if you want to install an official firm.

GP2X firms aren't the same as PSP or NDS firms: lastest aren't bests, and not necesary works betters.
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 05, 2010, 07:53:09 am
But why do you want the official firmware?
Does your gp2x go without firmware actually?
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 05, 2010, 01:05:43 pm
work well

But if I'm wrong ,I wish go back to the original FW.

Tnk1000.
Título: Re: HELP with BENNU e ConText
Publicado por: DCelso en Marzo 05, 2010, 02:48:43 pm
and dont you want do a backup of your current firmware¿
Título: Re: HELP with BENNU e ConText
Publicado por: equinox en Marzo 05, 2010, 04:52:37 pm
Oh...is possible do a backup of MY current firmware ?

I did not know you could do?

you know how?