From 7a965efd907455e8a00924f176b678a8de656e1c Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 23 Aug 2024 06:21:27 +0200 Subject: [PATCH] Tandy and CGA: Implement the VSync interrupt, fixes Ghostbusters freezing. --- src/machine/m_tandy.c | 2 ++ src/video/vid_cga.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index d51209123..56982b3bd 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -27,6 +27,7 @@ #include <86box/86box.h> #include <86box/timer.h> #include <86box/io.h> +#include <86box/pic.h> #include <86box/pit.h> #include <86box/nmi.h> #include <86box/mem.h> @@ -1215,6 +1216,7 @@ vid_poll(void *priv) vid->dispon = 0; vid->displine = 0; vid->vsynctime = 16; + picint(1 << 5); if (vid->crtc[7]) { if (vid->mode & 1) x = (vid->crtc[1] << 3) + 16; diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index 2ea07c346..8306edd56 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -28,6 +28,7 @@ #include "cpu.h" #include <86box/io.h> #include <86box/timer.h> +#include <86box/pic.h> #include <86box/pit.h> #include <86box/mem.h> #include <86box/rom.h> @@ -607,6 +608,7 @@ cga_poll(void *priv) cga->cgadispon = 0; cga->displine = 0; cga->vsynctime = 16; + picint(1 << 5); if (cga->crtc[7]) { if (cga->cgamode & 1) x = (cga->crtc[1] << 3) + 16;