changeset 481:1f3450d1129f

Set VBLANK flag in status register when display is disabled
author Mike Pavone <pavone@retrodev.com>
date Tue, 17 Sep 2013 19:10:00 -0700
parents 0737953132ad
children 4b24260125f3
files vdp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vdp.c	Tue Sep 17 09:45:14 2013 -0700
+++ b/vdp.c	Tue Sep 17 19:10:00 2013 -0700
@@ -1544,7 +1544,7 @@
 	}
 	uint32_t line= context->cycles / MCLKS_LINE;
 	uint32_t linecyc = context->cycles % MCLKS_LINE;
-	if (line >= (context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE)) {
+	if (line >= (context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE) || !(context->regs[REG_MODE_2] & BIT_DISP_EN)) {
 		value |= 0x8;
 	}
 	if (linecyc < (context->latched_mode & BIT_H40 ? HBLANK_CLEAR_H40 : HBLANK_CLEAR_H32)) {