GP32 Gp32 Devkit Status


no_skill

gp2x! bananas! mayhem! mayham!
Joined
Jan 9, 2004
Messages
734
Age
37
Location
Austria
Website
72dpiarmy.com
Hi,

i was absent for quite some time, but a new and huge update of Super Mario War is coming up and i'm currently thinking about trying again to port super mario war to the gp32.

and because i'm lazy by nature (no, but it's an awful lot of work to read through everything), and because i thought some of you here might now, i'd like to ask

wether there's a devkit that supports C++ out of the box.
supporting means: C++ fully works. global variables, inheritance, bla bla bla.

additional SDL support would be amazing too, but i don't dare to expect this.

can anybody help me?

huge thanks in advance,
no_skill
 
If you understand spanish (or use babelfish), you can read this post on GP32Spain.
We are currently working on it to figure out if C++ can be used out of the box or not.
It seems that new/delete operators have to be defined and that exceptinos must be disabled (not 100% sure about that, actually I'm waiting a response from Mr.Spiv that could confirm that).

Keep in mind that I have never programmed anything in C++, but I'm just trying to setup a working C++ environment with the oficial SDK (ARM/GCC & Windows/VC++).

Oankali.
 
no_skill posted on Jul 16 2005 at 06:59 PM said:
Hi,

i was absent for quite some time, but a new and huge update of Super Mario War is coming up and i'm currently thinking about trying again to port super mario war to the gp32.

and because i'm lazy by nature (no, but it's an awful lot of work to read through everything), and because i thought some of you here might now, i'd like to ask

wether there's a devkit that supports C++ out of the box.
supporting means: C++ fully works. global variables, inheritance, bla bla bla.

additional SDL support would be amazing too, but i don't dare to expect this.

can anybody help me?

huge thanks in advance,
no_skill



This little programm works out of the box on gp32, dont know about problems with c++.

Code:
#include "gp32.h"
//#include "cpp_prototypes.h"
//#include "cpp.h"

using namespace std;

class basis {
private:
   int wert;
public:
    basis() {}
    basis(int wert) {this->wert=wert;}
    int get_private() { return wert;}
};


int calling_cpp() {

   basis *donald = new basis(100);
   int i = donald->get_private();
   delete donald;
   return i;
   
   //works also:
   //basis pluto(200);
   //return pluto.get_private();
}
 
Last edited by a moderator:
Oankali posted on Jul 18 2005 at 07:23 AM said:
If you understand spanish (or use babelfish), you can read this post on GP32Spain.
We are currently working on it to figure out if C++ can be used out of the box or not.
It seems that new/delete operators have to be defined and that exceptinos must be disabled (not 100% sure about that, actually I'm waiting a response from Mr.Spiv that could confirm that).

Keep in mind that I have never programmed anything in C++, but I'm just trying to setup a working C++ environment with the oficial SDK (ARM/GCC & Windows/VC++).

Oankali.

C++ works fine with devkitARM, just don't use the crap gpmem shite and stick with malloc.
 
Last edited by a moderator:
@spiv: with which development environment? devkitarm / selfbuild?
@wintermute: malloc != new - so what am i gonna do? ;)
 
no_skill posted on Jul 18 2005 at 06:24 PM said:
@spiv: with which development environment? devkitarm / selfbuild?
I use my own stuff mostly but also devkitARM.
@WinterMute: malloc != new - so what am i gonna do? ;)
Both malloc & new use the same memory management system under the hood. Mixing the Gamepark SDK and libc (malloc, new whatever) memory management functions is generally a bad idea. The situation can be helped a bit with the Gamepark SDK using a crt0 that relocates stackpointer to "main" RAM (like devkitARM's crt0s do) and then making sure NOT using any gm_malloc() whatever Gamepark SDK has..
 
Last edited by a moderator:
no_skill posted on Jul 19 2005 at 06:02 AM said:
yeah, but new calls class constructors and i guess malloc won't ;)

but new uses malloc, that's the point. Just don't use the official SDK memory stuff and everything will just work(tm)
 
Last edited by a moderator:
WinterMute posted on Jul 19 2005 at 11:19 AM said:
no_skill posted on Jul 19 2005 at 06:02 AM said:
yeah, but new calls class constructors and i guess malloc won't ;)

but new uses malloc, that's the point. Just don't use the official SDK memory stuff and everything will just work(tm)


I thought it was better to use official SDK memory functions instead of malloc() as these functions where more aware of the specificities of the hardware.
Now I'm really confused.
Is there a good way to know how much memory is left with standard functions?
 
Last edited by a moderator:
I found out about a function called mallinfo that returns a struct containing much info, including remaining memory.

I couldn't find the struct prototype though, so I didn't know if the implenetation we have is the same as the data I found, or if the malloc/free etc family of functions is set up exactly right for the memory amount and type in the GP... Mr.Mirko?

http://www.gnu.org/software/libc/manual/ht...-of-Malloc.html
 
Back
Top