Mercurial > repos > blastem
changeset 724:2174f92c5f9b
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 22 May 2015 18:38:44 -0700 |
parents | 7178d750efbd |
children | a92ca6f0ed83 |
files | vdp.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/vdp.c Thu May 21 18:37:41 2015 -0700 +++ b/vdp.c Fri May 22 18:38:44 2015 -0700 @@ -2034,6 +2034,9 @@ 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;