Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
16 Colour Palettes   Message List  
Reply | Forward Message #9134 of 15019 |
Re: 16 Colour Palettes

> But the sprites both seem to use the first palette. How do you
assign
> palette 1 to a sprite? Thanks in advance.

From the cowbite spec
(http://www.gbadev.org/files/CowBiteSpec_dec29.zip)
You set the palette number by setting the top 4 bits of attribute 2.
Eg
*attribute2=(palletenum<<12)+(priority<<10)+sprite


Bytes 5 and 6 (Attribute 2)

F E D C B A 9 8 7 6 5 4 3 2 1 0
L L L L P P T T T T T T T T T T

L = Palette number. If you use 16 color palettes, this tells you
which pallette number to use.
P = Priority. This controls the priority of the sprite. Note thate
sprites take precedence over backgrounds of the same priority.
T = Tile number. This value indexes selects the bitmap of the tile to
be displayed by indexing into the tile data area.








Thu Jan 3, 2002 1:24 pm

owaincole
Offline Offline
Send Email Send Email

Forward
Message #9134 of 15019 |
Expand Messages Author Sort by Date

I'm trying to load 2 different 16 colour palettes for 2 different sprites in mode 0. I'm using 16 colour mode for the sprites but when I DMA the sprites and...
kinetic_creationz
kinetic_crea...
Offline Send Email
Jan 2, 2002
8:18 pm

... assign ... From the cowbite spec (http://www.gbadev.org/files/CowBiteSpec_dec29.zip) You set the palette number by setting the top 4 bits of attribute 2. ...
owaincole
Offline Send Email
Jan 3, 2002
6:04 pm

Hello kinetic_creationz, ... You do activate your palettes, but do you also set their indices in OAM entries? The highest 4 bits of "attribute 2" [bytes 5/6]...
Maciej Sinilo
yarpen2002
Offline Send Email
Jan 3, 2002
6:05 pm

Thanks guys. That was the problem. It's working now. Woohoo!! Cheers. ... OAM...
kinetic_creationz
kinetic_crea...
Offline Send Email
Jan 7, 2002
12:38 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help