diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-05-14 00:40:10 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-05-14 00:40:10 -0700 |
commit | a5ee22f1f54069c92c7e255f3a7c21244c88aabc (patch) | |
tree | 0b9d3bb3dfa1e5b1974162145fab346f5dc99c57 /vdp.c | |
parent | 01bab45aeb96e05dddb13dc2661b2f95df075591 (diff) |
Update Z80 vint timing
Diffstat (limited to 'vdp.c')
-rw-r--r-- | vdp.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1572,6 +1572,18 @@ uint32_t vdp_next_vint(vdp_context * context) return vcycle; } +uint32_t vdp_next_vint_z80(vdp_context * context) +{ + uint32_t active_lines = context->latched_mode & BIT_PAL ? PAL_ACTIVE : NTSC_ACTIVE; + uint32_t vcycle = MCLKS_LINE * active_lines; + if (context->latched_mode & BIT_H40) { + vcycle += VINT_CYCLE_H40; + } else { + vcycle += VINT_CYCLE_H32; + } + return vcycle; +} + void vdp_int_ack(vdp_context * context, uint16_t int_num) { if (int_num == 6) { |