Skip to content

Commit

Permalink
apparently this also errors now
Browse files Browse the repository at this point in the history
  • Loading branch information
Morilli committed Feb 14, 2024
1 parent dd42fca commit 6416719
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ public bool ReadPort(ushort port, ref int result)
public bool WritePort(ushort port, int result)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
BitArray dataBits = new BitArray(BitConverter.GetBytes((byte)result));
BitArray dataBits = new BitArray(new[] {(byte)result});
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public override byte ReadPort(ushort port)
public override void WritePort(ushort port, byte value)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
BitArray dataBits = new BitArray(BitConverter.GetBytes(value));
BitArray dataBits = new BitArray(new[] {value});
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public override byte ReadPort(ushort port)
public override void WritePort(ushort port, byte value)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
BitArray dataBits = new BitArray(BitConverter.GetBytes(value));
BitArray dataBits = new BitArray(new[] {value});
byte portUpper = (byte)(port >> 8);
byte portLower = (byte)(port & 0xff);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public bool ReadPort(ushort port, ref int result)
public bool WritePort(ushort port, int result)
{
BitArray portBits = new BitArray(BitConverter.GetBytes(port));
BitArray dataBits = new BitArray(BitConverter.GetBytes((byte)result));
BitArray dataBits = new BitArray(new[] {(byte)result});

// The gate array responds to port 0x7F
bool accessed = !portBits[15];
Expand Down

0 comments on commit 6416719

Please sign in to comment.