Performance when calling PPU.RenderSprites() is OK, but that's just for debugging. When sprites are drawn in PPU.RenderScanline() it slows things down drastically because all 40 sprites are checked every scanline. Need to optimize this:
Sprites disabled (by the ROM clearing LCDC bit 1)
Forcing sprite display on (in the emulator code)
if (/*Registers.LCDControl.SpriteDisplayEnabled*/true)
{
DrawSpritesOntoScanline(x);
}
Performance when calling
PPU.RenderSprites()
is OK, but that's just for debugging. When sprites are drawn inPPU.RenderScanline()
it slows things down drastically because all 40 sprites are checked every scanline. Need to optimize this:Sprites disabled (by the ROM clearing LCDC bit 1)
Forcing sprite display on (in the emulator code)