mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-11-24 15:17:31 +00:00
A few small consistency updates:
1) Drop Get/SetPagedByte in favour of normal BusRead/Write 2) Tidy some "using" statements 3) More "expression body" usage, if possible 4) Use field initialisation, rather than construction, if possible 5) Correct IntelProcessor register set/get methods (there were remnants of "copy pasta" code) Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -4,13 +4,11 @@
|
||||
|
||||
public sealed class InputOutput
|
||||
{
|
||||
private byte[] input;
|
||||
private byte[] output;
|
||||
private byte[] input = new byte[0x100];
|
||||
private byte[] output = new byte[0x100];
|
||||
|
||||
public InputOutput()
|
||||
{
|
||||
input = new byte[0x100];
|
||||
output = new byte[0x100];
|
||||
}
|
||||
|
||||
public event EventHandler<PortEventArgs> ReadingPort;
|
||||
@@ -19,8 +17,8 @@
|
||||
public event EventHandler<PortEventArgs> WritingPort;
|
||||
public event EventHandler<PortEventArgs> WrittenPort;
|
||||
|
||||
byte Read(byte port) { return ReadInputPort(port); }
|
||||
void Write(byte port, byte value) { WriteOutputPort(port, value); }
|
||||
byte Read(byte port) => ReadInputPort(port);
|
||||
void Write(byte port, byte value) => WriteOutputPort(port, value);
|
||||
|
||||
byte ReadInputPort(byte port)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user