GP32 16bit mode.


RTj

Member
Joined
Mar 17, 2003
Messages
104
Age
52
Hi!
I've got some code up and running. But rather than use a 256 colour palette i'd rather use the 16bit mode. :D

I've used the ModeSet command (set to 16) and i've set all my full screen BitBlt's to 640 x 480 but i'm still getting a 320x240 screen in the top left and an IDENTICAL 320x240 screen at the bottom left! :huh:
Both are a bit corrupt but still do what they should be doing... <_<

Question is: whats the proper procedure for enabling 16bit mode? And is there any 16bit specific commands that i might be missing?? (i assume i'm using bog standard 8bit commands ???) :huh:

Any help for this beginner would be greatly appreciated.
:)
 
Feeblez posted on May 21 2003 said:
16bit versions of the graphics and font libs can be found here...
Do we extract these to the "arm-agb-elf\include\gp32" directory or someplace else?

Thanks!

Mindflayer
--
A GP32 n00b and it shows!
 
Last edited by a moderator:
To RTj:

I've got it working perfectly now!
It's Kewl! :D

The offending bit of code was:
Code:
GpMemSurfaceGet(&bgscreen);
it seems you have to initialise the GPDRAWSURFACE structure 1st:
Code:
memset( &bgscreen, 0, sizeof(GPDRAWSURFACE) );
bgscreen.bpp = GPC_DFLAG_16BPP;
bgscreen.buf_w = 320;
bgscreen.buf_h = 240;
GpMemSurfaceGet(&bgscreen);

i think what was happenening was the memory surface wasn't getting a correct pointer and it was overwriting all the other graphics whenever you blitted to it! :angry:
(the menubar and the brushes)

just private message me if you need any more info about this.

overslept today! <_<
 
[5CM]MindFlayer posted on May 21 2003 said:
Feeblez posted on May 21 2003 said:
16bit versions of the graphics and font libs can be found here...
Do we extract these to the "arm-agb-elf\include\gp32" directory or someplace else?

Thanks!

Mindflayer
--
A GP32 n00b and it shows!
from what i remember...

edit C:\devkitadv\gp32.mk (this is for Rico's devkitadvance!)

where its says:

GPLIBS=-lgpsdk -lgpgraphic -lgpmem -lgpos -lgpstdlib -lgpstdio -lgpsound -lgpfont -lgpg_ex01

add -lgpgraphic16 and -lgpfont16 to the list

then extract the .a to:

C:\devkitadv\arm-agb-elf\lib

and yes, extract the .h and .c to:

C:\devkitadv\arm-agb-elf\include\gp32

the last bit if i remember correctly, you have to 'make' the MakeFile:

C:\devkitadv\arm-agb-elf\lib\gpsdk\MakeFile

good luck! B)
 
Last edited by a moderator:
Code:
c:/devkitadv/bin/arm-agb-elf-gcc -Wl,-T c:/devkitadv/arm-agb-elf/lib/lnkscript -
o hello.elf gpmain.o c:/devkitadv/arm-agb-elf/lib/gpsdk/gpstart/gpstart.o -lgpsd
k -lgpgraphic -lgpmem -lgpos -lgpstdlib -lgpstdio -lgpsound -lgpfont -lgpg_ex01
-lgpgraphic16 and -lgpfont16
arm-agb-elf-gcc: and: No such file or directory
:D now get this error form my devkit
 
:lol: ooops left in the 'and' when copying now back to beaking othr things
 
the last bit if i remember correctly, you have to 'make' the MakeFile:
C:\devkitadv\arm-agb-elf\lib\gpsdk\MakeFile

hey Feeblez :D

How exactly do i 'make' the makefile ????
I've installed all the other bits an' bobs ok but i've not done this 'make' the makefile bit... :(
Maybe thats why i'm having GpTextOut probs??
(although GpBitBlt16 works ok...)

Thanks for all your help Feeblez.
:D
 
yep, i've private messaged you about it, that was before i saw this ;)

basically you need to do a batch file, or type in a cmd line something like this:

C:\devkitadv\bin\make C:\devkitadv\arm-agb-elf\lib\gpsdk\Make

this should make 'C:\devkitadv\arm-agb-elf\lib\gpsdk\gpstart\gpstart.c' which has the line 'GpFontInit16 (&mInfo);' which i think is important for getting 16bit fonts working! ;)

hope this helps!
 
failing that then backup the object files (.o), maybe by renameing them .ox
then run make again, it should not say 'nothing to be done' this time

16bit fonts definately do work!
 
yep, i've private messaged you about it, that was before i saw this ;)

basically you need to do a batch file, or type in a cmd line something like this:

C:\devkitadv\bin\make C:\devkitadv\arm-agb-elf\lib\gpsdk\Make

this should make 'C:\devkitadv\arm-agb-elf\lib\gpsdk\gpstart\gpstart.c' which has the line 'GpFontInit16 (&mInfo);' which i think is important for getting 16bit fonts working! ;)

hope this helps!
ok, i stuffed up a bit on my instructions earlier... :rolleyes:

to re-make all the gcc gamepark libs just make sure you are in the 'C:\devkitadv\arm-agb-elf\lib\gpsdk\' folder and then run 'C:\devkitadv\bin\make'
 
Last edited by a moderator:
actually, for me I had to edit the makefile a bit. inside the makefile, i had to add the following line to the very top:

export CCBASE=c:/devkitadv

then I was able to make from the directory itself. Hopefully that helps.

Edit:
Actually, what Feeblez said is better. But the make file in the gpsdk folder needs to be edited a little. Everywhere it says 'make', change it to $(MAKE)

hope that helps.
 
Maybe a readme or example code would have been useful *cough* :rolleyes:
 
About that 16 bit library, I finally manage to display the 16 bit fonts with following all the steps on top;

But for the graphical 16 bit library, I only managed to have
GpRectDraw16 and GpRectFill16 work.

Did someone manage to have GpPointSet16 or GpLineDraw16 work correctly ??
 
I have problems with GpLineDraw16 and GpPointSet16. They just dont draw anything. Anyone have a solution or experiencing the same problem?
 
Back
Top