summaryrefslogtreecommitdiff
path: root/vdp.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-12-27 13:38:58 -0800
committerMichael Pavone <pavone@retrodev.com>2016-12-27 13:38:58 -0800
commitabe03dab2125abc51b042ba1d001415e984575d4 (patch)
treefd8fe56299968f79df9e060fb68672e888d085f4 /vdp.c
parentc0fa07690efd3128f971367346466964c2c13191 (diff)
The function of the HVC Latch enable bit in mode register 1 is different when not in mode 5
Diffstat (limited to 'vdp.c')
-rw-r--r--vdp.c2
1 files changed, 1 insertions, 1 deletions
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;