Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Novak <jnovak@skedulo.com>2022-06-30 13:13:36 +0300
committerJohn Novak <jnovak@skedulo.com>2022-06-30 13:13:36 +0300
commit935cce1049cb2c304d7a0c7d6dd7c765abc434a6 (patch)
tree9d473226a659abeefcf296daccbc4ac6d430e71e
parentbb1f1aad5025eb00b29b67032742f466119a765c (diff)
print note on stateopl-channels
-rw-r--r--src/hardware/opl.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/hardware/opl.cpp b/src/hardware/opl.cpp
index b97c053bd..10d60a19e 100644
--- a/src/hardware/opl.cpp
+++ b/src/hardware/opl.cpp
@@ -490,6 +490,17 @@ void OPL::Init(const uint16_t sample_rate)
void OPL::WriteReg(const uint32_t reg, const uint8_t val)
{
+ if (reg >= 0xb0 && reg <= 0xb8) {
+ static char chan_state[9] = {};
+ auto chan = reg & 0xf;
+ auto state = (val & 0x20) ? '*' : ' ';
+ chan_state[chan] = state;
+
+ LOG_MSG("CHAN_STATE: 0%c 1%c 2%c 3%c 4%c 5%c 6%c 7%c 8%c",
+ chan_state[0], chan_state[1], chan_state[2], chan_state[3], chan_state[4],
+ chan_state[5], chan_state[6], chan_state[7], chan_state[8]
+ );
+ }
OPL3_WriteRegBuffered(&oplchip, static_cast<uint16_t>(reg), val);
if (reg == 0x105)
newm = reg & 0x01;