Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2017-11-28 22:06:23

Sionnach
New member
Registered: 2017-11-28
Posts: 3

GBDK not setting palettes

I used pic2tiles.exe to convert an image to tiles and map for gameboy (and from what I can tell doesn't export color palettes) so I tried setting the colors manually and it didn't work, so for most of the last 48hrs, minus sleep, I've been trying to fix this and set the color palette(s) by searching and using and imitating any code and or tutorial relating to using CGB palettes with anything, especially full images. No methods have worked and I'm posting this as a last resort.

What it should and shouldn't look like: https://imgur.com/8OU5sPl

Source code: https://pastebin.com/Kr54mru6

Offline

 

#2 2017-11-30 08:52:59

gbjosh
Member
From: KY
Registered: 2016-06-15
Posts: 51

Re: GBDK not setting palettes

What compiler arguments are you using?

Offline

 

#3 2017-11-30 20:55:10

Sionnach
New member
Registered: 2017-11-28
Posts: 3

Re: GBDK not setting palettes

Like from my make.bat file?

..\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -c -o game.o game.c
..\bin\lcc -Wa-l -Wl-m -Wl-j -DUSE_SFR_FOR_REG -o Yanderella.gbc game.o
pause

Just this generic pre-made code from other projects I found.

Offline

 

#4 2017-11-30 21:53:10

gbjosh
Member
From: KY
Registered: 2016-06-15
Posts: 51

Re: GBDK not setting palettes

Throw Wl-yp0x143=0x80 into your compiler arguments. You can read more about that here: http://www.devrs.com/gb/files/gbdok.html under 4. color gameboy programming info

Offline

 

#5 2017-12-01 00:58:20

Sionnach
New member
Registered: 2017-11-28
Posts: 3

Re: GBDK not setting palettes

It didn't work at first so I switched a few small things around and it now it works perfectly. Thank you kindly!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson