Home | Forums | What's new | Resources | |
Palette Number in Pattern Name Data |
CarlosTheMover - Aug 17, 2015 |
CarlosTheMover | Aug 21, 2015 | |||
Yes, that's I was looking for. I understand better now. I was confused because when copying palette data to color ram, it uses an address but accessing it used an index. In the SaturnOrbit sample I'm working from, the one with the controller, it's assuming it's working with 256 colors. What I haven't figured out is which setting determines the number of banks in color ram. Is there one? I'm using the SGL so it might be setting one by default. Thanks! |
mrkotfw | Aug 21, 2015 | |||||
I talked about banks to show you how many 16-color or 256-color palettes you can have stored in CRAM. If you had set NBG0/1 to be 2,048 colors, then you obviously only have 1 bank (all 2,048 colors which is 4,096 bytes). In fact, for 2,048 colors, in the PND you have no bits available for the palette index. The other part is setting the Color RAM mode. There are 3 modes, and the general rule of thumb is that if you're not dealing with the rotational backgrounds or any other "fancy" feature, then stick with mode 0. You want all 2,048 colors. You can read more about this in the VDP2. As for SGL, there is a function available, but I don't remember what the function name is. |
CarlosTheMover | Aug 21, 2015 | |||
From the docs, slCharNbg sets up the color depth and slPageNbg tells the background the addresses of where the tileset and palette are. The samples I've seen ignore passing the palette VRAM address and use Map2VRAM to add a palette index for each map element. |