From 30aa1b70bf9862ed709f4fa25cc4ddba2e34c457 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sun, 3 Feb 2019 21:13:06 +0000 Subject: [PATCH] Tidy up some layout issues. Signed-off-by: Adrian Conlon --- EightBit/Bits.cs | 32 ++++++++++++++++---------------- EightBit/IntelOpCodeDecoded.cs | 13 +++++++------ EightBit/Ram.cs | 5 +++-- 3 files changed, 26 insertions(+), 24 deletions(-) diff --git a/EightBit/Bits.cs b/EightBit/Bits.cs index 1150b2d..b11a3f3 100644 --- a/EightBit/Bits.cs +++ b/EightBit/Bits.cs @@ -6,21 +6,21 @@ public enum Bits { Bit0 = 1, - Bit1 = Bit0 << 1, - Bit2 = Bit1 << 1, - Bit3 = Bit2 << 1, - Bit4 = Bit3 << 1, - Bit5 = Bit4 << 1, - Bit6 = Bit5 << 1, - Bit7 = Bit6 << 1, - Bit8 = Bit7 << 1, - Bit9 = Bit8 << 1, - Bit10 = Bit9 << 1, - Bit11 = Bit10 << 1, - Bit12 = Bit11 << 1, - Bit13 = Bit12 << 1, - Bit14 = Bit13 << 1, - Bit15 = Bit14 << 1, - Bit16 = Bit15 << 1 + Bit1 = Bit0 << 1, + Bit2 = Bit1 << 1, + Bit3 = Bit2 << 1, + Bit4 = Bit3 << 1, + Bit5 = Bit4 << 1, + Bit6 = Bit5 << 1, + Bit7 = Bit6 << 1, + Bit8 = Bit7 << 1, + Bit9 = Bit8 << 1, + Bit10 = Bit9 << 1, + Bit11 = Bit10 << 1, + Bit12 = Bit11 << 1, + Bit13 = Bit12 << 1, + Bit14 = Bit13 << 1, + Bit15 = Bit14 << 1, + Bit16 = Bit15 << 1 } } diff --git a/EightBit/IntelOpCodeDecoded.cs b/EightBit/IntelOpCodeDecoded.cs index 1c9c179..a383c2d 100644 --- a/EightBit/IntelOpCodeDecoded.cs +++ b/EightBit/IntelOpCodeDecoded.cs @@ -10,12 +10,13 @@ public IntelOpCodeDecoded() { } - public IntelOpCodeDecoded(byte opcode) { + public IntelOpCodeDecoded(byte opcode) + { x = (opcode & 0b11000000) >> 6; // 0 - 3 - y = (opcode & 0b00111000) >> 3; // 0 - 7 - z = (opcode & 0b00000111); // 0 - 7 - p = (y & 0b110) >> 1; // 0 - 3 - q = (y & 1); // 0 - 1 - } + y = (opcode & 0b00111000) >> 3; // 0 - 7 + z = (opcode & 0b00000111); // 0 - 7 + p = (y & 0b110) >> 1; // 0 - 3 + q = (y & 1); // 0 - 1 + } } } diff --git a/EightBit/Ram.cs b/EightBit/Ram.cs index 14a0343..dcf4fed 100644 --- a/EightBit/Ram.cs +++ b/EightBit/Ram.cs @@ -7,8 +7,9 @@ { } - public override sealed ref byte Reference(ushort address) { - return ref Bytes()[address]; + public override sealed ref byte Reference(ushort address) + { + return ref Bytes()[address]; } public new void Poke(ushort address, byte value)