gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Weird color issues...

#137617 - calcprogrammer1 - Tue Aug 14, 2007 1:08 am

I was working on my program, and when I added a 16 color background on BG 2, my back gif image corrupted.

It ran fine with BG3 being the 16bit image and bg1 being the keyboard (no bg 1 on top screen, BG 2 for text, and sprites). Then when I went to use normal text, it gave me some random error, so I decided to change 16bit to 8 bit backgrounds. The picture shows up as having an 8 bit depth in Windows, but when I use it, I get some random issues. Gimp says there is no RED in the palette, (how do you use palettes in Gimp anyways, or another free program).

[Images not permitted - Click here to view it]

EDIT:

Weird, If I remove the init 16 color BG 2 on the bottom screen (using it for 16cText), then it doesn't affect, but the top screen is still messed up (it's using BG2 for 16cText as well, still enabled).
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.


Last edited by calcprogrammer1 on Tue Aug 14, 2007 1:12 am; edited 1 time in total

#137618 - tepples - Tue Aug 14, 2007 1:11 am

In GIMP 2, palettes show up in the Colormap window: File > Dialogs > Colormap.

If an image has 1-bit transparency, the palette entry assigned to the transparent color might show up as the background color. What is the value of BG_PALETTE[0] (or whatever PALib calls it)?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#137620 - calcprogrammer1 - Tue Aug 14, 2007 1:31 am

I opened the Color map in Gimp (I have GIMP 2), and also I have Desmume open showing the problem.

Top screen has the problem, it uses BG3 for image, BG2 for 16c text, it worked fine as 16bit though (with text).

Bottom screen doesn't have the problem, it's 8 bit BG3 for the picture, no BG2, and BG1 is keyboard.

[Images not permitted - Click here to view it]

EDIT:

When I turn of BG3 (the image) on bottom screen, 16c text works, as does sprites and the keyboard:

[Images not permitted - Click here to view it]
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#137621 - calcprogrammer1 - Tue Aug 14, 2007 2:19 am

Nevermind...the PA_LoadGif function must have loads of bugs or something, PAlib doesn't seem very stable, lots of bugs that shouldn't even be there in the first place.

But anyways, the PA_LoadEasyBG() function helped, though I had to convert my background rather than use GIF.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.