--- np2/sound/psggenc.c 2004/07/26 18:52:55 1.11 +++ np2/sound/psggenc.c 2005/05/13 05:47:25 1.12 @@ -70,25 +70,25 @@ void psggen_reset(PSGGEN psg) { psg->tone[i].pvol = psggencfg.volume + 0; } for (i=0; ireg)[i]); } } -void psggen_setreg(PSGGEN psg, REG8 reg, REG8 value) { +void psggen_setreg(PSGGEN psg, UINT reg, REG8 value) { - UINT freq; UINT ch; + UINT freq; - reg &= 15; + reg = reg & 15; if (reg < 14) { sound_sync(); } @@ -160,7 +160,7 @@ void psggen_setreg(PSGGEN psg, REG8 reg, } } -REG8 psggen_getreg(PSGGEN psg, REG8 reg) { +REG8 psggen_getreg(PSGGEN psg, UINT reg) { return(((UINT8 *)&psg->reg)[reg & 15]); }