GP32 Any 16-bit GP tuts about?


JDUK

Member
Joined
May 20, 2003
Messages
403
Age
44
Location
Leicestershire, UK
Website
Visit site
Are there any GP32 16 bit graphics tutorials/tools around that any one could point me to plz ? it sems a pitty to be making my game in 8 bit on a 32 bit system. Any help would be gr8 thx.
 
16 bits graphics is use as 8 bit, the only thing in 16 bit it's that you've got all colors and no pallette :)
 
As mentioned previously, there isn't a pallete in 16bit mode, instead you can just specify any colour you want using the GP32 colour scheme.

I have written various GP32 graphics routines, including PNG Alpha Blending, and I have found the GP32 uses the colour scheme r5g5b6, but it seems most people say its r5g5b5x1. Either way the same principle applies, just set up your program the normal way, set the graphics mode to 16bit - I'm at work now and can't remember the exact line, something under the lines SetGraphicsMode(null,16); or something.

Then you can use the 16bit versions of the graphics commands, e.g. GpBltBit16(); be warned though, there are bugs in 16bit mode at the moment, for example you can't use the text out function, you have to write your own, which isn't too complicated luckily.

I use 16bit mode with DevKitAdv, if you want to work with the graphics memory, each pixel has two bytes of data, (8bits per byte, 2x1 byte=16bits). So if for example you want to make the bottom left pixel black:
gpDraw[nflip].ptbuffer=0x00;
gpDraw[nflip].ptbuffer+1=0x00;

Unfortuneatley, I can't remember how the colours are mapped out off the top of my head, its something under the lines of:
R xxxxxxxx 11111xxx
G 11xxxxxx xxxxx111
B xx111111 xxxxxxxx

So to draw a red pixel:
gpDraw[nflip].ptbuffer=0x00;
gpDraw[nflip].ptbuffer+1=0xf8;

When I first started GP32 coding - a month or so ago, there wasn't really much in the way of 16bit tutorials around, people warned me against using it, but meh, I thought I'd give it a go anyway, there may well be a good tutorial out by now, if not let me know and I'll try and write a comprehsive one and get it hosted somewhere,

Steve

rockthesmurf@hotmail.com
 
I was making an app in 16bit on the GP32 but eventually gave up.
Like Rockthesmurf says, some of the functions are buggered. :angry:

With the help of Feeblez i managed to get the GpTextOut16() to work but things like GpLineDraw16() and Ellipse were still buggered...
Gave up on 16bit at that point... :(

oh well...
 
Back
Top