fix blargg's full palette test, now that deemph works properly. only on newppu though.

This commit is contained in:
zeromus 2015-09-13 18:36:16 +00:00
parent 7ee8ca0bb2
commit aaf41d9c78
1 changed files with 13 additions and 1 deletions

View File

@ -2107,6 +2107,18 @@ int FCEUX_PPU_Loop(int skip) {
uint8 pixel = 0, pixelcolor; uint8 pixel = 0, pixelcolor;
//according to qeed's doc, use palette 0 or $2006's value if it is & 0x3Fxx
if (!ScreenON && !SpriteON)
{
// if there's anything wrong with how we're doing this, someone please chime in
int addr = ppur.get_2007access();
if ((addr & 0x3F00) == 0x3F00)
{
pixel = addr & 0x1F;
}
pixelcolor = PALRAM[pixel];
}
//generate the BG data //generate the BG data
if (renderbgnow) { if (renderbgnow) {
uint8* pt = bgdata.main[bgtile].pt; uint8* pt = bgdata.main[bgtile].pt;
@ -2160,7 +2172,7 @@ int FCEUX_PPU_Loop(int skip) {
} }
*ptr++ = PaletteAdjustPixel(pixelcolor); *ptr++ = PaletteAdjustPixel(pixelcolor);
*dptr++= PPU[1]>>5; //grap deemph *dptr++= PPU[1]>>5; //grab deemph
} }
} }
} }