From abe03dab2125abc51b042ba1d001415e984575d4 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Tue, 27 Dec 2016 13:38:58 -0800 Subject: The function of the HVC Latch enable bit in mode register 1 is different when not in mode 5 --- vdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 5dbbd0b..8deee40 100644 --- a/vdp.c +++ b/vdp.c @@ -2377,7 +2377,7 @@ uint16_t vdp_data_port_read(vdp_context * context) uint16_t vdp_hv_counter_read(vdp_context * context) { - if (context->regs[REG_MODE_1] & BIT_HVC_LATCH) { + if ((context->regs[REG_MODE_2] & BIT_MODE_5) && (context->regs[REG_MODE_1] & BIT_HVC_LATCH)) { return context->hv_latch; } uint32_t line= context->vcounter & 0xFF; -- cgit v1.2.3