From 7165d39105fe89c56a6055d66db0af2d29574587 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 17 Jan 2022 21:14:35 -0500 Subject: [PATCH] Neo Geo/AY: implement 20xx command --- src/engine/platform/ay.cpp | 3 +++ src/engine/platform/ay8930.cpp | 2 +- src/engine/platform/ym2610.cpp | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/platform/ay.cpp b/src/engine/platform/ay.cpp index 23de4a54..602fada4 100644 --- a/src/engine/platform/ay.cpp +++ b/src/engine/platform/ay.cpp @@ -195,6 +195,9 @@ int DivPlatformAY8910::dispatch(DivCommand c) { chan[c.chan].freqChanged=true; break; } + case DIV_CMD_STD_NOISE_MODE: + chan[c.chan].psgMode=(c.value+1)&7; + break; case DIV_CMD_STD_NOISE_FREQ: rWrite(0x06,31-c.value); break; diff --git a/src/engine/platform/ay8930.cpp b/src/engine/platform/ay8930.cpp index b59f71de..77ebf64c 100644 --- a/src/engine/platform/ay8930.cpp +++ b/src/engine/platform/ay8930.cpp @@ -224,7 +224,7 @@ int DivPlatformAY8930::dispatch(DivCommand c) { } case DIV_CMD_STD_NOISE_MODE: if (c.value<0x10) { - // TODO: channel mode + chan[c.chan].psgMode=(c.value+1)&7; } else { chan[c.chan].duty=c.value&15; immWrite(0x16,chan[c.chan].duty); diff --git a/src/engine/platform/ym2610.cpp b/src/engine/platform/ym2610.cpp index 1258a409..bf564821 100644 --- a/src/engine/platform/ym2610.cpp +++ b/src/engine/platform/ym2610.cpp @@ -449,6 +449,9 @@ int DivPlatformYM2610::dispatch(DivCommand c) { break; } + case DIV_CMD_STD_NOISE_MODE: + chan[c.chan].psgMode=(c.value+1)&7; + break; case DIV_CMD_STD_NOISE_FREQ: if (c.chan<4 || c.chan>6) break; rWrite(0x06,31-c.value);