Fix initialization error with YM2151.
parent
2b54fdbeae
commit
a2a519b3fd
|
@ -1572,9 +1572,6 @@ void * ym2151_init(int clock, int rate)
|
|||
logerror("Could not create file 2151_.cym\n");
|
||||
}*/
|
||||
|
||||
for (chn = 0; chn < 32; chn ++)
|
||||
PSG->oper[chn].PSG = PSG;
|
||||
|
||||
return PSG;
|
||||
}
|
||||
|
||||
|
@ -1621,7 +1618,8 @@ void ym2151_reset_chip(void *_chip)
|
|||
{
|
||||
memset(&chip->oper[i],'\0',sizeof(YM2151Operator));
|
||||
chip->oper[i].volume = MAX_ATT_INDEX;
|
||||
chip->oper[i].kc_i = 768; /* min kc_i value */
|
||||
chip->oper[i].kc_i = 768; /* min kc_i value */
|
||||
chip->oper[i].PSG = chip;
|
||||
}
|
||||
|
||||
chip->eg_timer = 0;
|
||||
|
|
|
@ -1739,6 +1739,7 @@ uint32 EMU_CALL yam_aica_load_reg(void *state, uint32 a, uint32 mask) {
|
|||
if(YAMSTATE->out_pending > 0) yam_flush(YAMSTATE);
|
||||
{ int c = (YAMSTATE->mslc) & 0x3F;
|
||||
d = (((uint32)(YAMSTATE->chan[c].lp )) & 1) << 15;
|
||||
if(mask & 0xFF00) { YAMSTATE->chan[c].lp = 0; }
|
||||
if(YAMSTATE->afsel == 0) {
|
||||
d |= (((uint32)(YAMSTATE->chan[c].envstate)) & 3) << 13;
|
||||
d |= (YAMSTATE->chan[c].envlevel) & 0x1FFF;
|
||||
|
|
Loading…
Reference in New Issue