mirror of
https://github.com/libretro/Mesen.git
synced 2025-01-31 22:01:52 +00:00
Fixed background color in mario 1 (mirroring issue), Temp fix for colors in general (R & B were inverted)
This commit is contained in:
parent
e49286e42b
commit
31f9116b60
@ -121,6 +121,9 @@ uint8_t MemoryManager::ReadVRAM(uint16_t addr)
|
||||
} else {
|
||||
if(addr >= 0x3F00) {
|
||||
addr &= 0x3F1F;
|
||||
if(addr == 0x3F10 || addr == 0x3F14 || addr == 0x3F18 || addr == 0x3F1C) {
|
||||
addr &= ~0x0010;
|
||||
}
|
||||
}
|
||||
return _videoRAM[addr & 0x3FFF];
|
||||
}
|
||||
@ -134,6 +137,9 @@ void MemoryManager::WriteVRAM(uint16_t addr, uint8_t value)
|
||||
} else {
|
||||
if(addr >= 0x3F00) {
|
||||
addr &= 0x3F1F;
|
||||
if(addr == 0x3F10 || addr == 0x3F14 || addr == 0x3F18 || addr == 0x3F1C) {
|
||||
addr &= ~0x0010;
|
||||
}
|
||||
//std::cout << "palette:" << std::hex << (short)addr << " = " << (short)value << std::endl;
|
||||
}
|
||||
if(addr == 0x2000) {
|
||||
|
@ -301,7 +301,8 @@ void PPU::DrawPixel()
|
||||
|
||||
//p->palettebuffer[fbRow].color = PPU_PALETTE_RGB[palette % 64];
|
||||
uint32_t bufferPosition = _scanline * 256 + _cycle;
|
||||
((uint32_t*)_outputBuffer)[bufferPosition] = PPU_PALETTE_RGB[palette % 64] | (0xFF << 24);
|
||||
uint32_t paletteColor = PPU_PALETTE_RGB[palette % 64];
|
||||
((uint32_t*)_outputBuffer)[bufferPosition] = (paletteColor & 0xFF00) | ((paletteColor & 0xFF) << 16) | ((paletteColor & 0xFF0000) >> 16) | (0xFF << 24);
|
||||
//p->palettebuffer[fbRow].value = pixel;
|
||||
//p->palettebuffer[fbRow].pindex = -1;
|
||||
}
|
||||
@ -315,8 +316,7 @@ void PPU::ProcessVisibleScanline()
|
||||
LoadShiftRegisters();
|
||||
LoadTileInfo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(_cycle > 0 && _cycle <= 255) {
|
||||
DrawPixel();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user