Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Bryce Stremmel | Bug Fixing & Device Features
Adam Walton | Code Editor & File Saving/Loading
Rory Naughton | Code Editor & File Saving/Loading
Aaron Swartz | Code Editor & Dark Theme
Dylan Trenck | Migration to .NET Core & OS Cross-Compatibility
4 changes: 2 additions & 2 deletions SIC Simulator/Assembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace SIC_Simulator
{

// Assigned to Kris Wieben
class Instruction
public class Instruction
{
public readonly string Symbol;
public readonly string OpCode;
Expand Down Expand Up @@ -94,7 +94,7 @@ public override string ToString()
}
}

class Assembler
public class Assembler
{

private static readonly char[] InvalidSymbolCharacters = { ' ', '$', '!', '=', '+', '-', '(', ')', '@' };
Expand Down
27 changes: 13 additions & 14 deletions SIC Simulator/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Runtime.Serialization.Formatters.Soap;
using SIC_Simulator.Extensions;
using static System.Windows.Forms.ListViewItem;
using System.Diagnostics;
Expand Down Expand Up @@ -116,8 +115,8 @@ private void tsmSaveMachineState_Click(object sender, EventArgs e) {

if (Result == DialogResult.OK) {
using (var stream = File.Open(sfd.FileName, FileMode.Create)) {
SoapFormatter sf = new SoapFormatter();
sf.Serialize(stream, this.SICVirtualMachine);
//SoapFormatter sf = new //SoapFormatter();
//sf.Serialize(stream, this.SICVirtualMachine);
}
}

Expand Down Expand Up @@ -493,8 +492,8 @@ private void loadSavedSICMachineStateToolStripMenuItem_Click(object sender, Even

if (Res == DialogResult.OK) {
using (var stream = File.Open(ofd.FileName, FileMode.Open)) {
SoapFormatter osf = new SoapFormatter();
this.SICVirtualMachine = (SIC_CPU)osf.Deserialize(stream);
//SoapFormatter osf = new //SoapFormatter();
//this.SICVirtualMachine = (SIC_CPU)osf.Deserialize(stream);
}
// Refresh Memory and Register Displays to Show Saved State
this.RefreshCPUDisplays();
Expand Down Expand Up @@ -1042,24 +1041,24 @@ private void resetSICDevicesToolStripMenuItem_Click(object sender, EventArgs e)
private void lvDevices_MouseClick(object sender, MouseEventArgs e) {
if (e.Button != MouseButtons.Right) { return; }
ListViewHitTestInfo ht = lvDevices.HitTest(e.X, e.Y);
ContextMenu ct = new ContextMenu();
ContextMenuStrip ct = new ContextMenuStrip();
int deviceNum = ht.Item.Index;
if (ht.Location == ListViewHitTestLocations.Label) {
MenuItem title = new MenuItem("Device " + deviceNum);
ToolStripMenuItem title = new ToolStripMenuItem("Device " + deviceNum);
title.Enabled = false;
ct.MenuItems.Add(title);
ct.Items.Add(title);

MenuItem resetDeviceMenuOption = new MenuItem("Reset Device");
ToolStripMenuItem resetDeviceMenuOption = new ToolStripMenuItem("Reset Device");
resetDeviceMenuOption.Click += resetDevice;
ct.MenuItems.Add(resetDeviceMenuOption);
ct.Items.Add(resetDeviceMenuOption);

MenuItem addStringMenuOption = new MenuItem("Write String to Device");
ToolStripMenuItem addStringMenuOption = new ToolStripMenuItem("Write String to Device");
addStringMenuOption.Click += addString;
ct.MenuItems.Add(addStringMenuOption);
ct.Items.Add(addStringMenuOption);

MenuItem setHexMenuOption = new MenuItem("Set Device Contents");
ToolStripMenuItem setHexMenuOption = new ToolStripMenuItem("Set Device Contents");
setHexMenuOption.Click += setHex;
ct.MenuItems.Add(setHexMenuOption);
ct.Items.Add(setHexMenuOption);

ct.Show(lvDevices, new Point(e.X, e.Y));
}
Expand Down
222 changes: 12 additions & 210 deletions SIC Simulator/SIC Simulator.csproj
Original file line number Diff line number Diff line change
@@ -1,221 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1BE03959-6239-42B3-A318-02B849FE4EBC}</ProjectGuid>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<RootNamespace>SIC_Simulator</RootNamespace>
<AssemblyName>SIC Simulator</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>SIC_CPU.ico</ApplicationIcon>
<Nullable>disable</Nullable>
<GenerateResourceWarnOnBinaryFormatterUse>false</GenerateResourceWarnOnBinaryFormatterUse>
</PropertyGroup>
<PropertyGroup>
<StartupObject>
</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Assembler.cs" />
<Compile Include="dlgRelocateObjectFile.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgRelocateObjectFile.Designer.cs">
<DependentUpon>dlgRelocateObjectFile.cs</DependentUpon>
</Compile>
<Compile Include="dlgSetDeviceContent.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgSetDeviceContent.Designer.cs">
<DependentUpon>dlgSetDeviceContent.cs</DependentUpon>
</Compile>
<Compile Include="dlgSetMemoryByte.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgSetMemoryByte.Designer.cs">
<DependentUpon>dlgSetMemoryByte.cs</DependentUpon>
</Compile>
<Compile Include="dlgSetMemoryWord.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgSetMemoryWord.Designer.cs">
<DependentUpon>dlgSetMemoryWord.cs</DependentUpon>
</Compile>
<Compile Include="AssemblerException.cs" />
<Compile Include="dlgSetRegisterWord.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgSetRegisterWord.Designer.cs">
<DependentUpon>dlgSetRegisterWord.cs</DependentUpon>
</Compile>
<Compile Include="dlgStopAtMemoryAddress.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgStopAtMemoryAddress.Designer.cs">
<DependentUpon>dlgStopAtMemoryAddress.cs</DependentUpon>
</Compile>
<Compile Include="dlgWriteStringToDevice.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgWriteStringToDevice.Designer.cs">
<DependentUpon>dlgWriteStringToDevice.cs</DependentUpon>
</Compile>
<Compile Include="Extensions\integer.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="dlgRelocatePrompt.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgRelocatePrompt.Designer.cs">
<DependentUpon>dlgRelocatePrompt.cs</DependentUpon>
</Compile>
<Compile Include="Form2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form2.Designer.cs">
<DependentUpon>Form2.cs</DependentUpon>
</Compile>
<Compile Include="dlgRelocationWarning.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="dlgRelocationWarning.Designer.cs">
<DependentUpon>dlgRelocationWarning.cs</DependentUpon>
</Compile>
<Compile Include="frmAbout.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmAbout.Designer.cs">
<DependentUpon>frmAbout.cs</DependentUpon>
</Compile>
<Compile Include="Linker.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SICAssemblyException.cs" />
<Compile Include="SICLoader.cs" />
<Compile Include="SIC_CPU.cs" />
<Compile Include="SIC_Device.cs" />
<EmbeddedResource Include="dlgRelocateObjectFile.resx">
<DependentUpon>dlgRelocateObjectFile.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgSetDeviceContent.resx">
<DependentUpon>dlgSetDeviceContent.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgSetMemoryByte.resx">
<DependentUpon>dlgSetMemoryByte.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgSetMemoryWord.resx">
<DependentUpon>dlgSetMemoryWord.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgSetRegisterWord.resx">
<DependentUpon>dlgSetRegisterWord.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgStopAtMemoryAddress.resx">
<DependentUpon>dlgStopAtMemoryAddress.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgWriteStringToDevice.resx">
<DependentUpon>dlgWriteStringToDevice.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgRelocatePrompt.resx">
<DependentUpon>dlgRelocatePrompt.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form2.resx">
<DependentUpon>Form2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="dlgRelocationWarning.resx">
<DependentUpon>dlgRelocationWarning.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmAbout.resx">
<DependentUpon>frmAbout.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="SIC Simulator_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>

<ItemGroup>
<None Include="Resources\1.wav" />
<None Include="Resources\4.wav" />
<None Include="Resources\3.wav" />
<None Include="Resources\2.wav" />
<Content Include="SIC_CPU.ico" />
<Compile Remove="Properties\AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

</Project>
Loading