From d3158e8afab0cc2a81ecc417ddc3121c086607a3 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 11 Oct 2020 22:42:10 -0700 Subject: Set initial pan bits in YM2612 register array and not just the separate lr field of the channel. This fixes an issue in which some channels would be silent in VGM log output --- ym2612.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ym2612.c') diff --git a/ym2612.c b/ym2612.c index 7e3237d..c6366c0 100644 --- a/ym2612.c +++ b/ym2612.c @@ -179,6 +179,11 @@ void ym_reset(ym2612_context *context) for (int i = 0; i < NUM_CHANNELS; i++) { context->channels[i].lr = 0xC0; context->channels[i].logfile = savedlogs[i]; + if (i < 3) { + context->part1_regs[REG_LR_AMS_PMS - YM_PART1_START + i] = 0xC0; + } else { + context->part2_regs[REG_LR_AMS_PMS - YM_PART2_START + i - 3] = 0xC0; + } } context->write_cycle = CYCLE_NEVER; for (int i = 0; i < NUM_OPERATORS; i++) { -- cgit v1.2.3