diff --git a/gbscreen.cpp b/gbscreen.cpp index 0679165..30e6fc7 100644 --- a/gbscreen.cpp +++ b/gbscreen.cpp @@ -181,7 +181,8 @@ namespace gbscreen if ( (STAT&0x3)==3) { uint16_t current_pixel = dots_in_scanline-80; if (current_pixel<160) { - *(ptr_pixel++) = line_buffer[current_pixel]; + //*(ptr_pixel++) = line_buffer[current_pixel]; + gb_pixels[current_pixel+LY*160] = line_buffer[current_pixel]; } } @@ -255,13 +256,13 @@ namespace gbscreen void fullrefresh() { - /*uint32_t tmp = t_screen; + uint32_t tmp = t_screen; t_screen = 0; - uint8_t * tmp_ptr = ptr_pixel; - ptr_pixel = gb_pixels; + //uint8_t * tmp_ptr = ptr_pixel; + //ptr_pixel = gb_pixels; refresh(t_states_total, true); - ptr_pixel = tmp_ptr; - t_screen = tmp;*/ + //ptr_pixel = tmp_ptr; + t_screen = tmp; } void debugrefresh(const uint32_t dt) diff --git a/main.cpp b/main.cpp index ffb0fe1..2d779a9 100644 --- a/main.cpp +++ b/main.cpp @@ -147,7 +147,8 @@ int main(int argc, char *argv[]) debug::history::gototop(); const uint8_t dt = sm83::step(); debug::refresh(); - gbscreen::fullrefresh(); + //gbscreen::fullrefresh(); + gbscreen::refresh(dt); gbscreen::redraw(); //z80analyze::refresh(); } diff --git a/mem.cpp b/mem.cpp index a056a53..ef8db7e 100644 --- a/mem.cpp +++ b/mem.cpp @@ -5,6 +5,7 @@ #include "mbc_none.h" namespace mem { + void (*reset)(void); uint8_t(*readMem)(uint16_t); void (*writeMem)(uint16_t, uint8_t); uint8_t(*getTag)(uint16_t);