From 645cce2d47f49889c29f7ae71b4a5dd44fa89537 Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 16 Feb 2019 10:24:43 -0500 Subject: [PATCH] PPU: Fixed broken vram data register --- Core/Ppu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Ppu.cpp b/Core/Ppu.cpp index 32fa9fb..e19b938 100644 --- a/Core/Ppu.cpp +++ b/Core/Ppu.cpp @@ -183,7 +183,7 @@ void Ppu::Write(uint32_t addr, uint8_t value) //VMDATAL - VRAM Data Write low byte _vram[_vramAddress << 1] = value; if(!_vramAddrIncrementOnSecondReg) { - _vramAddress = (_vramIncrementValue + _vramIncrementValue) & 0x7FFF; + _vramAddress = (_vramAddress + _vramIncrementValue) & 0x7FFF; } break; @@ -191,7 +191,7 @@ void Ppu::Write(uint32_t addr, uint8_t value) //VMDATAH - VRAM Data Write high byte _vram[(_vramAddress << 1) + 1] = value; if(_vramAddrIncrementOnSecondReg) { - _vramAddress = (_vramIncrementValue + _vramIncrementValue) & 0x7FFF; + _vramAddress = (_vramAddress + _vramIncrementValue) & 0x7FFF; } break;