mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-21 12:16:55 +00:00
Tighten up the sequence associated with changing pin levels + fix persistent HALT/PC bug
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
+12
-6
@@ -28,16 +28,22 @@ namespace EightBit
|
||||
|
||||
public virtual void RaisePOWER()
|
||||
{
|
||||
this.OnRaisingPOWER();
|
||||
this.POWER.Raise();
|
||||
this.OnRaisedPOWER();
|
||||
if (this.POWER.Lowered())
|
||||
{
|
||||
this.OnRaisingPOWER();
|
||||
this.POWER.Raise();
|
||||
this.OnRaisedPOWER();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void LowerPOWER()
|
||||
{
|
||||
this.OnLoweringPOWER();
|
||||
this.POWER.Lower();
|
||||
this.OnLoweredPOWER();
|
||||
if (this.POWER.Raised())
|
||||
{
|
||||
this.OnLoweringPOWER();
|
||||
this.POWER.Lower();
|
||||
this.OnLoweredPOWER();
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnRaisingPOWER() => this.RaisingPOWER?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
Reference in New Issue
Block a user