mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-11-24 15:17:31 +00:00
Clarifications of EightBit library
This commit is contained in:
@@ -61,8 +61,7 @@ namespace EightBit
|
||||
public void Write()
|
||||
{
|
||||
this.OnWritingByte();
|
||||
var value = this.Data; // N.B. Don't join these two lines together: the
|
||||
this.Reference() = value; // data bus integrity is lost, due to evaluation order!
|
||||
this.Reference() = this.Data;
|
||||
this.OnWrittenByte();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@ namespace EightBit
|
||||
{
|
||||
public class Chip : Device
|
||||
{
|
||||
protected Chip()
|
||||
{
|
||||
}
|
||||
|
||||
public static byte Bit(int which) => (byte)(1 << which);
|
||||
|
||||
public static byte Bit(byte which) => Bit((int)which);
|
||||
|
||||
@@ -10,10 +10,6 @@ namespace EightBit
|
||||
{
|
||||
private PinLevel powerLine;
|
||||
|
||||
protected Device()
|
||||
{
|
||||
}
|
||||
|
||||
public event EventHandler<EventArgs>? RaisingPOWER;
|
||||
|
||||
public event EventHandler<EventArgs>? RaisedPOWER;
|
||||
|
||||
@@ -11,10 +11,6 @@ namespace EightBit
|
||||
private readonly byte[] input = new byte[0x100];
|
||||
private readonly byte[] output = new byte[0x100];
|
||||
|
||||
public InputOutput()
|
||||
{
|
||||
}
|
||||
|
||||
public event EventHandler<PortEventArgs>? ReadingPort;
|
||||
|
||||
public event EventHandler<PortEventArgs>? ReadPort;
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
public class IntelOpCodeDecoded
|
||||
public sealed class IntelOpCodeDecoded
|
||||
{
|
||||
public IntelOpCodeDecoded()
|
||||
{
|
||||
}
|
||||
|
||||
public IntelOpCodeDecoded(byte opCode)
|
||||
{
|
||||
this.X = (opCode & 0b11000000) >> 6; // 0 - 3
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
public class MemoryMapping(Memory memory, ushort begin, ushort mask, AccessLevel access)
|
||||
public sealed class MemoryMapping(Memory memory, ushort begin, ushort mask, AccessLevel access)
|
||||
{
|
||||
public MemoryMapping(Memory memory, ushort begin, Mask mask, AccessLevel access)
|
||||
: this(memory, begin, (ushort)mask, access)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace EightBit
|
||||
using System.Diagnostics;
|
||||
|
||||
[DebuggerDisplay("Word = {Word}")]
|
||||
public class Register16
|
||||
public sealed class Register16
|
||||
{
|
||||
private byte low;
|
||||
private byte high;
|
||||
|
||||
@@ -7,15 +7,10 @@ namespace EightBit
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
public class Rom(int size) : Memory
|
||||
public class Rom(int size = 0) : Memory
|
||||
{
|
||||
private byte[] bytes = new byte[size];
|
||||
|
||||
public Rom()
|
||||
: this(0)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Size => this.bytes.Length;
|
||||
|
||||
public static int Load(Stream file, ref byte[] output, int writeOffset = 0, int readOffset = 0, int limit = -1, int maximumSize = -1)
|
||||
|
||||
Reference in New Issue
Block a user