5672e2bec712 — Laurens Holst 3 years ago
MSX/SFGMidi: Correct MIDI error checks.
2 files changed, 5 insertions(+), 5 deletions(-)

M src/MSXMidi.asm
M src/SFGMidi.asm
M src/MSXMidi.asm +3 -3
@@ 146,13 146,13 @@ MSXMidi_CheckOverrun: PROC
 	or 00010000B
 	out (MSXMidi_UART_COMMAND),a
 	pop af
-	and 00001000B
+	bit 3,a
 	ld hl,MidiIn_parityErrorMessage
 	call nz,System_ThrowExceptionWithMessage
-	and 00010000B
+	bit 4,a
 	ld hl,MidiIn_overrunErrorMessage
 	call nz,System_ThrowExceptionWithMessage
-	and 00100000B
+	bit 5,a
 	ld hl,MidiIn_framingErrorMessage
 	call nz,System_ThrowExceptionWithMessage
 	ret

          
M src/SFGMidi.asm +2 -2
@@ 137,10 137,10 @@ SFGMidi_CheckOverrun: PROC
 	call Memory_WriteSlot
 	ei
 	pop af
-	and 00010000B
+	bit 4,a
 	ld hl,MidiIn_overrunErrorMessage
 	call nz,System_ThrowExceptionWithMessage
-	and 00100000B
+	bit 5,a
 	ld hl,MidiIn_framingErrorMessage
 	call nz,System_ThrowExceptionWithMessage
 	ret