Namco 163: fix compiler error

This commit is contained in:
tildearrow 2023-08-19 04:38:13 -05:00
parent c045fb5c26
commit b384367aa8

View file

@ -134,14 +134,16 @@ void DivPlatformN163::updateWave(int ch, int wave, int pos, int len) {
len&=0xfc; // 4 nibble boundary len&=0xfc; // 4 nibble boundary
if (wave<0) { if (wave<0) {
// load from wave synth // load from wave synth
for (int i=0; i<len; i++) { if (ch>=0) {
unsigned char addr=(pos+i); // address (nibble each) for (int i=0; i<len; i++) {
if (addr>=((0x78-(chanMax<<3))<<1)) { // avoid conflict with channel register area unsigned char addr=(pos+i); // address (nibble each)
break; if (addr>=((0x78-(chanMax<<3))<<1)) { // avoid conflict with channel register area
break;
}
unsigned char mask=(addr&1)?0xf0:0x0f;
int data=chan[ch].ws.output[i];
rWriteMask(addr>>1,(addr&1)?(data<<4):(data&0xf),mask);
} }
unsigned char mask=(addr&1)?0xf0:0x0f;
int data=chan[ch].ws.output[i];
rWriteMask(addr>>1,(addr&1)?(data<<4):(data&0xf),mask);
} }
} else { } else {
// load from custom // load from custom