Fix for MT03823: pc_miket: Bad colours [Alex Jackson]

This commit is contained in:
Fabio Priuli 2010-05-05 13:08:48 +00:00
parent b0f0e51d0e
commit d05ac40bda

View File

@ -914,9 +914,11 @@ static WRITE8_HANDLER( ppu2c0x_palette_write )
{ {
ppu2c0x_state *ppu2c0x = get_token(space->cpu); ppu2c0x_state *ppu2c0x = get_token(space->cpu);
int color_base = ppu2c0x->color_base; int color_base = ppu2c0x->color_base;
int color_emphasis = (ppu2c0x->regs[PPU_CONTROL1] & PPU_CONTROL1_COLOR_EMPHASIS) * 2; int color_emphasis = (ppu2c0x->regs[PPU_CONTROL1] & PPU_CONTROL1_COLOR_EMPHASIS) * 2;
// it's a palette
// palette RAM is only 6 bits wide
data &= 0x3f;
// transparent pens are mirrored! // transparent pens are mirrored!
if (offset & 0x3) if (offset & 0x3)
{ {
@ -948,7 +950,7 @@ static READ8_HANDLER( ppu2c0x_palette_read )
return (ppu2c0x->palette_ram[offset & 0x1f] & 0x30); return (ppu2c0x->palette_ram[offset & 0x1f] & 0x30);
else else
return (ppu2c0x->palette_ram[offset & 0x1f] & 0x3f); return (ppu2c0x->palette_ram[offset & 0x1f]);
} }
} }