# HG changeset patch # User Michael Pavone # Date 1489472004 25200 # Node ID 34d3cb05014de9f4a02524c59323a0ba7998a282 # Parent 78416556ae0277219bd6323778321202bff9b14e Fix VDP buffer overrun that was causing sprite flickering in some games diff -r 78416556ae02 -r 34d3cb05014d vdp.c --- a/vdp.c Mon Mar 13 00:23:58 2017 -0700 +++ b/vdp.c Mon Mar 13 23:13:24 2017 -0700 @@ -2272,6 +2272,7 @@ } else { bg_end_slot = BG_START_SLOT + (256+HORIZ_BORDER)/2; max_draws = MAX_DRAWS_H32_MODE4; + max_sprites = 8; buf_clear_slot = 136; index_reset_slot = 253; index_reset_value = 0; @@ -2312,7 +2313,7 @@ memset(context->linebuf, 0, LINEBUF_SIZE); } else if (context->hslot == index_reset_slot) { context->sprite_index = index_reset_value; - context->slot_counter = max_draws; + context->slot_counter = max_sprites; } else if (context->vcounter == vint_line && context->hslot == vint_slot) { context->flags2 |= FLAG2_VINT_PENDING; context->pending_vint_start = context->cycles;