diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-01-26 19:23:10 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-01-26 19:23:10 -0800 |
commit | 0a9137377b930b7a80200424db2bf3db806a3220 (patch) | |
tree | 4993f5186661766ca84324d3d49d58b319701c24 /vdp.c | |
parent | 05265d3091abd932149648895dd3957cd854ee88 (diff) |
After reviewing the results of my test ROM again it seems pretty clear that the VBlank flag gets set at the same time as the vcounter changes
Diffstat (limited to 'vdp.c')
-rw-r--r-- | vdp.c | 17 |
1 files changed, 1 insertions, 16 deletions
@@ -1692,22 +1692,7 @@ uint16_t vdp_control_port_read(vdp_context * context) uint32_t line= context->vcounter; uint32_t slot = context->hslot; uint32_t inactive_start = (context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START); - if ( - ( - line > inactive_start - && line < 0x1FF - ) - || (line == inactive_start - && ( - slot >= (context->regs[REG_MODE_4] & BIT_H40 ? VBLANK_START_H40 : VBLANK_START_H32) - || slot < (context->regs[REG_MODE_4] & BIT_H40 ? LINE_CHANGE_H40 : LINE_CHANGE_H32) - ) - ) - || (line == 0x1FF - && slot < (context->regs[REG_MODE_4] & BIT_H40 ? VBLANK_START_H40 : VBLANK_START_H32)) - && slot >= (context->regs[REG_MODE_4] & BIT_H40 ? LINE_CHANGE_H40 : LINE_CHANGE_H32) - || !(context->regs[REG_MODE_2] & BIT_DISP_EN) - ) { + if ((line >= inactive_start && line < 0x1FF) || !(context->regs[REG_MODE_2] & BIT_DISP_EN)) { value |= 0x8; } if (context->regs[REG_MODE_4] & BIT_H40) { |