mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-21 12:16:55 +00:00
Explicitly state order of operations in code, rather than relying upon RAII etc. (for speed. Much faster)
This commit is contained in:
+11
-41
@@ -69,17 +69,11 @@ namespace EightBit
|
||||
{
|
||||
this.ResetCycles();
|
||||
ExecutingInstruction?.Invoke(this, EventArgs.Empty);
|
||||
try
|
||||
if (this.Powered)
|
||||
{
|
||||
if (this.Powered)
|
||||
{
|
||||
this.PoweredStep();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
ExecutedInstruction?.Invoke(this, EventArgs.Empty);
|
||||
this.PoweredStep();
|
||||
}
|
||||
ExecutedInstruction?.Invoke(this, EventArgs.Empty);
|
||||
return this.Cycles;
|
||||
}
|
||||
|
||||
@@ -121,14 +115,8 @@ namespace EightBit
|
||||
if (this.RESET.Lowered())
|
||||
{
|
||||
RaisingRESET?.Invoke(this, EventArgs.Empty);
|
||||
try
|
||||
{
|
||||
this.RESET.Raise();
|
||||
}
|
||||
finally
|
||||
{
|
||||
RaisedRESET?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
this.RESET.Raise();
|
||||
RaisedRESET?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,14 +125,8 @@ namespace EightBit
|
||||
if (this.RESET.Raised())
|
||||
{
|
||||
LoweringRESET?.Invoke(this, EventArgs.Empty);
|
||||
try
|
||||
{
|
||||
this.RESET.Lower();
|
||||
}
|
||||
finally
|
||||
{
|
||||
LoweredRESET?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
this.RESET.Lower();
|
||||
LoweredRESET?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,14 +136,8 @@ namespace EightBit
|
||||
if (this.INT.Lowered())
|
||||
{
|
||||
RaisingINT?.Invoke(this, EventArgs.Empty);
|
||||
try
|
||||
{
|
||||
this.INT.Raise();
|
||||
}
|
||||
finally
|
||||
{
|
||||
RaisedINT?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
this.INT.Raise();
|
||||
RaisedINT?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,14 +146,8 @@ namespace EightBit
|
||||
if (this.INT.Raised())
|
||||
{
|
||||
LoweringINT?.Invoke(this, EventArgs.Empty);
|
||||
try
|
||||
{
|
||||
this.INT.Lower();
|
||||
}
|
||||
finally
|
||||
{
|
||||
LoweredINT?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
this.INT.Lower();
|
||||
LoweredINT?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user