changeset 2212:71b0cb7c34a6

Fix PSG white noise LSFR tap
author Michael Pavone <pavone@retrodev.com>
date Sun, 28 Aug 2022 22:49:26 -0700
parents 5e6e589efbad
children 53411df7fc71
files psg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/psg.c	Sun Aug 28 22:42:36 2022 -0700
+++ b/psg.c	Sun Aug 28 22:49:26 2022 -0700
@@ -103,7 +103,7 @@
 					context->lsfr = (context->lsfr >> 1) | (context->lsfr << 15);
 					if (context->noise_type) {
 						//white noise
-						if (context->lsfr & 0x40) {
+						if (context->lsfr & 0x4) {
 							context->lsfr ^= 0x8000;
 						}
 					}