From 5ef29db80625c9532985a16540113477edc95ba5 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sun, 28 Jan 2007 20:08:52 +0000 Subject: [PATCH] Fix small bug in readdata. Causes problems on every 32 reads. Thanks Srecko Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2789 --- src/hardware/mpu401.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/mpu401.cpp b/src/hardware/mpu401.cpp index c1532748..29e083ea 100644 --- a/src/hardware/mpu401.cpp +++ b/src/hardware/mpu401.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: mpu401.cpp,v 1.24 2007-01-19 18:48:31 qbix79 Exp $ */ +/* $Id: mpu401.cpp,v 1.25 2007-01-28 20:08:52 qbix79 Exp $ */ #include #include "dosbox.h" @@ -258,8 +258,8 @@ static void MPU401_WriteCommand(Bitu port,Bitu val,Bitu iolen) { static Bitu MPU401_ReadData(Bitu port,Bitu iolen) { Bit8u ret=MSG_MPU_ACK; if (mpu.queue_used) { - ret=mpu.queue[mpu.queue_pos]; if (mpu.queue_pos>=MPU401_QUEUE) mpu.queue_pos-=MPU401_QUEUE; + ret=mpu.queue[mpu.queue_pos]; mpu.queue_pos++;mpu.queue_used--; } if (!mpu.intelligent) return ret;