Mercurial > repos > blastem
comparison vdp.c @ 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 | 8f5339961903 |
children | 45b62d237b7b |
comparison
equal
deleted
inserted
replaced
723:7178d750efbd | 724:2174f92c5f9b |
---|---|
2032 return context->pending_hint_start; | 2032 return context->pending_hint_start; |
2033 } | 2033 } |
2034 uint32_t inactive_start = context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START; | 2034 uint32_t inactive_start = context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START; |
2035 uint32_t hint_line; | 2035 uint32_t hint_line; |
2036 if (context->vcounter + context->hint_counter >= inactive_start) { | 2036 if (context->vcounter + context->hint_counter >= inactive_start) { |
2037 if (context->regs[REG_HINT] > inactive_start) { | |
2038 return 0xFFFFFFFF; | |
2039 } | |
2037 hint_line = context->regs[REG_HINT]; | 2040 hint_line = context->regs[REG_HINT]; |
2038 } else { | 2041 } else { |
2039 hint_line = context->vcounter + context->hint_counter + 1; | 2042 hint_line = context->vcounter + context->hint_counter + 1; |
2040 } | 2043 } |
2041 | 2044 |