Are unusued bytes of palettes readable & writable?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Petruza
Posts: 311
Joined: Mon Dec 22, 2008 10:45 pm
Location: Argentina

Are unusued bytes of palettes readable & writable?

Post by Petruza »

I've read that unused bytes of the palettes in VRAM, I.E. $3F04, $3F08, $3F0C and their mirrors, are general purpose 6bit registers.
So, they are just 6bit memory positions that can be read and written through $2006 / $2007 ?
Does anyone recall debugging / disassembling a game that used those registers?
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Post by thefox »

I doubt anybody was THAT short on normal RAM.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

Yes. The only way to display those color is to use forced VBlank and point at them with $2006.
Useless, lumbering half-wits don't scare us.
User avatar
Petruza
Posts: 311
Joined: Mon Dec 22, 2008 10:45 pm
Location: Argentina

Post by Petruza »

Bregalad wrote:Yes. The only way to display those color is to use forced VBlank and point at them with $2006.
Please explain further.
Colors? you mean use them as actual palette indexes?
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

If you turn off rendering and point the VRAM address at a color, the color will display on the screen, even if it is one of the ordinarily unused alternate background colors (CGRAM $3F04, $3F08, $3F0C). This is the only way to put those three CGRAM entries through the video output.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Petruza wrote:Please explain further.
Colors? you mean use them as actual palette indexes?
If the VRAM address register is pointing to the palette area while rendering is disabled, the color being pointed is shown on the screen, rather than color 0.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

Post Reply