comparison ym2612.c @ 2005:3ce38692a3f2

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
author Michael Pavone <pavone@retrodev.com>
date Sun, 11 Oct 2020 22:42:10 -0700
parents c3c62dbf1ceb
children 1e7a63f0ccf4
comparison
equal deleted inserted replaced
2004:66f08024d9e9 2005:3ce38692a3f2
177 177
178 //some games seem to expect that the LR flags start out as 1 178 //some games seem to expect that the LR flags start out as 1
179 for (int i = 0; i < NUM_CHANNELS; i++) { 179 for (int i = 0; i < NUM_CHANNELS; i++) {
180 context->channels[i].lr = 0xC0; 180 context->channels[i].lr = 0xC0;
181 context->channels[i].logfile = savedlogs[i]; 181 context->channels[i].logfile = savedlogs[i];
182 if (i < 3) {
183 context->part1_regs[REG_LR_AMS_PMS - YM_PART1_START + i] = 0xC0;
184 } else {
185 context->part2_regs[REG_LR_AMS_PMS - YM_PART2_START + i - 3] = 0xC0;
186 }
182 } 187 }
183 context->write_cycle = CYCLE_NEVER; 188 context->write_cycle = CYCLE_NEVER;
184 for (int i = 0; i < NUM_OPERATORS; i++) { 189 for (int i = 0; i < NUM_OPERATORS; i++) {
185 context->operators[i].envelope = MAX_ENVELOPE; 190 context->operators[i].envelope = MAX_ENVELOPE;
186 context->operators[i].env_phase = PHASE_RELEASE; 191 context->operators[i].env_phase = PHASE_RELEASE;