Namco 163: improvements, part 1

This commit is contained in:
tildearrow 2023-07-19 21:27:48 -05:00
parent b941f58720
commit 08bd036193
4 changed files with 4 additions and 26 deletions

View file

@ -432,22 +432,11 @@ int DivPlatformN163::dispatch(DivCommand c) {
break;
case DIV_CMD_N163_GLOBAL_WAVE_LOAD:
loadWave=c.value;
if (loadMode&0x2) { // load when every waveform changes
updateWave(c.chan,loadWave,loadPos,loadLen);
}
// TODO: load wave here
break;
case DIV_CMD_N163_GLOBAL_WAVE_LOADPOS:
loadPos=c.value;
break;
case DIV_CMD_N163_GLOBAL_WAVE_LOADLEN:
loadLen=c.value&0xfc;
break;
case DIV_CMD_N163_GLOBAL_WAVE_LOADMODE:
loadMode=c.value&0x3;
if (loadMode&0x3) { // load now
updateWave(c.chan,loadWave,loadPos,loadLen);
}
break;
case DIV_CMD_N163_CHANNEL_LIMIT:
if (chanMax!=(c.value&0x7)) {
chanMax=c.value&0x7;
@ -573,8 +562,6 @@ void DivPlatformN163::reset() {
chanMax=initChanMax;
loadWave=-1;
loadPos=0;
loadLen=0;
loadMode=0;
rWrite(0x7f,initChanMax<<4);
}

View file

@ -60,8 +60,7 @@ class DivPlatformN163: public DivDispatch {
FixedQueue<QueuedWrite,2048> writes;
unsigned char initChanMax;
unsigned char chanMax;
short loadWave, loadPos, loadLen;
unsigned char loadMode;
short loadWave, loadPos;
bool multiplex;
n163_core n163;

View file

@ -1013,10 +1013,8 @@ void DivEngine::registerSystems() {
{0x11, {DIV_CMD_N163_WAVE_POSITION, "11xx: Set waveform position in RAM (single nibble unit)"}},
{0x12, {DIV_CMD_N163_WAVE_LENGTH, "12xx: Set waveform length in RAM (04 to FC, 4 nibble unit)"}},
{0x13, {DIV_CMD_N163_WAVE_MODE, "130x: Change waveform update mode (0: off; bit 0: update now; bit 1: update when every waveform changes)"}},
{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)"}},
{0x23, {DIV_CMD_N163_GLOBAL_WAVE_LOADMODE, "230x: (Global) Change waveform load mode (0: off; bit 0: load now; bit 1: load when every waveform changes)"}},
{0x20, {DIV_CMD_N163_GLOBAL_WAVE_LOAD, "20xx: Load a waveform into memory"}},
{0x21, {DIV_CMD_N163_GLOBAL_WAVE_LOADPOS, "21xx: Set position for wave load"}},
}
);

View file

@ -462,8 +462,6 @@ void putDispatchChip(void* data, int type) {
ImGui::Text("- chanMax: %d",ch->chanMax);
ImGui::Text("- loadWave: %d",ch->loadWave);
ImGui::Text("- loadPos: %d",ch->loadPos);
ImGui::Text("- loadLen: %d",ch->loadLen);
ImGui::Text("- loadMode: %d",ch->loadMode);
COMMON_CHIP_DEBUG_BOOL;
ImGui::TextColored(ch->multiplex?colorOn:colorOff,">> Multiplex");
break;
@ -876,10 +874,6 @@ void putDispatchChan(void* data, int chanNum, int type) {
ImGui::Text("- wavepos: %d",ch->wavePos);
ImGui::Text("- wavelen: %d",ch->waveLen);
ImGui::Text("- wavemode: %d",ch->waveMode);
ImGui::Text("- loadwave: %d",ch->loadWave);
ImGui::Text("- loadpos: %d",ch->loadPos);
ImGui::Text("- loadlen: %d",ch->loadLen);
ImGui::Text("- loadmode: %d",ch->loadMode);
ImGui::Text("- resVol: %.2x",ch->resVol);
COMMON_CHAN_DEBUG_BOOL;
ImGui::TextColored(ch->volumeChanged?colorOn:colorOff,">> VolumeChanged");