changeset 2029:1e7a63f0ccf4

Fix Timer B load bug that made games using Konami sound driver to have slower music tempo than they should
author Michael Pavone <pavone@retrodev.com>
date Mon, 15 Feb 2021 22:10:49 -0800
parents e597572f45ce
children bcc85f6b06c2
files ym2612.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ym2612.c	Mon Feb 15 13:17:08 2021 -0800
+++ b/ym2612.c	Mon Feb 15 22:10:49 2021 -0800
@@ -407,6 +407,9 @@
 				context->timer_b = context->timer_b_load;
 			}
 		}
+	} else if (context->timer_control & BIT_TIMERB_LOAD) {
+		context->timer_control &= ~BIT_TIMERB_LOAD;
+		context->timer_b = context->timer_b_load;
 	}
 	context->sub_timer_b += 0x10;
 	//Update LFO