From 3340a29e3d4c3775a48f6f700662f24f75f6a5f6 Mon Sep 17 00:00:00 2001 From: LMP88959 <109979235+LMP88959@users.noreply.github.com> Date: Sun, 29 Jan 2023 15:15:40 -0800 Subject: [PATCH] Update crt_core.c --- crt_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crt_core.c b/crt_core.c index 9d4b139..1687926 100644 --- a/crt_core.c +++ b/crt_core.c @@ -377,7 +377,7 @@ crt_demodulate(struct CRT *v, int noise) ypos = POSMOD(line + v->vsync + ynudge, CRT_VRES); pos = xpos + ypos * CRT_HRES; - ccr = v->ccf[ypos & 3]; + ccr = v->ccf[ypos % v->cc_period]; sig = v->inp + ln + (v->hsync & ~3); /* burst @ 1/CB_FREQ sample rate */ for (i = CB_BEG; i < CB_BEG + (CB_CYCLES * CRT_CB_FREQ); i++) { int p, n;