- He llevat el fullRefresh de gbscreen, no te molt de sentit en GB i era problematic

- [NEW] mem::reset
This commit is contained in:
2025-01-19 22:02:57 +01:00
parent 9b1e6047d0
commit 036ab23173
3 changed files with 10 additions and 7 deletions

View File

@@ -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)

View File

@@ -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();
}

View File

@@ -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);