mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-21 12:16:55 +00:00
A few minor consistency corrections.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -6,11 +6,8 @@ namespace EightBit
|
|||||||
{
|
{
|
||||||
private byte port;
|
private byte port;
|
||||||
|
|
||||||
public PortEventArgs(byte value)
|
public PortEventArgs(byte value) => port = value;
|
||||||
{
|
|
||||||
port = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte Port { get { return port; } }
|
public byte Port => port;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
public abstract class Processor : ClockedChip
|
public abstract class Processor : ClockedChip
|
||||||
{
|
{
|
||||||
private Bus bus;
|
private readonly Bus bus;
|
||||||
private byte opcode;
|
private byte opcode;
|
||||||
private ushort pc;
|
private ushort pc = 0;
|
||||||
|
|
||||||
private PinLevel resetLine;
|
private PinLevel resetLine;
|
||||||
private PinLevel intLine;
|
private PinLevel intLine;
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
protected Processor(Bus memory)
|
protected Processor(Bus memory)
|
||||||
{
|
{
|
||||||
bus = memory;
|
bus = memory;
|
||||||
pc = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler<EventArgs> RaisingRESET;
|
public event EventHandler<EventArgs> RaisingRESET;
|
||||||
@@ -29,7 +28,7 @@
|
|||||||
|
|
||||||
public ushort PC { get => pc; set => pc = value; }
|
public ushort PC { get => pc; set => pc = value; }
|
||||||
protected byte OpCode { get => opcode; set => opcode = value; }
|
protected byte OpCode { get => opcode; set => opcode = value; }
|
||||||
public Bus Bus { get => bus; set => bus = value; }
|
public Bus Bus { get => bus; }
|
||||||
|
|
||||||
public ref PinLevel RESET() => ref resetLine;
|
public ref PinLevel RESET() => ref resetLine;
|
||||||
public ref PinLevel INT() => ref intLine;
|
public ref PinLevel INT() => ref intLine;
|
||||||
|
|||||||
+2
-2
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
public Rom() : this(0) { }
|
public Rom() : this(0) { }
|
||||||
|
|
||||||
public override int Size { get { return bytes.Length; } }
|
public override int Size => bytes.Length;
|
||||||
|
|
||||||
protected ref byte[] Bytes() { return ref bytes; }
|
protected ref byte[] Bytes() => ref bytes;
|
||||||
|
|
||||||
static public int Load(FileStream file, ref byte[] output, int writeOffset = 0, int readOffset = 0, int limit = -1, int maximumSize = -1)
|
static public int Load(FileStream file, ref byte[] output, int writeOffset = 0, int readOffset = 0, int limit = -1, int maximumSize = -1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user