mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-01-22 16:16:17 +00:00
Correct AF value in LR35902 emulator
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ namespace EightBit
|
||||
public class LR35902 : IntelProcessor
|
||||
{
|
||||
private readonly Bus bus;
|
||||
private readonly Register16 af = new Register16((int)Mask.Mask16);
|
||||
private bool prefixCB = false;
|
||||
|
||||
public LR35902(Bus bus)
|
||||
@@ -22,7 +23,14 @@ namespace EightBit
|
||||
|
||||
public int ClockCycles => this.Cycles * 4;
|
||||
|
||||
public override Register16 AF { get; } = new Register16((int)Mask.Mask16);
|
||||
public override Register16 AF
|
||||
{
|
||||
get
|
||||
{
|
||||
this.af.Low = (byte)HigherNibble(this.af.Low);
|
||||
return this.af;
|
||||
}
|
||||
}
|
||||
|
||||
public override Register16 BC { get; } = new Register16((int)Mask.Mask16);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user