diff --git a/lib/ppu_pipeline.c b/lib/ppu_pipeline.c index c4d331a..3f151a1 100644 --- a/lib/ppu_pipeline.c +++ b/lib/ppu_pipeline.c @@ -287,8 +287,8 @@ void pipeline_push_pixel() { } if(ppu_get_context()->rendering_window) { ppu_get_context()->video_buffer[ppu_get_context()->pfc.pushed_x + - (lcd_get_context()->ly * XRES)] = interpolate(ppu_get_context()->video_buffer[ppu_get_context()->pfc.pushed_x + - (lcd_get_context()->ly * XRES)], pixel_data); + (lcd_get_context()->ly * XRES)] = pixel_data;//interpolate(ppu_get_context()->video_buffer[ppu_get_context()->pfc.pushed_x + + //(lcd_get_context()->ly * XRES)], pixel_data); ppu_get_context()->pfc.pushed_x++; }else { @@ -307,7 +307,7 @@ void pipeline_push_pixel() { void pipeline_process() { ppu_get_context()->pfc.map_y = (lcd_get_context()->ly + lcd_get_context()->scroll_y); - ppu_get_context()->pfc.map_x = (ppu_get_context()->pfc.fetch_x + lcd_get_context()->scroll_x); + ppu_get_context()->pfc.map_x = (ppu_get_context()->pfc.fetch_x + (lcd_get_context()->scroll_x & 0b11111000) + ppu_get_context()->pfc.lo_scroll_x); ppu_get_context()->pfc.tile_y = ((lcd_get_context()->ly + lcd_get_context()->scroll_y) % 8) * 2; if(!(ppu_get_context()->line_ticks & 1)) {