From b384367aa8dcaf6a06a5b3b25ceb726ea9f89e9f Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 19 Aug 2023 04:38:13 -0500 Subject: [PATCH] Namco 163: fix compiler error --- src/engine/platform/n163.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/engine/platform/n163.cpp b/src/engine/platform/n163.cpp index e24459ba9..1d6596f12 100644 --- a/src/engine/platform/n163.cpp +++ b/src/engine/platform/n163.cpp @@ -134,14 +134,16 @@ void DivPlatformN163::updateWave(int ch, int wave, int pos, int len) { len&=0xfc; // 4 nibble boundary if (wave<0) { // load from wave synth - for (int i=0; i=((0x78-(chanMax<<3))<<1)) { // avoid conflict with channel register area - break; + if (ch>=0) { + for (int i=0; i=((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 { // load from custom