GB: HDMA shouldn't run if CPU is halted

Fixes MagenTests/hblank_vram_dma test rom
This commit is contained in:
Sour 2025-03-23 13:32:00 +09:00
parent b844642866
commit 8c04e1ad6c

View file

@ -157,7 +157,8 @@ void GbDmaController::WriteCgb(uint16_t addr, uint8_t value)
void GbDmaController::ProcessHdma()
{
if(_state.CgbHdmaRunning) {
//TODOGB what happens if the CPU resumes execution during hblank?
if(_state.CgbHdmaRunning && !_cpu->IsHalted()) {
//4 cycles for setup
_memoryManager->Exec();
_memoryManager->Exec();