Skip to content

Commit

Permalink
changed target to net6.0
Browse files Browse the repository at this point in the history
* changed target to net6.0
* upgraded dependencies
* fixed assembler test
* code cleanup
  • Loading branch information
sictransit authored Apr 16, 2023
1 parent d1adecd commit cfd3d7a
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 61 deletions.
6 changes: 3 additions & 3 deletions Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ApplicationIcon />
<StartupObject />
<RootNamespace>Core8.Core</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Emulator/Emulator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Core8</RootNamespace>
<Copyright>Mikael Fredriksson &lt;[email protected]&gt;</Copyright>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Emulator/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class Options
[Option(Required = false, Default = false, HelpText = "play TINT")]
public bool TINT { get; set; }

[Option(Required = false, Default = @"c:\bin\palbart\palbart.exe", HelpText = "PALBART executable, required for assemble")]
[Option(Required = false, Default = @"c:\bin\palbart.exe", HelpText = "PALBART executable, required for assemble")]
public string PALBART { get; set; }

[Option(Required = false, HelpText = "PAL assembly file")]
Expand Down
7 changes: 4 additions & 3 deletions Emulator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
using Core8.Utilities;
using Serilog;
using Serilog.Core;
using Serilog.Events;
using System;
using System.IO;
using System.Net.Http;
using System.Threading;
using Serilog.Events;

namespace Core8
{
Expand Down Expand Up @@ -68,8 +68,9 @@ public static void Main(string[] args)

if (o.Run)
{
if (o.Debug) {
LoggingLevel.MinimumLevel = Serilog.Events.LogEventLevel.Debug;
if (o.Debug)
{
LoggingLevel.MinimumLevel = Serilog.Events.LogEventLevel.Debug;
}

Run(o.StartingAddress, o.DumpMemory);
Expand Down
4 changes: 2 additions & 2 deletions Extensions/Extensions.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Core8.Extensions</RootNamespace>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Floppy/Floppy.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Core8.Peripherals.Floppy</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Floppy/States/Abstract/ReadWriteSectorBase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using Core8.Peripherals.Floppy.Interfaces;
using Core8.Peripherals.Floppy.Interfaces;
using System;

namespace Core8.Peripherals.Floppy.States.Abstract
{
Expand Down
2 changes: 1 addition & 1 deletion Floppy/States/Abstract/StateBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal abstract class StateBase
{
private readonly int initialTicks;

private readonly Stopwatch executionTime = new Stopwatch();
private readonly Stopwatch executionTime = new();

protected StateBase(IController controller)
{
Expand Down
4 changes: 2 additions & 2 deletions Floppy/States/Initialize.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Core8.Peripherals.Floppy.Interfaces;
using Core8.Peripherals.Floppy.Interfaces;
using Core8.Peripherals.Floppy.States.Abstract;
using System;

namespace Core8.Peripherals.Floppy.States
{
Expand Down
4 changes: 2 additions & 2 deletions Floppy/States/ReadStatus.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Core8.Peripherals.Floppy.Interfaces;
using Core8.Peripherals.Floppy.Interfaces;
using Core8.Peripherals.Floppy.States.Abstract;
using System;

namespace Core8.Peripherals.Floppy.States
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Model.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Core8.Model</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions Teletype/ASR33.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

Expand Down Expand Up @@ -126,7 +125,7 @@ public void RemovePaperTape()
}

public string Printout =>
Encoding.ASCII.GetString(output.Select(x => (byte) (x & 0b_000_001_111_111)).ToArray());
Encoding.ASCII.GetString(output.Select(x => (byte)(x & 0b_000_001_111_111)).ToArray());

public bool InterruptRequested => InputIRQ || OutputIRQ;

Expand Down
6 changes: 1 addition & 5 deletions Teletype/PunchSettings.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core8.Peripherals.Teletype
{
public class PunchSettings
{
public PunchSettings() : this(Color.LightYellow)
{

}

public PunchSettings(Color paperColor, int wrap = 80, bool trimLeader = true, int nullPadding = 12)
Expand Down
5 changes: 1 addition & 4 deletions Teletype/SVGPunch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Xml;
using System.Xml.Linq;

namespace Core8.Peripherals.Teletype
Expand Down Expand Up @@ -40,7 +37,7 @@ public string Punch(byte[] data, string label = null, string comment = null)

if (settings.NullPadding != 0)
{
var nulls = Enumerable.Repeat((byte) 0, settings.NullPadding).ToArray();
var nulls = Enumerable.Repeat((byte)0, settings.NullPadding).ToArray();

data = nulls.Concat(data.SkipWhile(x => x == 0).Reverse().SkipWhile(x => x == 0).Reverse()).Concat(nulls).ToArray();
}
Expand Down
6 changes: 3 additions & 3 deletions Teletype/Teletype.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Core8.Peripherals.Teletype</RootNamespace>
<AssemblyName>Teletype</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NetMQ" Version="4.0.1.6" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="NetMQ" Version="4.0.1.11" />
<PackageReference Include="Serilog" Version="2.12.0" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions TerminalServer/TerminalServer.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Core8.Peripherals</RootNamespace>
<ApplicationIcon />
<OutputType>Exe</OutputType>
<StartupObject />
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NetCoreServer" Version="5.0.7" />
<PackageReference Include="NetMQ" Version="4.0.1.6" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="NetCoreServer" Version="6.7.0" />
<PackageReference Include="NetMQ" Version="4.0.1.11" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Tests/Core8Tests/AssemblerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class AssemblerTest : PDPTestsBase
[TestMethod]
public void TestAssembler()
{
var assembler = new Assembler(@"c:\bin\palbart\palbart.exe");
var assembler = new Assembler(@"c:\bin\palbart.exe");

var result = assembler.TryAssemble(@"Assembler\HelloWorld.asm", out string binFilename);

Expand Down
16 changes: 8 additions & 8 deletions Tests/Core8Tests/Core8Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>

<RootNamespace>Core8.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="coverlet.collector" Version="3.0.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 3 additions & 6 deletions Tests/Core8Tests/LabelerTest.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
using Core8.Tests.Abstract;
using Core8.Peripherals.Teletype;
using Core8.Tests.Abstract;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Core8.Extensions;
using Core8.Peripherals.Teletype;

namespace Core8.Tests
{
[TestClass]
public class LabelerTest : PDPTestsBase
{
{
[TestMethod]
public async Task TestLabeler()
{
Expand Down
1 change: 0 additions & 1 deletion Tests/Core8Tests/PunchTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Core8.Peripherals.Teletype;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Drawing;
using System.Linq;
using System.Text;
Expand Down
4 changes: 2 additions & 2 deletions Utilities/Utilities.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Core8.Utilities</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
</ItemGroup>

</Project>

0 comments on commit cfd3d7a

Please sign in to comment.