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 --- Mpu401.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Mpu401.cpp') 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), -- cgit v1.2.3