shithub: sms

Download patch

ref: 6dc689653c52eb5db90d3adf00f0d1ab2caacc0e
parent: bac611facc1bb5be661f892c9c41016d95ca4bf0
author: Jean-André Santoni <jean.andre.santoni@gmail.com>
date: Thu Mar 12 08:55:55 EDT 2026

Fix pacing

--- a/dat.h
+++ b/dat.h
@@ -53,12 +53,12 @@
 };
 
 enum {
-	FREQ = 53203400,
-	Z80DIV = 15,
+	PSGCLOCK = 3579545,
+	FREQ = PSGCLOCK * 12,
+	Z80DIV = 12,
 	RATE = 44100,
 	SAMPDIV = FREQ / RATE,
 	SAVEFREQ = FREQ / 4,
-	PSGCLOCK = 3579545,
 	PSGDIV = 16,
 };
 
--- a/vdp.c
+++ b/vdp.c
@@ -32,7 +32,7 @@
 void
 vdpmode(void)
 {
-	xmax = 320;
+	xmax = 342;
 	xdisp = 256;
 	hctr = reg[HORCTR];
 }
--