summaryrefslogtreecommitdiff
path: root/vdp.c
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-05-14 00:40:10 -0700
committerMike Pavone <pavone@retrodev.com>2013-05-14 00:40:10 -0700
commita5ee22f1f54069c92c7e255f3a7c21244c88aabc (patch)
tree0b9d3bb3dfa1e5b1974162145fab346f5dc99c57 /vdp.c
parent01bab45aeb96e05dddb13dc2661b2f95df075591 (diff)
Update Z80 vint timing
Diffstat (limited to 'vdp.c')
-rw-r--r--vdp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vdp.c b/vdp.c
index 881d54f..1ef315f 100644
--- a/vdp.c
+++ b/vdp.c
@@ -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) {