diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-08-20 07:07:31 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-08-20 07:07:31 -0700 |
commit | 5c29e368e9bab1c19b5cee312fb40afcc70a7df6 (patch) | |
tree | e31bcd3aa9c9ff4d3cba3fb43f1127f6f892b850 | |
parent | 2a6dee8faa7d37f81f404cc7794a857d3bb425bb (diff) |
Fix sprite rendering regression introduced by H40 line at a time optimization
-rw-r--r-- | vdp.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2522,7 +2522,7 @@ static void vdp_h40_line(vdp_context * context) context->hscroll_b = context->vdpmem[address+2] << 8 | context->vdpmem[address+3]; //printf("%d: HScroll A: %d, HScroll B: %d\n", context->vcounter, context->hscroll_a, context->hscroll_b); //243-246 inclusive - for (int i = 0; i < 28; i++) + for (int i = 0; i < 3; i++) { render_sprite_cells(context); scan_sprite_table(context->vcounter, context); @@ -2552,6 +2552,10 @@ static void vdp_h40_line(vdp_context * context) //250 render_sprite_cells(context); scan_sprite_table(context->vcounter, context); + //251 + scan_sprite_table(context->vcounter, context);//Just a guess + //252 + scan_sprite_table(context->vcounter, context);//Just a guess //254 render_sprite_cells(context); scan_sprite_table(context->vcounter, context); @@ -2580,7 +2584,7 @@ static void vdp_h40_line(vdp_context * context) render_map_output(context->vcounter, col, context); } //sprite rendering phase 2 - for (int i = 0; i < 40; i++) + for (int i = 0; i < MAX_SPRITES_LINE; i++) { read_sprite_x(context->vcounter, context); } |