--- np2/sound/psggenc.c 2003/11/08 21:43:01 1.5 +++ np2/sound/psggenc.c 2003/12/08 00:55:33 1.8 @@ -70,20 +70,20 @@ void psggen_reset(PSGGEN psg) { psg->tone[i].pvol = &psg->envvol; } for (i=0; ireg)[reg] = value; if (reg < 14) { sound_sync(); } + ((BYTE *)&psg->reg)[reg] = value; switch(reg) { case 0: case 1: @@ -151,8 +151,15 @@ void psggen_setreg(PSGGEN psg, BYTE reg, } } -BYTE psggen_getreg(PSGGEN psg, BYTE reg) { +REG8 psggen_getreg(PSGGEN psg, REG8 reg) { return(((BYTE *)&psg->reg)[reg & 15]); } +void psggen_setpan(PSGGEN psg, UINT ch, REG8 pan) { + + if ((psg) && (ch < 3)) { + psg->tone[ch].pan = pan; + } +} +