nes: make full_nes_palette.nes test work. colors still look a bit funky though

This commit is contained in:
goyuken 2014-05-15 23:25:49 +00:00
parent 1e4e675830
commit 0ec92e626e
1 changed files with 9 additions and 5 deletions

View File

@ -208,12 +208,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
//according to qeed's doc, use palette 0 or $2006's value if it is & 0x3Fxx
//EDIT - this requires corect emulation of PPU OFF state, and seems only to apply when the PPU is OFF
//int addr = ppur.get_2007access();
//if ((addr & 0x3F00) == 0x3F00)
//{
// not sure why this was off, but having it on fixes full_nes_palette, and it's a behavior that's been
// verified on the decapped PPU
// if there's anything wrong with how we're doing this, someone please chime in
int addr = ppur.get_2007access();
if ((addr & 0x3F00) == 0x3F00)
{
// System.Console.WriteLine("{0:X4}", addr);
// pixel = addr & 0x1F;
//}
pixel = addr & 0x1F;
}
}
pixelcolor = PALRAM[pixel];
pixelcolor |= 0x8000; //whats this? i think its a flag to indicate a hidden background to be used by the canvas filling logic later