From 4139b8c690f14d3d5fb67e6197e4a359a7bf7aaa Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Mon, 6 Sep 2010 23:11:29 +0000 Subject: [PATCH] Fixed sprite OV flag behaviour in PC Engine VDC emulation [Angelo Salese, Charles MacDonald] --- src/mame/video/vdc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mame/video/vdc.c b/src/mame/video/vdc.c index 582b50ed8ed..598d055260b 100644 --- a/src/mame/video/vdc.c +++ b/src/mame/video/vdc.c @@ -876,9 +876,12 @@ static void pce_refresh_sprites(running_machine *machine, int which, int line, U sprites_drawn++; if(sprites_drawn > 16) { - vdc[which].status |= VDC_OR; if(vdc[which].vdc_data[CR].w & CR_OV) + { + /* note: flag is set only if irq is taken, Mizubaku Daibouken relies on this behaviour */ + vdc[which].status |= VDC_OR; cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); + } continue; /* Should cause an interrupt */ } @@ -991,9 +994,12 @@ static void pce_refresh_sprites(running_machine *machine, int which, int line, U sprites_drawn++; if( sprites_drawn > 16 ) { - vdc[which].status |= VDC_OR; if(vdc[which].vdc_data[CR].w&CR_OV) + { + /* note: flag is set only if irq is taken, Mizubaku Daibouken relies on this behaviour */ + vdc[which].status |= VDC_OR; cputag_set_input_line(machine, "maincpu", 0, ASSERT_LINE); + } } else {