aboutsummaryrefslogtreecommitdiff
path: root/Mpu401.cpp
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2024-04-07 15:55:45 +0200
committerJavier <dev.git@javispedro.com>2024-04-07 16:36:46 +0200
commit969531b92ac5d67e26880cff986f53da98b29ce3 (patch)
treed63973ac119ff2648f27778174ffb3af07cb3008 /Mpu401.cpp
parent971641a3b4c572146619ac6ef3ba8c89e3967048 (diff)
downloadvmusic-master.tar.gz
vmusic-master.zip
read all other bits of mpu-401 status register as 1HEADv0.3.3master
this improves compatibility with windows nt 3/4's builtin soundblaster driver
Diffstat (limited to 'Mpu401.cpp')
-rw-r--r--Mpu401.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mpu401.cpp b/Mpu401.cpp
index 450aedd..eadd1a2 100644
--- a/Mpu401.cpp
+++ b/Mpu401.cpp
@@ -301,7 +301,10 @@ static uint8_t mpuReadStatus(PPDMDEVINS pDevIns)
0 - Data is available for reading
1 - No data is available for reading */
- uint8_t status = 0;
+ /* All other bits are undefined, but software such as
+ * NT's sndblst.sys expects them to be read as 1. */
+
+ uint8_t status = 0xFFU & ~(RT_BIT(6) | RT_BIT(7));
Log7Func(("tx buf=%zu/%zu rx buf=%zu/%zu\n",
RTCircBufUsed(pThis->pTxBuf), RTCircBufFree(pThis->pTxBuf),