Skip to content

Commit

Permalink
PPU: fix vertical OBJ mosaic
Browse files Browse the repository at this point in the history
  • Loading branch information
fleroviux committed Aug 23, 2022
1 parent 1d7afe4 commit 1e1e78c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/nba/src/hw/ppu/ppu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ void PPU::OnScanlineComplete(int cycles_late) {

SyncLineRender();

// Render OBJs for the next scanline.
if (mmio.dispcnt.enable[ENABLE_OBJ]) {
RenderLayerOAM(mmio.dispcnt.mode >= 3, mmio.vcount + 1);
}

// Advance vertical background mosaic counter
if (++mosaic.bg._counter_y == mosaic.bg.size_y) {
mosaic.bg._counter_y = 0;
Expand Down Expand Up @@ -180,11 +185,6 @@ void PPU::OnScanlineComplete(int cycles_late) {
}
}

// Render OBJs for the next scanline.
if (mmio.dispcnt.enable[ENABLE_OBJ]) {
RenderLayerOAM(mmio.dispcnt.mode >= 3, mmio.vcount + 1);
}

/* TODO: it appears that this should really happen ~36 cycles into H-draw.
* But right now if we do that it breaks at least Pinball Tycoon.
*/
Expand Down

0 comments on commit 1e1e78c

Please sign in to comment.