--- np2/sound/cs4231c.c 2004/03/29 14:19:25 1.8 +++ np2/sound/cs4231c.c 2011/01/15 18:04:43 1.11 @@ -148,9 +148,9 @@ void cs4231_reset(void) { ZeroMemory(&cs4231, sizeof(cs4231)); cs4231.bufsize = CS4231_BUFFERS; // cs4231.proc = cs4231_nodecode; - cs4231.port = 0xffff; cs4231.dmach = 0xff; cs4231.dmairq = 0xff; + FillMemory(cs4231.port, sizeof(cs4231.port), 0xff); } void cs4231_update(void) { @@ -169,14 +169,14 @@ static void setdataalign(void) { cs4231.bufdatas &= ~3; } -void cs4231_control(UINT index, REG8 dat) { +void cs4231_control(UINT idx, REG8 dat) { UINT8 modify; DMACH dmach; - modify = ((BYTE *)&cs4231.reg)[index] ^ dat; - ((BYTE *)&cs4231.reg)[index] = dat; - switch(index) { + modify = ((UINT8 *)&cs4231.reg)[idx] ^ dat; + ((UINT8 *)&cs4231.reg)[idx] = dat; + switch(idx) { case CS4231REG_PLAYFMT: if (modify & 0xf0) { setdataalign();