aboutsummaryrefslogtreecommitdiff
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
parent971641a3b4c572146619ac6ef3ba8c89e3967048 (diff)
downloadvmusic-969531b92ac5d67e26880cff986f53da98b29ce3.tar.gz
vmusic-969531b92ac5d67e26880cff986f53da98b29ce3.zip
read all other bits of mpu-401 status register as 1v0.3.3
this improves compatibility with windows nt 3/4's builtin soundblaster driver
-rw-r--r--.gitignore1
-rw-r--r--ExtPack.xml2
-rw-r--r--Mpu401.cpp5
-rw-r--r--README.md2
-rwxr-xr-x[-rw-r--r--]scripts/runvm.sh0
5 files changed, 8 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 77e7fb1..599ea2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ out
*.vbox-extpack
VirtualBox.src
VirtualBox.*
+*.creator.user
diff --git a/ExtPack.xml b/ExtPack.xml
index 46106ae..4e13cfe 100644
--- a/ExtPack.xml
+++ b/ExtPack.xml
@@ -2,7 +2,7 @@
<VirtualBoxExtensionPack xmlns="http://www.virtualbox.org/VirtualBoxExtensionPack" version="1.0">
<Name>VMusic</Name>
<Description>Adds virtual devices for common music hardware: Adlib card (OPL2/OPL3), MPU-401 compatible (UART mode only), and SBAWE32 (EMU8000).</Description>
- <Version revision="302">0.3.2</Version>
+ <Version revision="303">0.3.3</Version>
<MainModule>VMusicMain</MainModule>
<MainVMModule>VMusicMainVM</MainVMModule>
</VirtualBoxExtensionPack>
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),
diff --git a/README.md b/README.md
index 43abd19..fed53f4 100644
--- a/README.md
+++ b/README.md
@@ -155,6 +155,8 @@ After this, just type `make` followed by `make pack` and `VMusic.vbox-extpack` s
# Changelog
+* v0.3.3 minor change to MPU-401 to improve compatibility
+
* v0.3.2 minor changes to fix compatibility with VirtualBox 7.0.0
* v0.3.1 EMU8000 RAM is now saved in snapshots,
diff --git a/scripts/runvm.sh b/scripts/runvm.sh
index c7471ea..c7471ea 100644..100755
--- a/scripts/runvm.sh
+++ b/scripts/runvm.sh