Namco WSG: 8 channel WSG (15xx) now works
This commit is contained in:
parent
b17694c6a3
commit
bc47d1ebcd
|
@ -161,6 +161,8 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
|||
}
|
||||
|
||||
// update state
|
||||
switch (devType) {
|
||||
case 1:
|
||||
if (chan[0].active) {
|
||||
rWrite(0x15,chan[0].outVol);
|
||||
} else {
|
||||
|
@ -176,7 +178,6 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
|||
} else {
|
||||
rWrite(0x1f,0);
|
||||
}
|
||||
//printf("%d %d %d\n",chan[0].outVol,chan[1].outVol,chan[2].outVol);
|
||||
|
||||
rWrite(0x10,(chan[0].freq)&15);
|
||||
rWrite(0x11,(chan[0].freq>>4)&15);
|
||||
|
@ -197,6 +198,22 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
|||
rWrite(0x05,0);
|
||||
rWrite(0x0a,1);
|
||||
rWrite(0x0f,2);
|
||||
break;
|
||||
case 15:
|
||||
for (int i=0; i<8; i++) {
|
||||
if (chan[i].active) {
|
||||
rWrite((i<<3)+0x03,chan[i].outVol);
|
||||
} else {
|
||||
rWrite((i<<3)+0x03,0);
|
||||
}
|
||||
rWrite((i<<3)+0x04,chan[i].freq&0xff);
|
||||
rWrite((i<<3)+0x05,(chan[i].freq>>8)&0xff);
|
||||
rWrite((i<<3)+0x06,((chan[i].freq>>15)&15)|(i<<4));
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformNamcoWSG::dispatch(DivCommand c) {
|
||||
|
@ -392,11 +409,6 @@ void DivPlatformNamcoWSG::setDeviceType(int type) {
|
|||
switch (type) {
|
||||
case 15:
|
||||
chans=8;
|
||||
for (int i=0; i<8; i++) {
|
||||
regVolume[i]=(i<<3)+0x03;
|
||||
regFreq[i]=(i<<3)+0x04;
|
||||
regWaveSel[i]=(i<<3)+0x06;
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
chans=8;
|
||||
|
|
Loading…
Reference in a new issue