From 63a50745ac639185138bac8acbcfc237bbee03c4 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 18 Jul 2023 19:29:02 -0500 Subject: [PATCH] Namco 163: #1250, part 1 --- src/engine/platform/n163.h | 3 +++ src/engine/sysDef.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/n163.h b/src/engine/platform/n163.h index 0c5e5913..fdf21dd5 100644 --- a/src/engine/platform/n163.h +++ b/src/engine/platform/n163.h @@ -29,6 +29,7 @@ class DivPlatformN163: public DivDispatch { struct Channel: public SharedChannel { signed char resVol; short wave, wavePos, waveLen; + short curWavePos, curWaveLen; unsigned char waveMode; short loadWave, loadPos, loadLen; unsigned char loadMode; @@ -41,6 +42,8 @@ class DivPlatformN163: public DivDispatch { wave(-1), wavePos(0), waveLen(0), + curWavePos(0), + curWaveLen(0), waveMode(0), loadWave(-1), loadPos(0), diff --git a/src/engine/sysDef.cpp b/src/engine/sysDef.cpp index 6d8a308e..09213d6f 100644 --- a/src/engine/sysDef.cpp +++ b/src/engine/sysDef.cpp @@ -1005,6 +1005,9 @@ void DivEngine::registerSystems() { {DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_WAVE}, {DIV_INS_N163, DIV_INS_N163, DIV_INS_N163, DIV_INS_N163, DIV_INS_N163, DIV_INS_N163, DIV_INS_N163, DIV_INS_N163}, {}, + { + {0x18, {DIV_CMD_N163_CHANNEL_LIMIT, "180x: Change channel limits (0 to 7, x + 1)"}} + }, { {0x10, {DIV_CMD_WAVE, "10xx: Select waveform"}}, {0x11, {DIV_CMD_N163_WAVE_POSITION, "11xx: Set waveform position in RAM (single nibble unit)"}}, @@ -1014,7 +1017,6 @@ void DivEngine::registerSystems() { {0x15, {DIV_CMD_N163_WAVE_LOADPOS, "15xx: Set waveform position for load to RAM (single nibble unit)"}}, {0x16, {DIV_CMD_N163_WAVE_LOADLEN, "16xx: Set waveform length for load to RAM (04 to FC, 4 nibble unit)"}}, {0x17, {DIV_CMD_N163_WAVE_LOADMODE, "170x: Change waveform load mode (0: off; bit 0: load now; bit 1: load when every waveform changes)"}}, - {0x18, {DIV_CMD_N163_CHANNEL_LIMIT, "180x: Change channel limits (0 to 7, x + 1)"}}, {0x20, {DIV_CMD_N163_GLOBAL_WAVE_LOAD, "20xx: (Global) Select waveform for load to RAM"}}, {0x21, {DIV_CMD_N163_GLOBAL_WAVE_LOADPOS, "21xx: (Global) Set waveform position for load to RAM (single nibble unit)"}}, {0x22, {DIV_CMD_N163_GLOBAL_WAVE_LOADLEN, "22xx: (Global) Set waveform length for load to RAM (04 to FC, 4 nibble unit)"}},