GP32 Fpu In Gp32 And 2 Other Questions


Optimus

Member
Joined
May 8, 2005
Messages
339
Age
44
Location
Greece
Website
optimus.untergrund.net
1) Does the GP32 have an FPU? I have heard it has. But is it possible to use trigonometric functions and square roots with C for the GP32? My first experience in GP32 developping was in the official SDK which compiles an emulator in Visual Studio 6. I precalculated there some sine tables to do a plasma effect as a test and it worked there. I included "math.h". Later, I compiled a binary with DevKitARM to test it in the real thing and there were garbage instead of the plasma. It's like the sines weren't generated well or at all (but the compiler should normall scream if I did something wrong). Is there another h file I should include for math functions under GP32? Or isn't there an easy way around? I am just asking this because if there exists something like that it will make my life easier, else I'll decide to go the oldschool way around, generating a basic sine table in another h file and writing few more functions for generating sines with multiple height/frequencies out of the base sine or combined sines from two other sine curves added together, etc. (I had to do it this way in CPC or C64 but in GP32?)

2) Just a general question. Which are specifically the video hardware capabilities of GP32? Does it have hardware sprites (and how many?), hardware scrolling, parallax scrolling layers, hardware blitting, hardware sprite zoom/rotation or any other stuff like the GBA has? I couldn't find any more detailed specifications except from the usual (screen resolution and color depth) no matter how I searched..

3) I am not good with modern compilers, so I still went into problems. I succeded compiling a C project with DevkitARM by typing make, but if possible I'd prefer to use an IDE. I used an IDE called GP32IDE iirc (by an Italian coder), set the DevkitARM dirs, and it had problems in make (can't find --win32 function). Then I downloaded MSYS and there was another make.exe, which seemed to work but only two words on the screen down (compiling, done, or something without more info) and there was nothing produced, it seemed like it didn't compile anything. Strange. Do you have another editor to suggest with a tutorial on how to produce?

Sorry for the too many questions. Perhaps I should be searching a bit more, but I am too curious to write my first demo on the GP32 and sometimes it's a pain to compile your first programm in a diferrent hardware you know not much about it..
 
1. There is no FPU, it is software emulated by the compiler (slow, avoid floats at all cost). Trig and square roots are possible through C's builtin functions, but you may want to use tables and other ways around as these functions are pretty slow.
2. No hardware capabilites, EVERYTHING is software.
3. I've had problems with Devkitarm and Gameparks sdk, too. So I used the compiler available at mirkoroller.de, and Mirko's sdk (also there). I've had no problems since. (Well, except for the fact that I'm terrible at C :lol:)
 
You're probably not using the math lib which is why you get garbage. Add -lm to your makefile (look round for a line with a load of -lsomethings and add it to the end).
 
Blah posted on May 14 2005 at 05:50 PM said:
2. No hardware capabilites, EVERYTHING is software.

GP32 can do hardware scrolling.. and with little fooling around with the
LCD DMA some more C64ish raster stuff. Just check the following link
for some lame effects (all hardware I recall)
http://www.cs.helsinki.fi/u/jikorhon/conde...dl/lcdblast.gxb
(does not work in BLU+) ...not that they would have any practical use ;)
 
Last edited by a moderator:
mr.spiv posted on May 15 2005 at 07:40 PM said:
Just check the following link
for some lame effects (all hardware I recall)
http://www.cs.helsinki.fi/u/jikorhon/conde...dl/lcdblast.gxb
(does not work in BLU+) ...not that they would have any practical use ;)

I must show you my respects about this lcdblast demo. One of the coolest oldskool effects.

I've also read some of your "real life" papers, they're nice and interesting too.

Propeller
 
Last edited by a moderator:
>Later, I compiled a binary with DevKitARM to test it in the real thing and there >were garbage instead of the plasma. It's like the sines weren't generated well or >at all (but the compiler should normall scream if I did something wrong).

I think I found the problem. I am just writting this here, just in order someone else had the same problem. I removed the line short-floats from the makefile I was using (which I got from somewhere else and didn't knew much about what it does ;P) and the maths are calculated fine now. I guess I am switching now from MirkoSDK back to DevkitARM again. I want my code being able to run in emulator..
 
Back
Top