Correct ROM loading issue in LR35902, by correcting evaluation order in bus write code.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2019-07-28 00:07:00 +01:00
parent 8fba82063a
commit 6cb3aa37df

View File

@ -66,7 +66,8 @@ namespace EightBit
public void Write()
{
this.OnWritingByte();
this.Reference() = this.Data;
var data = this.Data; // N.B. Don't join these two lines together: the
this.Reference() = data; // data bus integrity is lost, due to evaluation order!
this.OnWrittenByte();
}