diff options
author | Michael Pavone <pavone@retrodev.com> | 2020-10-11 22:42:10 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2020-10-11 22:42:10 -0700 |
commit | d3158e8afab0cc2a81ecc417ddc3121c086607a3 (patch) | |
tree | 7c558fcf90c7828de94359842b6bda88c8cfa29a | |
parent | 2ecfb587c3ebb613ba8743857caa60ffe4b261fa (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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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++) { |