summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-10-11 22:42:10 -0700
committerMichael Pavone <pavone@retrodev.com>2020-10-11 22:42:10 -0700
commitd3158e8afab0cc2a81ecc417ddc3121c086607a3 (patch)
tree7c558fcf90c7828de94359842b6bda88c8cfa29a
parent2ecfb587c3ebb613ba8743857caa60ffe4b261fa (diff)
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
-rw-r--r--ym2612.c5
1 files changed, 5 insertions, 0 deletions
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++) {