diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-05-22 18:38:44 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-05-22 18:38:44 -0700 |
commit | 808e9ca1a04cf5c5a6077e5f3a11f289db2093b6 (patch) | |
tree | a1bef9559f8e489e5203f6fd8c430745442600dc | |
parent | 68f82c7735196d65a2d57ce8d36cac01a402c3a2 (diff) |
Fix bug in vdp_next_hint that was causing HINTs to fire repeatedly when they should not have fired at all based on an HINT interval that was larger than the number of active lines in the display
-rw-r--r-- | vdp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2034,6 +2034,9 @@ uint32_t vdp_next_hint(vdp_context * context) uint32_t inactive_start = context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START; uint32_t hint_line; if (context->vcounter + context->hint_counter >= inactive_start) { + if (context->regs[REG_HINT] > inactive_start) { + return 0xFFFFFFFF; + } hint_line = context->regs[REG_HINT]; } else { hint_line = context->vcounter + context->hint_counter + 1; |