Introduce a little consistency with regards to pin naming and usage.

Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-04-23 00:58:33 +01:00
parent 77a3171037
commit 1d976e811d
8 changed files with 61 additions and 61 deletions
+4 -4
View File
@@ -22,21 +22,21 @@ namespace EightBit
public event EventHandler<EventArgs> LoweredPOWER;
public bool Powered => this.POWER().Raised();
public bool Powered => this.POWER.Raised();
public ref PinLevel POWER() => ref this.powerLine;
public ref PinLevel POWER => ref this.powerLine;
public virtual void RaisePOWER()
{
this.OnRaisingPOWER();
this.POWER().Raise();
this.POWER.Raise();
this.OnRaisedPOWER();
}
public virtual void LowerPOWER()
{
this.OnLoweringPOWER();
this.POWER().Lower();
this.POWER.Lower();
this.OnLoweredPOWER();
}
+4 -4
View File
@@ -60,9 +60,9 @@ namespace EightBit
public byte L { get => this.HL.Low; set => this.HL.Low = value; }
protected bool Halted => this.HALT().Lowered();
public ref PinLevel HALT => ref this.haltLine;
public ref PinLevel HALT() => ref this.haltLine;
protected bool Halted => this.HALT.Lowered();
public IntelOpCodeDecoded GetDecodedOpCode(byte opCode) => this.decodedOpCodes[opCode];
@@ -76,14 +76,14 @@ namespace EightBit
public virtual void RaiseHALT()
{
this.OnRaisingHALT();
this.HALT().Raise();
this.HALT.Raise();
this.OnRaisedHALT();
}
public virtual void LowerHALT()
{
this.OnLoweringHALT();
this.HALT().Lower();
this.HALT.Lower();
this.OnLoweredHALT();
}
+8 -8
View File
@@ -29,6 +29,10 @@ namespace EightBit
public event EventHandler<EventArgs> LoweredINT;
public ref PinLevel RESET => ref this.resetLine;
public ref PinLevel INT => ref this.intLine;
public Bus Bus { get; }
public Register16 PC { get; } = new Register16();
@@ -44,10 +48,6 @@ namespace EightBit
return (sbyte)result;
}
public ref PinLevel RESET() => ref this.resetLine;
public ref PinLevel INT() => ref this.intLine;
public abstract int Step();
public abstract int Execute();
@@ -78,28 +78,28 @@ namespace EightBit
public virtual void RaiseRESET()
{
this.OnRaisingRESET();
this.RESET().Raise();
this.RESET.Raise();
this.OnRaisedRESET();
}
public virtual void LowerRESET()
{
this.OnLoweringRESET();
this.RESET().Lower();
this.RESET.Lower();
this.OnLoweredRESET();
}
public virtual void RaiseINT()
{
this.OnRaisingINT();
this.INT().Raise();
this.INT.Raise();
this.OnRaisedINT();
}
public virtual void LowerINT()
{
this.OnLoweringINT();
this.INT().Lower();
this.INT.Lower();
this.OnLoweredINT();
}