diff --git a/Core/Ppu.cpp b/Core/Ppu.cpp index c2a7b86..d953e4e 100644 --- a/Core/Ppu.cpp +++ b/Core/Ppu.cpp @@ -140,7 +140,6 @@ void Ppu::Exec() if(_mosaicEnabled) { _mosaicStartScanline = 0; } - _console->GetDmaController()->InitHdmaChannels(); } if(_regs->IsVerticalIrqEnabled() && !_regs->IsHorizontalIrqEnabled() && _scanline == _regs->GetVerticalTimer()) { @@ -165,13 +164,18 @@ void Ppu::Exec() } } - if(_cycle == 278 && _scanline <= (_overscanMode ? 239 : 224)) { - if(_scanline != 0) { - RenderScanline(); - } - if(!_forcedVblank) { - EvaluateNextLineSprites(); - _console->GetDmaController()->ProcessHdmaChannels(); + if(_scanline <= (_overscanMode ? 239 : 224)) { + if(_cycle == 278) { + if(_scanline != 0) { + RenderScanline(); + } + if(!_forcedVblank) { + EvaluateNextLineSprites(); + _console->GetDmaController()->ProcessHdmaChannels(); + } + } else if(_scanline == 0 && _cycle == 6) { + //TODO : To verify: Do HDMA channels get initialized even in forced blank? + _console->GetDmaController()->InitHdmaChannels(); } } else if((_cycle == 134 || _cycle == 135) && (_console->GetMemoryManager()->GetMasterClock() & 0x07) == 0) { //TODO Approximation (DRAM refresh timing is not exact)