diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs index ec2ea73c89..bc094d10b3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.IEmulator.cs @@ -37,7 +37,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk color_palette[3] = color_palette_Gr[3]; } - if (_tracer.Enabled) { cpu.TraceCallback = s => _tracer.Put(s); @@ -103,9 +102,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk input_register |= 0xF; } - // check for interrupts - - + // check for interrupts if (((contr_prev & 8) > 0) && ((input_register & 8) == 0) || ((contr_prev & 4) > 0) && ((input_register & 4) == 0) || ((contr_prev & 2) > 0) && ((input_register & 2) == 0) || @@ -115,7 +112,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk REG_FF0F |= 0x10; } - while (!vblank_rise) { audio.tick(); @@ -177,7 +173,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk Marshal.FreeHGlobal(iptr3); } - #region Video provider public int _frameHz = 60; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs index eb05f1d0bd..8b1d052982 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs @@ -203,14 +203,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk } else if ((DMA_clock % 4) == 3) { - if ((DMA_inc % 4) == 3) - { - Core.OAM[DMA_inc] = DMA_byte; - } - else - { - Core.OAM[DMA_inc] = DMA_byte; - } + Core.OAM[DMA_inc] = DMA_byte; if (DMA_inc < (0xA0 - 1)) { DMA_inc++; } } @@ -424,11 +417,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk // render the screen and handle hblank render(cycle - 80); } - } - + } } - if ((LY_inc == 0)) { if (cycle == 12) @@ -466,10 +457,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk } else { - // screen disable sets STAT as though it were vblank, but there is no Stat IRQ asserted - //STAT &= 0xFC; - //STAT |= 0x01; - STAT &= 0xF8; VBL_INT = LYC_INT = HBL_INT = OAM_INT = false; @@ -497,7 +484,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk // process latch delays //latch_delay(); - } // might be needed, not sure yet @@ -795,7 +781,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk temp_fetch = y_tile * 32 + (x_tile + tile_inc) % 32; tile_byte = LCDC.Bit(3) ? Core.BG_map_2[temp_fetch] : Core.BG_map_1[temp_fetch]; - } else {