From 969531b92ac5d67e26880cff986f53da98b29ce3 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 7 Apr 2024 15:55:45 +0200 Subject: read all other bits of mpu-401 status register as 1 this improves compatibility with windows nt 3/4's builtin soundblaster driver --- .gitignore | 1 + ExtPack.xml | 2 +- Mpu401.cpp | 5 ++++- README.md | 2 ++ scripts/runvm.sh | 0 5 files changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/runvm.sh 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 @@ VMusic Adds virtual devices for common music hardware: Adlib card (OPL2/OPL3), MPU-401 compatible (UART mode only), and SBAWE32 (EMU8000). - 0.3.2 + 0.3.3 VMusicMain VMusicMainVM 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 old mode 100644 new mode 100755 -- cgit v1.2.3