mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2024-06-11 00:29:31 +00:00
Correct AF value in LR35902 emulator
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
ead54b0468
commit
800eff05a6
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user