From f07f184ce95b1b164e026ce63f38730af92dad06 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Thu, 15 Aug 2019 16:21:35 +0100 Subject: [PATCH] Fuse fixes: Correct address high part of output port block writes. Signed-off-by: Adrian Conlon --- Z80/Z80.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Z80/Z80.cs b/Z80/Z80.cs index 6c92bdf..a080b05 100644 --- a/Z80/Z80.cs +++ b/Z80/Z80.cs @@ -1905,9 +1905,9 @@ namespace EightBit private void BlockOut(ushort source, Register16 destination) { var value = this.BusRead(source); + destination.High = this.Decrement(destination.High); this.Bus.Address.Word = destination.Word; this.WritePort(); - destination.High = this.Decrement(destination.High); this.MEMPTR.Word = destination.Word; this.F = SetBit(this.F, StatusBits.NF, value & (byte)Bits.Bit7); this.F = SetBit(this.F, StatusBits.HC | StatusBits.CF, (this.L + value) > 0xff);