|
|
| version 1.2, 2003/10/19 16:54:51 | version 1.4, 2003/10/22 14:13:25 |
|---|---|
| Line 45 void psggen_initialize(UINT rate) { | Line 45 void psggen_initialize(UINT rate) { |
| if (psggencfg.puchidec == 0) { | if (psggencfg.puchidec == 0) { |
| psggencfg.puchidec = 1; | psggencfg.puchidec = 1; |
| } | } |
| psggencfg.base = (5000 * (1 << (32 - PSGFREQPADBIT - PSGADDEDBIT))) | if (rate) { |
| psggencfg.base = (5000 * (1 << (32 - PSGFREQPADBIT - PSGADDEDBIT))) | |
| / (rate / 25); | / (rate / 25); |
| } | |
| } | } |
| void psggen_setvol(UINT vol) { | void psggen_setvol(UINT vol) { |
| Line 111 void psggen_setreg(PSGGEN psg, BYTE reg, | Line 113 void psggen_setreg(PSGGEN psg, BYTE reg, |
| case 7: | case 7: |
| keydisp_psgmix(psg); | keydisp_psgmix(psg); |
| psg->mixer = ~value; | psg->mixer = ~value; |
| psg->puchicount = psggencfg.puchidec; | |
| break; | break; |
| case 8: | case 8: |
| Line 125 void psggen_setreg(PSGGEN psg, BYTE reg, | Line 128 void psggen_setreg(PSGGEN psg, BYTE reg, |
| psg->tone[ch].pvol = ((BYTE *)&psg->reg) + reg; | psg->tone[ch].pvol = ((BYTE *)&psg->reg) + reg; |
| } | } |
| psg->tone[ch].puchi = psggencfg.puchidec; | psg->tone[ch].puchi = psggencfg.puchidec; |
| psg->puchicount = psggencfg.puchidec; | |
| // TRACEOUT(("%d", value)); | // TRACEOUT(("%d", value)); |
| break; | break; |