mirror of
https://github.com/livingcomputermuseum/ContrAlto.git
synced 2026-04-26 03:58:25 +00:00
New hardware implementation:
- Orbit controller: implemented and passes ROS-less diagnostics - ROS: In progress, not functional - DAC: For Ted Kaehler's Smalltalk Music system (FM and Sampling). Works, generates audio and can capture to WAV file. - Organ keybard: Stub, enough implemented to make the music system happy (so it will play back music and not crash.) Some minor cleanup. New dependency on NAudio package for DAC playback. Installer updated to include NAudio lib.
This commit is contained in:
@@ -125,7 +125,7 @@ namespace Contralto
|
||||
_otherRegs.Rows[1].Cells[1].Value = Conversion.ToOctal(_system.CPU.T, 6);
|
||||
_otherRegs.Rows[2].Cells[1].Value = Conversion.ToOctal(_system.CPU.M, 6);
|
||||
_otherRegs.Rows[3].Cells[1].Value = Conversion.ToOctal(_system.CPU.IR, 6);
|
||||
_otherRegs.Rows[4].Cells[1].Value = Conversion.ToOctal(_system.CPU.ALUC0, 1);
|
||||
_otherRegs.Rows[4].Cells[1].Value = Conversion.ToOctal(_system.CPU.ALUC0, 1);
|
||||
_otherRegs.Rows[5].Cells[1].Value = Conversion.ToOctal(_system.MemoryBus.MAR, 6);
|
||||
_otherRegs.Rows[6].Cells[1].Value = Conversion.ToOctal(_system.MemoryBus.MDLow, 6);
|
||||
_otherRegs.Rows[7].Cells[1].Value = Conversion.ToOctal(_system.MemoryBus.MDHigh, 6);
|
||||
@@ -241,13 +241,13 @@ namespace Contralto
|
||||
_memoryData.RowCount = 65536;
|
||||
_ram0SourceViewer.RowCount = 1024;
|
||||
_ram1SourceViewer.RowCount = 1024;
|
||||
_ram2SourceViewer.RowCount = 1024;
|
||||
_ram2SourceViewer.RowCount = 1024;
|
||||
|
||||
_otherRegs.Rows.Add("L", "0");
|
||||
_otherRegs.Rows.Add("T", "0");
|
||||
_otherRegs.Rows.Add("M", "0");
|
||||
_otherRegs.Rows.Add("IR", "0");
|
||||
_otherRegs.Rows.Add("ALUC0", "0");
|
||||
_otherRegs.Rows.Add("ALUC0", "0");
|
||||
_otherRegs.Rows.Add("MAR", "0");
|
||||
_otherRegs.Rows.Add("←MDL", "0");
|
||||
_otherRegs.Rows.Add("←MDH", "0");
|
||||
@@ -279,7 +279,7 @@ namespace Contralto
|
||||
sb.AppendFormat("{0}:{1} {2}\r\n",
|
||||
Conversion.ToOctal(i, 6),
|
||||
_memoryData.Rows[i].Cells[2].Value,
|
||||
_memoryData.Rows[i].Cells[3].Value);
|
||||
_memoryData.Rows[i].Cells[3].Value);
|
||||
}
|
||||
|
||||
Clipboard.SetText(sb.ToString());
|
||||
@@ -583,7 +583,7 @@ namespace Contralto
|
||||
string[] taskText =
|
||||
{
|
||||
"EM", // 0 - emulator
|
||||
String.Empty,
|
||||
"OR", // 1 - orbit
|
||||
String.Empty,
|
||||
String.Empty,
|
||||
"KS", // 4 - disk sector
|
||||
@@ -615,7 +615,7 @@ namespace Contralto
|
||||
Color[] taskColors =
|
||||
{
|
||||
Color.LightBlue, // 0 - emulator
|
||||
Color.LightGray, // 1 - unused
|
||||
Color.LightGoldenrodYellow, // 1 - orbit
|
||||
Color.LightGray, // 2 - unused
|
||||
Color.LightGray, // 3 - unused
|
||||
Color.LightGreen, // 4 - disk sector
|
||||
@@ -673,6 +673,10 @@ namespace Contralto
|
||||
Task = TaskType.Emulator;
|
||||
break;
|
||||
|
||||
case "OR":
|
||||
Task = TaskType.Orbit;
|
||||
break;
|
||||
|
||||
case "SE":
|
||||
Task = TaskType.DiskSector;
|
||||
break;
|
||||
|
||||
122
Contralto/UI/SystemOptions.Designer.cs
generated
122
Contralto/UI/SystemOptions.Designer.cs
generated
@@ -30,6 +30,7 @@
|
||||
{
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.AltoI1KROMRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.AltoII3KRAMRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.AltoII2KROMRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
@@ -49,13 +50,21 @@
|
||||
this.InterlaceDisplayCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.DialogOKButton = new System.Windows.Forms.Button();
|
||||
this.DialogCancelButton = new System.Windows.Forms.Button();
|
||||
this.AltoI1KROMRadioButton = new System.Windows.Forms.RadioButton();
|
||||
this.tabPage4 = new System.Windows.Forms.TabPage();
|
||||
this.EnableDACCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.DACOptionsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.EnableDACCaptureCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.DACOutputCapturePathTextBox = new System.Windows.Forms.TextBox();
|
||||
this.BrowseButton = new System.Windows.Forms.Button();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.HostInterfaceGroupBox.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
this.tabPage4.SuspendLayout();
|
||||
this.DACOptionsGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tabControl1
|
||||
@@ -63,6 +72,7 @@
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage3);
|
||||
this.tabControl1.Controls.Add(this.tabPage4);
|
||||
this.tabControl1.Location = new System.Drawing.Point(3, 5);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
@@ -84,6 +94,17 @@
|
||||
this.tabPage1.Text = "CPU";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// AltoI1KROMRadioButton
|
||||
//
|
||||
this.AltoI1KROMRadioButton.AutoSize = true;
|
||||
this.AltoI1KROMRadioButton.Location = new System.Drawing.Point(14, 30);
|
||||
this.AltoI1KROMRadioButton.Name = "AltoI1KROMRadioButton";
|
||||
this.AltoI1KROMRadioButton.Size = new System.Drawing.Size(214, 17);
|
||||
this.AltoI1KROMRadioButton.TabIndex = 4;
|
||||
this.AltoI1KROMRadioButton.TabStop = true;
|
||||
this.AltoI1KROMRadioButton.Text = "Alto I, 1K Control ROM, 1K Control RAM";
|
||||
this.AltoI1KROMRadioButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// AltoII3KRAMRadioButton
|
||||
//
|
||||
this.AltoII3KRAMRadioButton.AutoSize = true;
|
||||
@@ -266,36 +287,98 @@
|
||||
this.InterlaceDisplayCheckBox.Text = "Interlaced Display (headache mode)";
|
||||
this.InterlaceDisplayCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// OKButton
|
||||
// DialogOKButton
|
||||
//
|
||||
this.DialogOKButton.Location = new System.Drawing.Point(211, 239);
|
||||
this.DialogOKButton.Name = "OKButton";
|
||||
this.DialogOKButton.Name = "DialogOKButton";
|
||||
this.DialogOKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.DialogOKButton.TabIndex = 1;
|
||||
this.DialogOKButton.Text = "OK";
|
||||
this.DialogOKButton.UseVisualStyleBackColor = true;
|
||||
this.DialogOKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// CancelButton
|
||||
// DialogCancelButton
|
||||
//
|
||||
this.DialogCancelButton.Location = new System.Drawing.Point(292, 239);
|
||||
this.DialogCancelButton.Name = "CancelButton";
|
||||
this.DialogCancelButton.Name = "DialogCancelButton";
|
||||
this.DialogCancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.DialogCancelButton.TabIndex = 2;
|
||||
this.DialogCancelButton.Text = "Cancel";
|
||||
this.DialogCancelButton.UseVisualStyleBackColor = true;
|
||||
this.DialogCancelButton.Click += new System.EventHandler(this.CancelButton_Click);
|
||||
//
|
||||
// AltoI1KROMRadioButton
|
||||
// tabPage4
|
||||
//
|
||||
this.AltoI1KROMRadioButton.AutoSize = true;
|
||||
this.AltoI1KROMRadioButton.Location = new System.Drawing.Point(14, 30);
|
||||
this.AltoI1KROMRadioButton.Name = "AltoI1KROMRadioButton";
|
||||
this.AltoI1KROMRadioButton.Size = new System.Drawing.Size(214, 17);
|
||||
this.AltoI1KROMRadioButton.TabIndex = 4;
|
||||
this.AltoI1KROMRadioButton.TabStop = true;
|
||||
this.AltoI1KROMRadioButton.Text = "Alto I, 1K Control ROM, 1K Control RAM";
|
||||
this.AltoI1KROMRadioButton.UseVisualStyleBackColor = true;
|
||||
this.tabPage4.Controls.Add(this.DACOptionsGroupBox);
|
||||
this.tabPage4.Controls.Add(this.EnableDACCheckBox);
|
||||
this.tabPage4.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage4.Name = "tabPage4";
|
||||
this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage4.Size = new System.Drawing.Size(360, 201);
|
||||
this.tabPage4.TabIndex = 3;
|
||||
this.tabPage4.Text = "DAC";
|
||||
this.tabPage4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EnableDACCheckBox
|
||||
//
|
||||
this.EnableDACCheckBox.AutoSize = true;
|
||||
this.EnableDACCheckBox.Location = new System.Drawing.Point(19, 22);
|
||||
this.EnableDACCheckBox.Name = "EnableDACCheckBox";
|
||||
this.EnableDACCheckBox.Size = new System.Drawing.Size(275, 17);
|
||||
this.EnableDACCheckBox.TabIndex = 0;
|
||||
this.EnableDACCheckBox.Text = "Enable Audio DAC (Used by Smalltalk Music System)";
|
||||
this.EnableDACCheckBox.UseVisualStyleBackColor = true;
|
||||
this.EnableDACCheckBox.CheckedChanged += new System.EventHandler(this.OnEnableDACCheckboxChanged);
|
||||
//
|
||||
// DACOptionsGroupBox
|
||||
//
|
||||
this.DACOptionsGroupBox.Controls.Add(this.BrowseButton);
|
||||
this.DACOptionsGroupBox.Controls.Add(this.DACOutputCapturePathTextBox);
|
||||
this.DACOptionsGroupBox.Controls.Add(this.label2);
|
||||
this.DACOptionsGroupBox.Controls.Add(this.EnableDACCaptureCheckBox);
|
||||
this.DACOptionsGroupBox.Location = new System.Drawing.Point(15, 52);
|
||||
this.DACOptionsGroupBox.Name = "DACOptionsGroupBox";
|
||||
this.DACOptionsGroupBox.Size = new System.Drawing.Size(335, 139);
|
||||
this.DACOptionsGroupBox.TabIndex = 1;
|
||||
this.DACOptionsGroupBox.TabStop = false;
|
||||
this.DACOptionsGroupBox.Text = "DAC options";
|
||||
//
|
||||
// EnableDACCaptureCheckBox
|
||||
//
|
||||
this.EnableDACCaptureCheckBox.AutoSize = true;
|
||||
this.EnableDACCaptureCheckBox.Location = new System.Drawing.Point(18, 28);
|
||||
this.EnableDACCaptureCheckBox.Name = "EnableDACCaptureCheckBox";
|
||||
this.EnableDACCaptureCheckBox.Size = new System.Drawing.Size(156, 17);
|
||||
this.EnableDACCaptureCheckBox.TabIndex = 0;
|
||||
this.EnableDACCaptureCheckBox.Text = "Enable DAC output capture";
|
||||
this.EnableDACCaptureCheckBox.UseVisualStyleBackColor = true;
|
||||
this.EnableDACCaptureCheckBox.CheckedChanged += new System.EventHandler(this.EnableDACCaptureCheckBox_CheckedChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(16, 58);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(105, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Output capture path:";
|
||||
//
|
||||
// DACOutputCapturePathTextBox
|
||||
//
|
||||
this.DACOutputCapturePathTextBox.Location = new System.Drawing.Point(127, 55);
|
||||
this.DACOutputCapturePathTextBox.Name = "DACOutputCapturePathTextBox";
|
||||
this.DACOutputCapturePathTextBox.Size = new System.Drawing.Size(110, 20);
|
||||
this.DACOutputCapturePathTextBox.TabIndex = 2;
|
||||
//
|
||||
// BrowseButton
|
||||
//
|
||||
this.BrowseButton.Location = new System.Drawing.Point(251, 53);
|
||||
this.BrowseButton.Name = "BrowseButton";
|
||||
this.BrowseButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.BrowseButton.TabIndex = 3;
|
||||
this.BrowseButton.Text = "Browse...";
|
||||
this.BrowseButton.UseVisualStyleBackColor = true;
|
||||
this.BrowseButton.Click += new System.EventHandler(this.BrowseButton_Click);
|
||||
//
|
||||
// SystemOptions
|
||||
//
|
||||
@@ -320,6 +403,10 @@
|
||||
this.HostInterfaceGroupBox.PerformLayout();
|
||||
this.tabPage3.ResumeLayout(false);
|
||||
this.tabPage3.PerformLayout();
|
||||
this.tabPage4.ResumeLayout(false);
|
||||
this.tabPage4.PerformLayout();
|
||||
this.DACOptionsGroupBox.ResumeLayout(false);
|
||||
this.DACOptionsGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -348,5 +435,12 @@
|
||||
private System.Windows.Forms.RadioButton UDPRadioButton;
|
||||
private System.Windows.Forms.RadioButton NoEncapsulationRadioButton;
|
||||
private System.Windows.Forms.RadioButton AltoI1KROMRadioButton;
|
||||
private System.Windows.Forms.TabPage tabPage4;
|
||||
private System.Windows.Forms.GroupBox DACOptionsGroupBox;
|
||||
private System.Windows.Forms.CheckBox EnableDACCheckBox;
|
||||
private System.Windows.Forms.CheckBox EnableDACCaptureCheckBox;
|
||||
private System.Windows.Forms.Button BrowseButton;
|
||||
private System.Windows.Forms.TextBox DACOutputCapturePathTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ using PcapDotNet.Core;
|
||||
using PcapDotNet.Core.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -40,6 +41,9 @@ namespace Contralto.UI
|
||||
/// </summary>
|
||||
private void PopulateUI()
|
||||
{
|
||||
//
|
||||
// System Tab
|
||||
//
|
||||
_selectedSystemType = Configuration.SystemType;
|
||||
_selectedInterfaceType = Configuration.HostPacketInterfaceType;
|
||||
|
||||
@@ -62,9 +66,15 @@ namespace Contralto.UI
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// Display Tab
|
||||
//
|
||||
InterlaceDisplayCheckBox.Checked = Configuration.InterlaceDisplay;
|
||||
ThrottleSpeedCheckBox.Checked = Configuration.ThrottleSpeed;
|
||||
|
||||
//
|
||||
// Ethernet Tab
|
||||
//
|
||||
AltoEthernetAddressTextBox.Text = Conversion.ToOctal(Configuration.HostAddress);
|
||||
|
||||
if (!Configuration.HostRawEthernetInterfacesAvailable)
|
||||
@@ -94,7 +104,16 @@ namespace Contralto.UI
|
||||
break;
|
||||
}
|
||||
|
||||
PopulateNetworkAdapterList(Configuration.HostPacketInterfaceType);
|
||||
PopulateNetworkAdapterList(Configuration.HostPacketInterfaceType);
|
||||
|
||||
//
|
||||
// DAC Tab
|
||||
//
|
||||
EnableDACCheckBox.Checked = Configuration.EnableAudioDAC;
|
||||
DACOptionsGroupBox.Enabled = Configuration.EnableAudioDAC;
|
||||
|
||||
DACOutputCapturePathTextBox.Text = Configuration.AudioDACCapturePath;
|
||||
EnableDACCaptureCheckBox.Checked = Configuration.EnableAudioDACCapture;
|
||||
}
|
||||
|
||||
private void PopulateNetworkAdapterList(PacketInterfaceType encapType)
|
||||
@@ -249,7 +268,18 @@ namespace Contralto.UI
|
||||
|
||||
// Display
|
||||
Configuration.InterlaceDisplay = InterlaceDisplayCheckBox.Checked;
|
||||
Configuration.ThrottleSpeed = ThrottleSpeedCheckBox.Checked;
|
||||
Configuration.ThrottleSpeed = ThrottleSpeedCheckBox.Checked;
|
||||
|
||||
// DAC
|
||||
Configuration.EnableAudioDAC = EnableDACCheckBox.Checked;
|
||||
Configuration.EnableAudioDACCapture = EnableDACCaptureCheckBox.Checked;
|
||||
Configuration.AudioDACCapturePath = DACOutputCapturePathTextBox.Text;
|
||||
|
||||
// Validate that the output folder exists, if not, warn the user
|
||||
if (Configuration.EnableAudioDACCapture && !Directory.Exists(Configuration.AudioDACCapturePath))
|
||||
{
|
||||
MessageBox.Show("Warning: the specified DAC output capture path does not exist or is inaccessible.");
|
||||
}
|
||||
|
||||
this.Close();
|
||||
|
||||
@@ -263,6 +293,37 @@ namespace Contralto.UI
|
||||
private PacketInterfaceType _selectedInterfaceType;
|
||||
private SystemType _selectedSystemType;
|
||||
|
||||
private void BrowseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseForDACOutputFolder();
|
||||
}
|
||||
|
||||
private void BrowseForDACOutputFolder()
|
||||
{
|
||||
FolderBrowserDialog folderDialog = new FolderBrowserDialog();
|
||||
folderDialog.Description = "Choose a folder to store captured DAC audio.";
|
||||
folderDialog.ShowNewFolderButton = true;
|
||||
|
||||
if (folderDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
DACOutputCapturePathTextBox.Text = folderDialog.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnableDACCheckboxChanged(object sender, EventArgs e)
|
||||
{
|
||||
DACOptionsGroupBox.Enabled = Configuration.EnableAudioDAC;
|
||||
}
|
||||
|
||||
private void EnableDACCaptureCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (EnableDACCaptureCheckBox.Checked == true && String.IsNullOrWhiteSpace(DACOutputCapturePathTextBox.Text))
|
||||
{
|
||||
//
|
||||
// When enabled and no output folder is set, force the user to choose an output folder.
|
||||
//
|
||||
BrowseForDACOutputFolder();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user