diff --git a/Fuse/Fuse.csproj b/Fuse/Fuse.csproj
index a7292e8..b8cebc6 100644
--- a/Fuse/Fuse.csproj
+++ b/Fuse/Fuse.csproj
@@ -64,5 +64,12 @@
EightBit
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Fuse/Lines.cs b/Fuse/Lines.cs
index 8ee525d..a5b9e5e 100644
--- a/Fuse/Lines.cs
+++ b/Fuse/Lines.cs
@@ -1,4 +1,7 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+namespace Fuse
{
using System;
using System.Collections.Generic;
diff --git a/Fuse/RegisterState.cs b/Fuse/RegisterState.cs
index db738c9..17325c1 100644
--- a/Fuse/RegisterState.cs
+++ b/Fuse/RegisterState.cs
@@ -1,4 +1,7 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+namespace Fuse
{
using System;
using System.Collections.Generic;
diff --git a/Fuse/Results.cs b/Fuse/Results.cs
index 81d53db..5865d9f 100644
--- a/Fuse/Results.cs
+++ b/Fuse/Results.cs
@@ -1,4 +1,7 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+namespace Fuse
{
using System.Collections.Generic;
@@ -6,10 +9,10 @@
{
private readonly Lines lines;
- public Dictionary Container { get; } = new Dictionary();
-
public Results(string path) => this.lines = new Lines(path);
+ public Dictionary Container { get; } = new Dictionary();
+
public void Read() => this.lines.Read();
public void Parse()
diff --git a/Fuse/Test.cs b/Fuse/Test.cs
index 1898f96..50e5796 100644
--- a/Fuse/Test.cs
+++ b/Fuse/Test.cs
@@ -1,4 +1,7 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+namespace Fuse
{
using System;
using System.Collections.Generic;
diff --git a/Fuse/TestEvent.cs b/Fuse/TestEvent.cs
index e202559..611f134 100644
--- a/Fuse/TestEvent.cs
+++ b/Fuse/TestEvent.cs
@@ -1,7 +1,9 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+namespace Fuse
{
using System;
- using System.IO;
public class TestEvent
{
diff --git a/Fuse/Tests.cs b/Fuse/Tests.cs
index 2a2fe86..ddb07c0 100644
--- a/Fuse/Tests.cs
+++ b/Fuse/Tests.cs
@@ -1,4 +1,7 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+namespace Fuse
{
using System.Collections.Generic;
@@ -6,10 +9,10 @@
{
private readonly Lines lines;
- public Dictionary Container { get; } = new Dictionary();
-
public Tests(string path) => this.lines = new Lines(path);
+ public Dictionary Container { get; } = new Dictionary();
+
public void Read() => this.lines.Read();
public void Parse()
diff --git a/Fuse/packages.config b/Fuse/packages.config
new file mode 100644
index 0000000..ccc55cf
--- /dev/null
+++ b/Fuse/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/LR35902/GameboyBus.cs b/LR35902/Bus.cs
similarity index 98%
rename from LR35902/GameboyBus.cs
rename to LR35902/Bus.cs
index 550b7e6..d5db5a3 100644
--- a/LR35902/GameboyBus.cs
+++ b/LR35902/Bus.cs
@@ -1,11 +1,11 @@
-//
+//
// Copyright (c) Adrian Conlon. All rights reserved.
//
-using System;
-using System.Collections.Generic;
-
namespace EightBit
{
+ using System;
+ using System.Collections.Generic;
+
namespace GameBoy
{
public abstract class Bus : EightBit.Bus
@@ -175,6 +175,64 @@ namespace EightBit
return new MemoryMapping(this.highInternalRam, 0xff80, 0xffff, AccessLevel.ReadWrite);
}
+ protected override void OnWrittenByte()
+ {
+ base.OnWrittenByte();
+
+ var address = this.Address.Word;
+ var value = this.Data;
+
+ switch (address & 0xe000)
+ {
+ case 0x0000:
+ // Register 0: RAMCS gate data
+ if (this.ram)
+ {
+ throw new InvalidOperationException("Register 0: RAMCS gate data: Not handled!");
+ }
+
+ break;
+ case 0x2000:
+ // Register 1: ROM bank code
+ if (this.banked && this.higherRomBank)
+ {
+ // assert((address >= 0x2000) && (address < 0x4000));
+ // assert((value > 0) && (value < 0x20));
+ this.romBank = value & (byte)Mask.Mask5;
+ }
+
+ break;
+ case 0x4000:
+ // Register 2: ROM bank selection
+ if (this.banked)
+ {
+ throw new InvalidOperationException("Register 2: ROM bank selection: Not handled!");
+ }
+
+ break;
+ case 0x6000:
+ // Register 3: ROM/RAM change
+ if (this.banked)
+ {
+ switch (value & (byte)Mask.Mask1)
+ {
+ case 0:
+ this.higherRomBank = true;
+ this.ramBankSwitching = false;
+ break;
+ case 1:
+ this.higherRomBank = false;
+ this.ramBankSwitching = true;
+ break;
+ default:
+ throw new InvalidOperationException("Unreachable");
+ }
+ }
+
+ break;
+ }
+ }
+
private void ValidateCartridgeType()
{
this.rom = this.banked = this.ram = this.battery = false;
@@ -266,60 +324,6 @@ namespace EightBit
}
}
- protected override void OnWrittenByte()
- {
- base.OnWrittenByte();
-
- var address = this.Address.Word;
- var value = this.Data;
-
- switch (address & 0xe000)
- {
- case 0x0000:
- // Register 0: RAMCS gate data
- if (this.ram)
- {
- throw new InvalidOperationException("Register 0: RAMCS gate data: Not handled!");
- }
- break;
- case 0x2000:
- // Register 1: ROM bank code
- if (this.banked && this.higherRomBank)
- {
- //assert((address >= 0x2000) && (address < 0x4000));
- //assert((value > 0) && (value < 0x20));
- this.romBank = value & (byte)Mask.Mask5;
- }
- break;
- case 0x4000:
- // Register 2: ROM bank selection
- if (this.banked)
- {
- throw new InvalidOperationException("Register 2: ROM bank selection: Not handled!");
- }
- break;
- case 0x6000:
- // Register 3: ROM/RAM change
- if (this.banked)
- {
- switch (value & (byte)Mask.Mask1)
- {
- case 0:
- this.higherRomBank = true;
- this.ramBankSwitching = false;
- break;
- case 1:
- this.higherRomBank = false;
- this.ramBankSwitching = true;
- break;
- default:
- throw new InvalidOperationException("Unreachable");
- }
- }
- break;
- }
- }
-
private int RunRasterLines(int lines)
{
var count = 0;
@@ -362,6 +366,7 @@ namespace EightBit
this.IO.TriggerInterrupt(Interrupts.VerticalBlank);
}
+
return this.RunRasterLines(lines);
}
diff --git a/LR35902/ColourShades.cs b/LR35902/ColourShades.cs
index b500d9f..5f8c083 100644
--- a/LR35902/ColourShades.cs
+++ b/LR35902/ColourShades.cs
@@ -10,7 +10,7 @@ namespace EightBit
Off,
Light,
Medium,
- Dark
+ Dark,
}
}
}
diff --git a/LR35902/Interrupts.cs b/LR35902/Interrupts.cs
index ed56783..a767bd6 100644
--- a/LR35902/Interrupts.cs
+++ b/LR35902/Interrupts.cs
@@ -14,7 +14,7 @@ namespace EightBit
DisplayControlStatus = Bits.Bit1, // LCDC Status
TimerOverflow = Bits.Bit2, // Timer Overflow
SerialTransfer = Bits.Bit3, // Serial Transfer
- KeypadPressed = Bits.Bit4 // Hi-Lo transition of P10-P13
+ KeypadPressed = Bits.Bit4, // Hi-Lo transition of P10-P13
}
}
}
diff --git a/LR35902/IoRegisters.cs b/LR35902/IoRegisters.cs
index 1828177..b66beb4 100644
--- a/LR35902/IoRegisters.cs
+++ b/LR35902/IoRegisters.cs
@@ -12,69 +12,70 @@ namespace EightBit
public const int BASE = 0xFF00;
// Port/Mode Registers
- public const int P1 = 0x0; // R/W Mask5
- public const int SB = 0x1; // R/W Mask8
- public const int SC = 0x2; // R/W Bit7 | Bit0
+ public const int P1 = 0x0; // R/W Mask5
+ public const int SB = 0x1; // R/W Mask8
+ public const int SC = 0x2; // R/W Bit7 | Bit0
// Timer control
- public const int DIV = 0x4; // R/W Mask8
- public const int TIMA = 0x5; // R/W Mask8
- public const int TMA = 0x6; // R/W Mask8
- public const int TAC = 0x7; // R/W Mask3
+ public const int DIV = 0x4; // R/W Mask8
+ public const int TIMA = 0x5; // R/W Mask8
+ public const int TMA = 0x6; // R/W Mask8
+ public const int TAC = 0x7; // R/W Mask3
// Interrupt Flags
- public const int IF = 0xF; // R/W Mask5
- public const int IE = 0xFF; // R/W Mask5
+ public const int IF = 0xF; // R/W Mask5
+ public const int IE = 0xFF; // R/W Mask5
// Sound Registers
- public const int NR10 = 0x10; // R/W Mask7
- public const int NR11 = 0x11; // R/W Bit7 | Bit6
- public const int NR12 = 0x12; // R/W Mask8
- public const int NR13 = 0x13; // W 0
- public const int NR14 = 0x14; // R/W Bit6
- public const int NR21 = 0x16; // R/W Bit7 | Bit6
- public const int NR22 = 0x17; // R/W Mask8
- public const int NR23 = 0x18; // W 0
- public const int NR24 = 0x19; // R/W Bit6
- public const int NR30 = 0x1A; // R/W Bit7
- public const int NR31 = 0x1B; // R/W Mask8
- public const int NR32 = 0x1C; // R/W Bit6 | Bit5
- public const int NR33 = 0x1D; // W 0
- public const int NR34 = 0x1E; // R/W Bit6
- public const int NR41 = 0x20; // R/W Mask6
- public const int NR42 = 0x21; // R/W Mask8
- public const int NR43 = 0x22; // R/W Mask8
- public const int NR44 = 0x23; // R/W Bit6
- public const int NR50 = 0x24; // R/W Mask8
- public const int NR51 = 0x25; // R/W Mask8
- public const int NR52 = 0x26; // R/W Mask8 Mask8
+ public const int NR10 = 0x10; // R/W Mask7
+ public const int NR11 = 0x11; // R/W Bit7 | Bit6
+ public const int NR12 = 0x12; // R/W Mask8
+ public const int NR13 = 0x13; // W 0
+ public const int NR14 = 0x14; // R/W Bit6
+ public const int NR21 = 0x16; // R/W Bit7 | Bit6
+ public const int NR22 = 0x17; // R/W Mask8
+ public const int NR23 = 0x18; // W 0
+ public const int NR24 = 0x19; // R/W Bit6
+ public const int NR30 = 0x1A; // R/W Bit7
+ public const int NR31 = 0x1B; // R/W Mask8
+ public const int NR32 = 0x1C; // R/W Bit6 | Bit5
+ public const int NR33 = 0x1D; // W 0
+ public const int NR34 = 0x1E; // R/W Bit6
+ public const int NR41 = 0x20; // R/W Mask6
+ public const int NR42 = 0x21; // R/W Mask8
+ public const int NR43 = 0x22; // R/W Mask8
+ public const int NR44 = 0x23; // R/W Bit6
+ public const int NR50 = 0x24; // R/W Mask8
+ public const int NR51 = 0x25; // R/W Mask8
+ public const int NR52 = 0x26; // R/W Mask8 Mask8
public const int WAVE_PATTERN_RAM_START = 0x30;
public const int WAVE_PATTERN_RAM_END = 0x3F;
// LCD Display Registers
- public const int LCDC = 0x40; // R/W Mask8
- public const int STAT = 0x41; // R/W Mask7
- public const int SCY = 0x42; // R/W Mask8
- public const int SCX = 0x43; // R/W Mask8
- public const int LY = 0x44; // R Mask8 zeroed
- public const int LYC = 0x45; // R/W Mask8
- public const int DMA = 0x46; // W 0
- public const int BGP = 0x47; // R/W Mask8
- public const int OBP0 = 0x48; // R/W Mask8
- public const int OBP1 = 0x49; // R/W Mask8
- public const int WY = 0x4A; // R/W Mask8
- public const int WX = 0x4B; // R/W Mask8
+ public const int LCDC = 0x40; // R/W Mask8
+ public const int STAT = 0x41; // R/W Mask7
+ public const int SCY = 0x42; // R/W Mask8
+ public const int SCX = 0x43; // R/W Mask8
+ public const int LY = 0x44; // R Mask8 zeroed
+ public const int LYC = 0x45; // R/W Mask8
+ public const int DMA = 0x46; // W 0
+ public const int BGP = 0x47; // R/W Mask8
+ public const int OBP0 = 0x48; // R/W Mask8
+ public const int OBP1 = 0x49; // R/W Mask8
+ public const int WY = 0x4A; // R/W Mask8
+ public const int WX = 0x4B; // R/W Mask8
// Boot rom control
public const int BOOT_DISABLE = 0x50;
private readonly Bus bus;
private readonly Register16 divCounter = new Register16(0xab, 0xcc);
+ private readonly Register16 dmaAddress = new Register16();
+
private int timerCounter = 0;
private int timerRate = 0;
- private readonly Register16 dmaAddress = new Register16();
private bool dmaTransferActive = false;
private bool scanP15 = false;
@@ -107,6 +108,26 @@ namespace EightBit
public bool TimerDisabled => (this.Peek((ushort)TAC) & (byte)Bits.Bit2) == 0;
+ public int TimerClockTicks
+ {
+ get
+ {
+ switch (this.TimerClock)
+ {
+ case 0b00:
+ return 1024; // 4.096 Khz
+ case 0b01:
+ return 16; // 262.144 Khz
+ case 0b10:
+ return 64; // 65.536 Khz
+ case 0b11:
+ return 256; // 16.384 Khz
+ }
+
+ throw new InvalidOperationException("Invalid timer clock specification");
+ }
+ }
+
public void Reset()
{
this.Poke((ushort)NR52, 0xf1);
@@ -132,25 +153,6 @@ namespace EightBit
this.CheckTimer(cycles);
}
- public int TimerClockTicks
- {
- get
- {
- switch (this.TimerClock)
- {
- case 0b00:
- return 1024; // 4.096 Khz
- case 0b01:
- return 16; // 262.144 Khz
- case 0b10:
- return 64; // 65.536 Khz
- case 0b11:
- return 256; // 16.384 Khz
- }
- throw new InvalidOperationException("Invalid timer clock specification");
- }
- }
-
public void IncrementDIV(int cycles)
{
this.divCounter.Word += (ushort)cycles;
@@ -342,10 +344,11 @@ namespace EightBit
var p11 = live && this.p11 ? 1 : 0;
var p12 = live && this.p12 ? 1 : 0;
var p13 = live && this.p13 ? 1 : 0;
- this.Poke(port,
- (byte)(p10 | (p11 << 1) | (p12 << 2) | (p13 << 3)
- | (int)(Bits.Bit4 | Bits.Bit5 | Bits.Bit6 | Bits.Bit7)));
+ this.Poke(
+ port,
+ (byte)(p10 | (p11 << 1) | (p12 << 2) | (p13 << 3) | (int)(Bits.Bit4 | Bits.Bit5 | Bits.Bit6 | Bits.Bit7)));
}
+
break;
case SB:
break;
diff --git a/LR35902/LR35902.FuseTest/LR35902.FuseTest.csproj b/LR35902/LR35902.FuseTest/LR35902.FuseTest.csproj
index 99fcf40..01a88db 100644
--- a/LR35902/LR35902.FuseTest/LR35902.FuseTest.csproj
+++ b/LR35902/LR35902.FuseTest/LR35902.FuseTest.csproj
@@ -52,6 +52,7 @@
+
@@ -67,5 +68,9 @@
LR35902
+
+
+
+
\ No newline at end of file
diff --git a/LR35902/LR35902.FuseTest/Program.cs b/LR35902/LR35902.FuseTest/Program.cs
index 72eccae..073ce94 100644
--- a/LR35902/LR35902.FuseTest/Program.cs
+++ b/LR35902/LR35902.FuseTest/Program.cs
@@ -1,4 +1,8 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+
+namespace Fuse
{
public static class Program
{
diff --git a/LR35902/LR35902.FuseTest/TestRunner.cs b/LR35902/LR35902.FuseTest/TestRunner.cs
index a3a54c3..d0097fe 100644
--- a/LR35902/LR35902.FuseTest/TestRunner.cs
+++ b/LR35902/LR35902.FuseTest/TestRunner.cs
@@ -1,12 +1,21 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+
+namespace Fuse
{
+ public enum Register
+ {
+ AF,
+ BC,
+ DE,
+ HL,
+ SP,
+ PC,
+ }
+
public class TestRunner : EightBit.GameBoy.Bus
{
- public enum Register
- {
- AF, BC, DE, HL, SP, PC
- };
-
private readonly Test test;
private readonly Result result;
private readonly EightBit.Ram ram = new EightBit.Ram(0x10000);
@@ -58,6 +67,31 @@
public override void Initialize() => this.DisableGameRom();
+ private static void DumpDifference(string description, byte expected, byte actual)
+ {
+ var output = $"**** {description}, Expected: {expected:x2}, Got {actual:x2}";
+ System.Console.Error.WriteLine(output);
+ }
+
+ private static void DumpDifference(string highDescription, string lowDescription, EightBit.Register16 expected, EightBit.Register16 actual)
+ {
+ var expectedHigh = expected.High;
+ var expectedLow = expected.Low;
+
+ var actualHigh = actual.High;
+ var actualLow = actual.Low;
+
+ if (expectedHigh != actualHigh)
+ {
+ DumpDifference(highDescription, actualHigh, expectedHigh);
+ }
+
+ if (expectedLow != actualLow)
+ {
+ DumpDifference(lowDescription, actualLow, expectedLow);
+ }
+ }
+
private void InitialiseRegisters()
{
var testState = this.test.RegisterState;
@@ -174,34 +208,10 @@
System.Console.Error.WriteLine($"**** Difference: Address: {address:x4} Expected: {expected:x2} Actual: {actual:x2}");
}
+
++address;
}
}
}
-
- private static void DumpDifference(string description, byte expected, byte actual)
- {
- var output = $"**** {description}, Expected: {expected:x2}, Got {actual:x2}";
- System.Console.Error.WriteLine(output);
- }
-
- private static void DumpDifference(string highDescription, string lowDescription, EightBit.Register16 expected, EightBit.Register16 actual)
- {
- var expectedHigh = expected.High;
- var expectedLow = expected.Low;
-
- var actualHigh = actual.High;
- var actualLow = actual.Low;
-
- if (expectedHigh != actualHigh)
- {
- DumpDifference(highDescription, actualHigh, expectedHigh);
- }
-
- if (expectedLow != actualLow)
- {
- DumpDifference(lowDescription, actualLow, expectedLow);
- }
- }
}
}
diff --git a/LR35902/LR35902.FuseTest/TestSuite.cs b/LR35902/LR35902.FuseTest/TestSuite.cs
index 00226ff..ee2585c 100644
--- a/LR35902/LR35902.FuseTest/TestSuite.cs
+++ b/LR35902/LR35902.FuseTest/TestSuite.cs
@@ -1,4 +1,7 @@
-namespace Fuse
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+namespace Fuse
{
public class TestSuite
{
@@ -47,6 +50,7 @@
++unimplementedCount;
}
}
+
System.Console.Out.WriteLine($"+++ Failed test count: {failedCount}");
System.Console.Out.WriteLine($"+++ Unimplemented test count: {unimplementedCount}");
}
diff --git a/LR35902/LR35902.FuseTest/packages.config b/LR35902/LR35902.FuseTest/packages.config
new file mode 100644
index 0000000..ccc55cf
--- /dev/null
+++ b/LR35902/LR35902.FuseTest/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/LR35902/LR35902.cs b/LR35902/LR35902.cs
index 2a6ce77..9068642 100644
--- a/LR35902/LR35902.cs
+++ b/LR35902/LR35902.cs
@@ -148,6 +148,10 @@ namespace EightBit
private static byte AdjustHalfCarrySub(byte input, byte before, byte value, int calculation) => SetBit(input, StatusBits.HC, CalculateHalfCarrySub(before, value, calculation));
+ private static byte Res(int n, byte operand) => (byte)(operand & ~(1 << n));
+
+ private static byte Set(int n, byte operand) => (byte)(operand | (1 << n));
+
private void DI() => this.IME = false;
private void EI() => this.IME = true;
@@ -296,7 +300,7 @@ namespace EightBit
break;
}
- case 1: // BIT y, r[z]
+ case 1: // BIT y, r[z]
this.Bit(y, this.R(z));
this.Tick(2);
if (z == 6)
@@ -729,6 +733,7 @@ namespace EightBit
default:
throw new InvalidOperationException("Invalid operation mode");
}
+
break;
case 3: // Assorted operations
switch (y)
@@ -1061,10 +1066,6 @@ namespace EightBit
this.F = SetBit(this.F, StatusBits.CF, carry);
}
- private static byte Res(int n, byte operand) => (byte)(operand & ~(1 << n));
-
- private static byte Set(int n, byte operand) => (byte)(operand | (1 << n));
-
private void DAA()
{
int updated = this.A;
diff --git a/LR35902/LR35902.csproj b/LR35902/LR35902.csproj
index 76d44e2..ac559c6 100644
--- a/LR35902/LR35902.csproj
+++ b/LR35902/LR35902.csproj
@@ -63,5 +63,12 @@
EightBit
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LR35902/LcdStatusMode.cs b/LR35902/LcdStatusMode.cs
index 9e31ba3..cb2c464 100644
--- a/LR35902/LcdStatusMode.cs
+++ b/LR35902/LcdStatusMode.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) Adrian Conlon. All rights reserved.
//
namespace EightBit
@@ -10,7 +10,7 @@ namespace EightBit
HBlank = 0b00,
VBlank = 0b01,
SearchingOamRam = 0b10,
- TransferringDataToLcd = 0b11
+ TransferringDataToLcd = 0b11,
}
}
}
diff --git a/LR35902/LcdStatusModeEventArgs.cs b/LR35902/LcdStatusModeEventArgs.cs
index 94da61b..66f86dc 100644
--- a/LR35902/LcdStatusModeEventArgs.cs
+++ b/LR35902/LcdStatusModeEventArgs.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) Adrian Conlon. All rights reserved.
//
namespace EightBit
diff --git a/LR35902/LcdcControl.cs b/LR35902/LcdcControl.cs
index 0021089..e8f7f32 100644
--- a/LR35902/LcdcControl.cs
+++ b/LR35902/LcdcControl.cs
@@ -16,7 +16,7 @@ namespace EightBit
BackgroundCharacterDataSelection = Bits.Bit4,
WindowEnable = Bits.Bit5,
WindowCodeAreaSelection = Bits.Bit6,
- LcdEnable = Bits.Bit7
+ LcdEnable = Bits.Bit7,
}
}
}
diff --git a/LR35902/ObjectAttribute.cs b/LR35902/ObjectAttribute.cs
index e38766b..d6b9699 100644
--- a/LR35902/ObjectAttribute.cs
+++ b/LR35902/ObjectAttribute.cs
@@ -11,7 +11,7 @@ namespace EightBit
{
}
- public ObjectAttribute(Ram ram, ushort address)
+ public ObjectAttribute(Ram ram, ushort address)
{
this.PositionY = ram.Peek(address);
this.PositionX = ram.Peek(++address);
@@ -20,8 +20,11 @@ namespace EightBit
}
public byte PositionY { get; }
+
public byte PositionX { get; }
+
public byte Pattern { get; }
+
public byte Flags { get; }
public int Priority => this.Flags & (byte)Bits.Bit7;
diff --git a/LR35902/Properties/AssemblyInfo.cs b/LR35902/Properties/AssemblyInfo.cs
index 348642f..c83db5e 100644
--- a/LR35902/Properties/AssemblyInfo.cs
+++ b/LR35902/Properties/AssemblyInfo.cs
@@ -1,4 +1,7 @@
-using System.Reflection;
+//
+// Copyright (c) Adrian Conlon. All rights reserved.
+//
+using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/LR35902/packages.config b/LR35902/packages.config
new file mode 100644
index 0000000..ccc55cf
--- /dev/null
+++ b/LR35902/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/LR35902/stylecop.json b/LR35902/stylecop.json
new file mode 100644
index 0000000..3af08b4
--- /dev/null
+++ b/LR35902/stylecop.json
@@ -0,0 +1,19 @@
+{
+ // ACTION REQUIRED: This file was automatically added to your project, but it
+ // will not take effect until additional steps are taken to enable it. See the
+ // following page for additional information:
+ //
+ // https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/EnableConfiguration.md
+
+ "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
+ "settings": {
+ "documentationRules": {
+ "documentInterfaces": false,
+ "documentExposedElements": false,
+ "documentInternalElements": false,
+ "documentPrivateElements": false,
+ "documentPrivateFields": false,
+ "companyName": "Adrian Conlon"
+ }
+ }
+}