diff --git a/lib/ppu_sm.c b/lib/ppu_sm.c index a7f4e8d..a4ed309 100644 --- a/lib/ppu_sm.c +++ b/lib/ppu_sm.c @@ -94,7 +94,6 @@ void ppu_mode_oam() { } if(ppu_get_context()->line_ticks == 1) { - ppu_get_context()->pfc.lo_scroll_x = lcd_get_context()->scroll_x & 0b111; //read oam on the first tick only... ppu_get_context()->line_sprites = 0; ppu_get_context()->line_sprite_count = 0; @@ -105,6 +104,9 @@ void ppu_mode_oam() { void ppu_mode_xfer() { pipeline_process(); + if(ppu_get_context()->line_ticks == 81) { + ppu_get_context()->pfc.lo_scroll_x = lcd_get_context()->scroll_x & 0b111; + } if(ppu_get_context()->pfc.pushed_x >= XRES) { pipeline_fifo_reset();