Any Questions for background

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
Kannagi
Posts: 100
Joined: Sun May 11, 2014 8:36 am
Location: France

Any Questions for background

Post 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.
ARM9
Posts: 57
Joined: Sun Aug 11, 2013 6:07 am

Re: Any Questions for background

Post by ARM9 »

You change the palette number in the map, see here.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Any Questions for background

Post 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).
Kannagi
Posts: 100
Joined: Sun May 11, 2014 8:36 am
Location: France

Re: Any Questions for background

Post 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:
Post Reply