GP32 Dark palettes anyone?


StudioX64

Still Fresh
Joined
Mar 30, 2003
Messages
71
Location
UK
Website
www.studiox64.com
I am in the process of porting over a game which I made for the PC to GP32, XScape if anyone wants to know. Anyway I have the main logo and some nice colour scrolling text on screen, but it looks much darker to that of other GP32 programes. I have almost created a GBA look to my game :)

I am currently redefining only 16 colours in the palette as it's an old C64 game. The colour defs are as follows:

const unsigned char c64palette[16*3] = {
0x00, 0x00, 0x00,
0xff, 0xff, 0xff,
0x3b, 0x47, 0x78,
0xc2, 0xb4, 0x80,
0x96, 0x4d, 0x7f,
0x53, 0x9d, 0x68,
0x89, 0x38, 0x45,
0x7f, 0xd7, 0xc8,
0x35, 0x5f, 0x7f,
0x10, 0x49, 0x53,
0x69, 0x77, 0xaa,
0x54, 0x54, 0x54,
0x7c, 0x7c, 0x7c,
0x94, 0xe2, 0xaa,
0xc5, 0x6e, 0x7c,
0xa5, 0xa5, 0xa5
};

They form the 16 standard colours of the C64 if you wonder on my choice. Is there some special command to make the screen appear brighter which other people use, or is it purely just a naff palette definition. In case you are wondering I just redefine the colours in a loop in the main code at start up, using: GpPaletteEntryChange.

Any help would be much appreciated.
 
I define my palette as

Code:
GP_PALETTEENTRY npal[256] = {
  0x1, 0x1, 0x1, 0x1, 0x801, 0x841, 0x843 ...
};

With

Code:
GP_HPALETTE h_pal;

I can then

Code:
h_pal = GpPaletteCreate(256, (GP_PALETTEENTRY*)npal);
GpPaletteSelect(h_pal);
GpPaletteRealize();
GpPaletteDelete(h_pal);
h_pal = NULL;

(thanks CraigX)

And I've also noticed everything is dark, compared to other games (and it looks brighter on the emu, where as the colour difference is not there for other games)...

I've begun to think that this is my fault in the code somewhere, and after your post I'm thinking that even more.

Sorry I can't help

- Rico
 
You might want to look at the post by nutibrain (?) above on this board, turns out the format of colour is
5551, 5 bits for R, 5 for G, B, then 1 extra 'intensity' bit.

So 0x00 is 0000000000000000 which is black, no intensity.
Try 0x0001 instead for 00000000000001 which is brighter.


Anyways refer to the post...
 
no thats ok, in PSP (or whatever paint program) just brighten your palette before you convert it, the GP32 displays colours a bit diffrent to a PC.

-Craig

www.gbax.com
 
I certainly gave this ago after my post and it does seem to have made a difference. I upped the colour saturation and brightness levels after reading some info by GBA programmers. My screen is now nice and viewable, though on the PC the colours used look more like sicky EGA ones :) Thanks for all the replies.
 
Back
Top