From 9a180ed33c020e5dde8255bb6ba67cdbed8d3b6e Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 4 Sep 2018 13:45:48 +0200 Subject: [PATCH] The MPU-401 no longer issues IRQ's when in UART mode, even when started up intelligent mode, fixes MIDI playback in NT 3.5. --- src/sound/snd_mpu401.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sound/snd_mpu401.c b/src/sound/snd_mpu401.c index bab83fedc..8a9d4503b 100644 --- a/src/sound/snd_mpu401.c +++ b/src/sound/snd_mpu401.c @@ -84,7 +84,8 @@ QueueByte(mpu_t *mpu, uint8_t data) return; } - if (mpu->queue_used == 0 && mpu->intelligent) { + if ((mpu->queue_used == 0) && (mpu->mode == M_INTELLIGENT)) { + // if (mpu->queue_used == 0 && mpu->intelligent) { mpu->state.irq_pending=1; picint(1 << mpu->irq); } @@ -339,8 +340,9 @@ MPU401_WriteCommand(mpu_t *mpu, uint8_t val) case 0x3f: /* UART mode */ mpu401_log("MPU-401:Set UART mode %X\n",val); + QueueByte(mpu, MSG_MPU_ACK); mpu->mode=M_UART; - break; + return; default:; //mpu401_log("MPU-401:Unhandled command %X",val);