1
0
mirror of https://github.com/livingcomputermuseum/Darkstar.git synced 2026-04-24 19:40:31 +00:00

Some useful improvements/changes to Darkstar

new functionality
- ethernet: new network device for direct connection to a Dodo
  NetHub (instead of going through a real network device)
- configuration-dialog: extensions for selecting and configuring
  the NetHub connection
- command-line: new optional parameter "-start" for starting the
  emulator when the UI is ready
- configuration-file: added new parameters to match the items that
  can be specified through the UI, also to autostart the system
  new entries: NetHubHost, NetHubPort, AltBootMode, Start
  (see the sample config-file in star_os_5.0.zip for all options)

changes/fixes:
- development: use of SharpDevelop with .net 4.5
- ethernet: add 2 extra zero-words to prevent packets larger
  than 56 bytes from being ignored by the ethernet microcode
- configuration-dialog: allow to specify 48 bit machine-ids
  (only 40 significant bits were accepted so far)
- display: reversed the order of the pattern lines to match the
  background pattern in the main display area
This commit is contained in:
dev hawala
2020-12-18 13:13:44 +01:00
parent 5b292b02e8
commit a109b60e94
12 changed files with 471 additions and 54 deletions

View File

@@ -48,6 +48,8 @@ namespace D.UI
public bool ThrottleSpeed;
public string HostPacketInterfaceName;
public string NetHubHost;
public ushort NetHubPort;
public bool SlowPhosphor;
public uint DisplayScale;
@@ -123,13 +125,19 @@ namespace D.UI
//
// Populate the list with the interfaces available on the machine, if any.
//
EthernetInterfaceListBox.Enabled = Configuration.HostRawEthernetInterfacesAvailable;
EthernetInterfaceListBox.Enabled = true; // Configuration.HostRawEthernetInterfacesAvailable;
EthernetInterfaceListBox.Items.Clear();
// Add the "Use no interface" option
EthernetInterfaceListBox.Items.Add(
new EthernetInterface("None", "No network adapter"));
// Add the "Use Nethub interface" option
EthernetInterfaceListBox.Items.Add(
new EthernetInterface(NethubInterface.NETHUB_NAME, "Network adapter to Dodo Nethub"));
txtNetHubHost.Text = NetHubHost;
numNetHubPort.Value = NetHubPort;
// Add all interfaces that PCAP knows about.
@@ -199,7 +207,7 @@ namespace D.UI
ulong newValue = Convert.ToUInt64(stripped, 16);
// Ensure the value is in range
if ((newValue & 0xffff0000000000) != 0)
if ((newValue & 0xffff000000000000) != 0)
{
throw new ArgumentOutOfRangeException("HostID");
}
@@ -228,6 +236,8 @@ namespace D.UI
FullScreenStretch = FullScreenStretchCheckBox.Checked;
HostPacketInterfaceName = ((EthernetInterface)EthernetInterfaceListBox.SelectedItem).Name;
NetHubHost = txtNetHubHost.Text;
NetHubPort = (ushort)numNetHubPort.Value;
if (CurrentTimeDateRadioButton.Checked)
{
@@ -252,5 +262,22 @@ namespace D.UI
TODSetMode = TODPowerUpSetMode.NoChange;
}
}
private void OnEthernetInterfaceChanged(object sender, EventArgs e)
{
EthernetInterface iface = (EthernetInterface)EthernetInterfaceListBox.SelectedItem;
bool isNetHub = (iface.Name == NethubInterface.NETHUB_NAME);
txtNetHubHost.Enabled = isNetHub;
numNetHubPort.Enabled = isNetHub;
}
private void OnNetHubHostValidating(object sender, System.ComponentModel.CancelEventArgs e)
{
if (String.IsNullOrEmpty(txtNetHubHost.Text))
{
MessageBox.Show("The NetHub host can not be empty");
txtNetHubHost.Text = "localhost";
}
}
}
}