1
0
mirror of https://github.com/livingcomputermuseum/ContrAlto.git synced 2026-05-04 06:59:49 +00:00

Initial implementation of Trident controller and drives (supporting T-80 and T-300 packs). TFU works and can certify, erase, exercise and manipulate files on Trident packs. TriEx doesn't quite work properly yet. Still some issues to iron out.

Added file-backed disk image implementation for use with Trident disk images, did some basic refactoring of disk load/unload logic, added support for creating new (empty) disk images for both Trident and Diablo disks.

Added UI for loading/unloading/creating up to 8 trident packs; added blank Diablo pack creation UI.  (Both Windows and *nix interfaces.)

Added configuration support for same (both Windows and *nix.)

Small correction to Print output path browsing logic.

Fixed Windows installer, now places the right ROMs for Alto I configurations in the right place.

Fixed issue when starting up with corrupted configuration.  Corrupted configuration is ignored and ContrAlto will run with default config.
This commit is contained in:
Josh Dersch
2017-08-22 13:18:31 -07:00
parent bfcce44a8f
commit 523a4bb27f
30 changed files with 2969 additions and 406 deletions

View File

@@ -17,6 +17,7 @@
using Contralto.Logging;
using System;
using System.Collections.Specialized;
using System.IO;
using System.Reflection;
@@ -114,7 +115,14 @@ namespace Contralto
// See if PCap is available.
TestPCap();
ReadConfiguration();
try
{
ReadConfiguration();
}
catch
{
Console.WriteLine("Warning: unable to load configuration. Assuming default settings.");
}
// Special case: On first startup, AlternateBoot will come back as "None" which
// is an invalid UI setting; default to Ethernet in this case.
@@ -122,6 +130,15 @@ namespace Contralto
{
AlternateBootType = AlternateBootType.Ethernet;
}
//
// If configuration specifies fewer than 8 Trident disks, we need to pad the list out to 8 with empty entries.
//
int start = TridentImages.Count;
for (int i = start; i < 8; i++)
{
TridentImages.Add(String.Empty);
}
}
/// <summary>
@@ -144,6 +161,11 @@ namespace Contralto
/// </summary>
public static string Drive1Image;
/// <summary>
/// The currently loaded images for the Trident controller.
/// </summary>
public static StringCollection TridentImages;
/// <summary>
/// The Ethernet host address for this Alto
/// </summary>
@@ -294,6 +316,7 @@ namespace Contralto
AudioDACCapturePath = Properties.Settings.Default.AudioDACCapturePath;
Drive0Image = Properties.Settings.Default.Drive0Image;
Drive1Image = Properties.Settings.Default.Drive1Image;
TridentImages = Properties.Settings.Default.TridentImages;
SystemType = (SystemType)Properties.Settings.Default.SystemType;
HostAddress = Properties.Settings.Default.HostAddress;
HostPacketInterfaceName = Properties.Settings.Default.HostPacketInterfaceName;
@@ -308,13 +331,14 @@ namespace Contralto
AudioDACCapturePath = Properties.Settings.Default.AudioDACCapturePath;
EnablePrinting = Properties.Settings.Default.EnablePrinting;
PrintOutputPath = Properties.Settings.Default.PrintOutputPath;
ReversePageOrder = Properties.Settings.Default.ReversePageOrder;
ReversePageOrder = Properties.Settings.Default.ReversePageOrder;
}
private static void WriteConfigurationWindows()
{
Properties.Settings.Default.Drive0Image = Drive0Image;
Properties.Settings.Default.Drive1Image = Drive1Image;
Properties.Settings.Default.TridentImages = TridentImages;
Properties.Settings.Default.SystemType = (int)SystemType;
Properties.Settings.Default.HostAddress = HostAddress;
Properties.Settings.Default.HostPacketInterfaceName = HostPacketInterfaceName;
@@ -478,6 +502,21 @@ namespace Contralto
field.SetValue(null, Enum.Parse(typeof(LogComponent), value, true));
}
break;
case "StringCollection":
{
// value is expected to be a comma-delimited set.
StringCollection sc = new StringCollection();
string[] strings = value.Split(',');
foreach(string s in strings)
{
sc.Add(s);
}
field.SetValue(null, sc);
}
break;
}
}
catch