Page 1 of 1

Any Questions for background

Posted: Sun May 11, 2014 9:23 am
by Kannagi
Hello everyone,
I do not usually ask for help but I can not find the solution.

I program on snes by in asm, about the background, is it possible to change the palette ? (during the game without writing on the Palette) for exemple when we are in mode 0, the default BG read "CG Address 0" but can we ask him to read "CG address 4" ?

I looked at the documentation and I have not found it, I found the displacement / tileset for BG but no change palette.
A clue about what I have to register to watch?

Thank you for your help.

Re: Any Questions for background

Posted: Sun May 11, 2014 12:50 pm
by ARM9
You change the palette number in the map, see here.

Re: Any Questions for background

Posted: Sun May 11, 2014 1:15 pm
by tepples
In case you're curious how other systems at the time did it:
  • NES PPU: The base color for each 16x16 pixel area is stored in a 64-byte attribute table at the end of each map.
  • NES PPU with MMC5 ExGrafix: The base color for each 8x8 pixel area is stored in bits 7-6 of an attribute table at $5C00-$5FFF.
  • Genesis VDP: The base color for each 8x8 pixel area is stored in bits 14-13 of each map entry.
  • Super NES PPU: The base color for each 8x8 pixel area is stored in bits 10-8 of each map entry.
  • Game Boy Color: The base color for each 8x8 pixel area is stored in bits 2-0 of map entries in the second plane of VRAM.
  • Game Boy Advance: The base color for each 8x8 pixel area is stored in bits 15-12 of each map entry.
In these systems (other than Game Boy Color), you can't actually change the color that corresponds to pixel value 0. The base color value controls the upper bits only for pixel values 1-3 (NES) or 1-15 (MD, SNES, GBA).

Re: Any Questions for background

Posted: Sun May 11, 2014 3:57 pm
by Kannagi
I love this forum :)

@ ARM9:
thank you I found the solution and I do not know neviksti.com
I thought "Tile number" was 2 bytes (yes it's silly).

@ tepples:
Yes I'm curious, and I like that kind info :wink: