mirror of
https://github.com/livingcomputermuseum/Darkstar.git
synced 2026-04-17 01:05:25 +00:00
Merge branch 'master' of https://github.com/livingcomputermuseum/Darkstar
This commit is contained in:
@@ -57,6 +57,9 @@ namespace D
|
||||
SlowPhosphor = true;
|
||||
HostPacketInterfaceName = String.Empty;
|
||||
|
||||
NetHubHost = "localhost";
|
||||
NetHubPort = 3333;
|
||||
|
||||
TODDateTime = new DateTime(1979, 12, 10);
|
||||
TODDate = new DateTime(1955, 11, 5);
|
||||
TODSetMode = TODPowerUpSetMode.HostTimeY2K;
|
||||
@@ -138,6 +141,16 @@ namespace D
|
||||
/// </summary>
|
||||
public static string HostPacketInterfaceName;
|
||||
|
||||
/// <summary>
|
||||
/// The host name to connect to if the network interface is NetHub
|
||||
/// </summary>
|
||||
public static string NetHubHost;
|
||||
|
||||
/// <summary>
|
||||
/// The port to connect to if the network interface is NetHub
|
||||
/// </summary>
|
||||
public static ushort NetHubPort;
|
||||
|
||||
/// <summary>
|
||||
/// Whether any packet interfaces are available on the host
|
||||
/// </summary>
|
||||
@@ -188,6 +201,16 @@ namespace D
|
||||
/// The types of logging to enable.
|
||||
/// </summary>
|
||||
public static LogType LogTypes;
|
||||
|
||||
/// <summary>
|
||||
/// The preferred Alt-Boot mode
|
||||
/// </summary>
|
||||
public static AltBootValues AltBootMode = AltBootValues.None;
|
||||
|
||||
/// <summary>
|
||||
/// Do start system when the UI is brought up?
|
||||
/// </summary>
|
||||
public static bool Start = false;
|
||||
|
||||
/// <summary>
|
||||
/// Reads the current configuration file from the appropriate place.
|
||||
@@ -213,6 +236,7 @@ namespace D
|
||||
//
|
||||
ReadConfigurationUnix();
|
||||
}
|
||||
Start |= StartupOptions.Start;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -239,7 +263,9 @@ namespace D
|
||||
HardDriveImage = Properties.Settings.Default.HardDriveImage;
|
||||
FloppyDriveImage = Properties.Settings.Default.FloppyDriveImage;
|
||||
HostID = Properties.Settings.Default.HostAddress;
|
||||
HostPacketInterfaceName = Properties.Settings.Default.HostPacketInterfaceName;
|
||||
HostPacketInterfaceName = Properties.Settings.Default.HostPacketInterfaceName;
|
||||
NetHubHost = Properties.Settings.Default.NetHubHost;
|
||||
NetHubPort = Properties.Settings.Default.NetHubPort;
|
||||
ThrottleSpeed = Properties.Settings.Default.ThrottleSpeed;
|
||||
DisplayScale = Properties.Settings.Default.DisplayScale;
|
||||
FullScreenStretch = Properties.Settings.Default.FullScreenFilter;
|
||||
@@ -255,7 +281,9 @@ namespace D
|
||||
Properties.Settings.Default.HardDriveImage = HardDriveImage;
|
||||
Properties.Settings.Default.FloppyDriveImage = FloppyDriveImage;
|
||||
Properties.Settings.Default.HostAddress = HostID;
|
||||
Properties.Settings.Default.HostPacketInterfaceName = HostPacketInterfaceName;
|
||||
Properties.Settings.Default.HostPacketInterfaceName = HostPacketInterfaceName;
|
||||
Properties.Settings.Default.NetHubHost = NetHubHost;
|
||||
Properties.Settings.Default.NetHubPort = NetHubPort;
|
||||
Properties.Settings.Default.ThrottleSpeed = ThrottleSpeed;
|
||||
Properties.Settings.Default.DisplayScale = DisplayScale;
|
||||
Properties.Settings.Default.FullScreenFilter = FullScreenStretch;
|
||||
@@ -357,7 +385,7 @@ namespace D
|
||||
|
||||
case "UInt16":
|
||||
{
|
||||
UInt16 v = Convert.ToUInt16(value, 16);
|
||||
UInt16 v = Convert.ToUInt16(value, 10);
|
||||
field.SetValue(null, v);
|
||||
}
|
||||
break;
|
||||
@@ -427,6 +455,12 @@ namespace D
|
||||
field.SetValue(null, sc);
|
||||
}
|
||||
break;
|
||||
|
||||
case "AltBootValues":
|
||||
{
|
||||
field.SetValue(null, Enum.Parse(typeof(AltBootValues), value, true));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -8,9 +8,19 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>D</RootNamespace>
|
||||
<AssemblyName>Darkstar</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<NoWin32Manifest>False</NoWin32Manifest>
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<NoStdLib>False</NoStdLib>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
<DefineConstants>TRACE ORIGINAL_CODE</DefineConstants>
|
||||
<SignAssembly>False</SignAssembly>
|
||||
<DelaySign>False</DelaySign>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -18,16 +28,14 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>PdbOnly</DebugType>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
@@ -37,22 +45,18 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Dandelion.ico</ApplicationIcon>
|
||||
@@ -122,6 +126,7 @@
|
||||
<Compile Include="Display\DisplayController.cs" />
|
||||
<Compile Include="Ethernet\HostEthernet.cs" />
|
||||
<Compile Include="Ethernet\IPacketInterface.cs" />
|
||||
<Compile Include="Ethernet\NethubInterface.cs" />
|
||||
<Compile Include="IOP\Beeper.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
|
||||
BIN
D/Disks/star_os_5.0.zip
Normal file
BIN
D/Disks/star_os_5.0.zip
Normal file
Binary file not shown.
@@ -848,8 +848,13 @@ namespace D.Ethernet
|
||||
try
|
||||
{
|
||||
|
||||
if (Configuration.HostRawEthernetInterfacesAvailable &&
|
||||
!string.IsNullOrWhiteSpace(Configuration.HostPacketInterfaceName))
|
||||
if (Configuration.HostPacketInterfaceName == NethubInterface.NETHUB_NAME)
|
||||
{
|
||||
_hostInterface = new NethubInterface();
|
||||
_hostInterface.RegisterReceiveCallback(OnHostPacketReceived);
|
||||
}
|
||||
else if (Configuration.HostRawEthernetInterfacesAvailable &&
|
||||
!string.IsNullOrWhiteSpace(Configuration.HostPacketInterfaceName))
|
||||
{
|
||||
_hostInterface = new HostEthernetEncapsulation(Configuration.HostPacketInterfaceName);
|
||||
_hostInterface.RegisterReceiveCallback(OnHostPacketReceived);
|
||||
@@ -858,7 +863,10 @@ namespace D.Ethernet
|
||||
catch (Exception e)
|
||||
{
|
||||
_hostInterface = null;
|
||||
Log.Write(LogComponent.HostEthernet, "Unable to configure network interface. Error {0}", e.Message);
|
||||
Log.Write(LogType.Error, LogComponent.HostEthernet,
|
||||
"Unable to configure network interface '{0}': Error {1}",
|
||||
Configuration.HostPacketInterfaceName,
|
||||
e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
227
D/Ethernet/NethubInterface.cs
Normal file
227
D/Ethernet/NethubInterface.cs
Normal file
@@ -0,0 +1,227 @@
|
||||
/*
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright Dr. Hans-Walter Latz 2020 and Living Computer Museum + Labs 2018
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
|
||||
namespace D.Ethernet
|
||||
{
|
||||
/// <summary>
|
||||
/// Packet interface for accessing a Dodo NetHub as network device for Darkstar.
|
||||
/// </summary>
|
||||
public class NethubInterface : IPacketInterface
|
||||
{
|
||||
|
||||
// this is the name of the NetHub network-device in the configuration dialog resp. the configuration file
|
||||
public const string NETHUB_NAME = "[[ Dodo-Nethub ]]";
|
||||
|
||||
private TcpClient _client = null;
|
||||
private NetworkStream _stream = null;
|
||||
|
||||
private ulong _localAddress;
|
||||
private ulong _broadcastAddress;
|
||||
|
||||
private ReceivePacketDelegate _receiver = null;
|
||||
private Thread _receiverThread = null;
|
||||
|
||||
private Byte[] _sendBuffer = new byte[1026]; // this assumes that there is only ONE processing thread (which is the case for DarkStar!)
|
||||
|
||||
public NethubInterface()
|
||||
{
|
||||
_client = new TcpClient(Configuration.NetHubHost, Configuration.NetHubPort);
|
||||
_stream = _client.GetStream();
|
||||
|
||||
_localAddress = Configuration.HostID;
|
||||
_broadcastAddress = 0x0000FFFFFFFFFFFF;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers a callback delegate to handle packets that are received.
|
||||
/// </summary>
|
||||
/// <param name="callback"></param>
|
||||
void IPacketInterface.RegisterReceiveCallback(ReceivePacketDelegate callback)
|
||||
{
|
||||
StopReceiverThread();
|
||||
_receiver = callback;
|
||||
_receiverThread = new Thread(PacketReceiver);
|
||||
_receiverThread.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the specified word array over the device.
|
||||
/// </summary>
|
||||
/// <param name="packet"></param>
|
||||
void IPacketInterface.Send(ushort[] packet)
|
||||
{
|
||||
NetworkStream str = _stream;
|
||||
if (str == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int byteLen = packet.Length * 2;
|
||||
|
||||
// build the NetHub transmission packet
|
||||
int src = 0;
|
||||
int dst = 0;
|
||||
|
||||
// first word is the packet length (big-endian)
|
||||
_sendBuffer[dst++] = (byte)((byteLen >> 8) & 0xFF);
|
||||
_sendBuffer[dst++] = (byte)(byteLen & 0xFF);
|
||||
|
||||
// then of course the packet itself
|
||||
int limit = Math.Min( byteLen + 2 , _sendBuffer.Length );
|
||||
while (dst < limit)
|
||||
{
|
||||
ushort w = packet[src++];
|
||||
_sendBuffer[dst++] = (byte)((w >> 8) & 0xFF);
|
||||
_sendBuffer[dst++] = (byte)(w & 0xFF);
|
||||
}
|
||||
|
||||
// transmit it
|
||||
try
|
||||
{
|
||||
str.Write(_sendBuffer, 0, dst);
|
||||
str.Flush();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shuts down the encapsulation provider.
|
||||
/// </summary>
|
||||
void IPacketInterface.Shutdown()
|
||||
{
|
||||
if (_stream != null) { _stream.Close(); }
|
||||
if (_client != null) { _client.Close(); }
|
||||
StopReceiverThread();
|
||||
_receiver = null;
|
||||
}
|
||||
|
||||
private void StopReceiverThread()
|
||||
{
|
||||
if (_receiverThread != null)
|
||||
{
|
||||
_receiverThread.Interrupt();
|
||||
_receiverThread.Join();
|
||||
_receiverThread = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void PacketReceiver()
|
||||
{
|
||||
Byte[] data = new Byte[1024];
|
||||
try
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
NetworkStream str = _stream;
|
||||
if (str == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// wait for next packet from the nethub
|
||||
int byteLen = GetLenPrefix(str);
|
||||
|
||||
// read the packet content up to the buffer size
|
||||
int pos = 0;
|
||||
while(pos < byteLen && pos < data.Length)
|
||||
{
|
||||
data[pos++] = GetByte(str);
|
||||
}
|
||||
|
||||
// swallow the exceeding bytes in the packet
|
||||
while(pos < byteLen)
|
||||
{
|
||||
pos++;
|
||||
GetByte(str);
|
||||
}
|
||||
|
||||
// check if it is for us (to reduce traffic on this machine), also get sending machine for logging
|
||||
ulong dstAddress = ReadAddress(data, 0);
|
||||
ulong srcAddress = ReadAddress(data, 6);
|
||||
if (dstAddress == _localAddress || dstAddress == _broadcastAddress)
|
||||
{
|
||||
// pass it the the ethernet controller
|
||||
ReceivePacketDelegate rcvr = _receiver;
|
||||
if (rcvr != null)
|
||||
{
|
||||
rcvr(new MemoryStream(data, 0, byteLen));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(ThreadInterruptedException)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
private int GetLenPrefix(NetworkStream str)
|
||||
{
|
||||
int b1 = GetByte(str) & 0xFF;
|
||||
int b2 = GetByte(str) & 0xFF;
|
||||
return (b1 << 8) | b2;
|
||||
}
|
||||
|
||||
private byte GetByte(NetworkStream str)
|
||||
{
|
||||
int value = -1;
|
||||
try
|
||||
{
|
||||
value = str.ReadByte();
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
if (value < 0)
|
||||
{
|
||||
throw new ThreadInterruptedException();
|
||||
}
|
||||
return (byte)value;
|
||||
}
|
||||
|
||||
private ulong ReadAddress(byte[] data, int at)
|
||||
{
|
||||
ulong addr = 0;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
addr <<= 8;
|
||||
addr |= (ulong)(data[at++] & 0xFF);
|
||||
}
|
||||
return addr;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,8 @@ namespace D
|
||||
public static string ConfigurationFile;
|
||||
|
||||
public static string RomPath;
|
||||
|
||||
public static bool Start = false;
|
||||
|
||||
}
|
||||
public class Program
|
||||
@@ -77,6 +79,10 @@ namespace D
|
||||
}
|
||||
break;
|
||||
|
||||
case "-start":
|
||||
StartupOptions.Start = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
PrintUsage();
|
||||
return;
|
||||
@@ -122,7 +128,7 @@ namespace D
|
||||
|
||||
private static void PrintUsage()
|
||||
{
|
||||
Console.WriteLine("Usage: Darkstar [-config <configurationFile>] [-rompath <path>]");
|
||||
Console.WriteLine("Usage: Darkstar [-config <configurationFile>] [-rompath <path>] [-start]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/*
|
||||
using System;
|
||||
|
||||
/*
|
||||
BSD 2-Clause License
|
||||
|
||||
Copyright Vulcan Inc. 2017-2018 and Living Computer Museum + Labs 2018
|
||||
@@ -24,33 +26,27 @@
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
using System.Reflection;
|
||||
*/using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Darkstar")]
|
||||
[assembly: AssemblyDescription("A Xerox Star/1108 Emulator")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Living Computers: Museum+Labs")]
|
||||
[assembly: AssemblyProduct("Darkstar")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017-2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: AssemblyTitle ("Darkstar")]
|
||||
[assembly: AssemblyDescription ("A Xerox Star/1108 Emulator")]
|
||||
[assembly: AssemblyConfiguration ("")]
|
||||
[assembly: AssemblyCompany ("Living Computers: Museum+Labs")]
|
||||
[assembly: AssemblyProduct ("Darkstar")]
|
||||
[assembly: AssemblyCopyright ("Copyright © 2017-2019")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: ComVisible (false)]
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0590465e-1d91-4591-946e-ee3f7d82834b")]
|
||||
|
||||
[assembly: Guid ("0590465e-1d91-4591-946e-ee3f7d82834b")]
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
@@ -61,5 +57,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.1.0.0")]
|
||||
[assembly: AssemblyVersion ("1.1.9.0")]
|
||||
[assembly: AssemblyFileVersion ("1.1.9.0")]
|
||||
|
||||
28
D/Properties/Settings.Designer.cs
generated
28
D/Properties/Settings.Designer.cs
generated
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
// Runtime Version:4.0.30319.17929
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -12,7 +12,7 @@ namespace D.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -166,5 +166,29 @@ namespace D.Properties {
|
||||
this["FullScreenFilter"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("localhost")]
|
||||
public string NetHubHost {
|
||||
get {
|
||||
return ((string)(this["NetHubHost"]));
|
||||
}
|
||||
set {
|
||||
this["NetHubHost"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("3333")]
|
||||
public ushort NetHubPort {
|
||||
get {
|
||||
return ((ushort)(this["NetHubPort"]));
|
||||
}
|
||||
set {
|
||||
this["NetHubPort"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
83
D/UI/ConfigurationDialog.Designer.cs
generated
83
D/UI/ConfigurationDialog.Designer.cs
generated
@@ -68,6 +68,7 @@ namespace D.UI
|
||||
this.EthernetInterfaceListBox = new System.Windows.Forms.ListBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.DisplayTab = new System.Windows.Forms.TabPage();
|
||||
this.FullScreenStretchCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.DisplayScaleComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.SlowPhosphorCheckBox = new System.Windows.Forms.CheckBox();
|
||||
@@ -82,12 +83,16 @@ namespace D.UI
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.Cancel_Button = new System.Windows.Forms.Button();
|
||||
this.FullScreenStretchCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.lblNetHubHost = new System.Windows.Forms.Label();
|
||||
this.txtNetHubHost = new System.Windows.Forms.TextBox();
|
||||
this.numNetHubPort = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblNetHubPort = new System.Windows.Forms.Label();
|
||||
this.TabControl.SuspendLayout();
|
||||
this.SystemPage.SuspendLayout();
|
||||
this.EthernetTab.SuspendLayout();
|
||||
this.DisplayTab.SuspendLayout();
|
||||
this.TimeTabPage.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numNetHubPort)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TabControl
|
||||
@@ -171,6 +176,10 @@ namespace D.UI
|
||||
//
|
||||
// EthernetTab
|
||||
//
|
||||
this.EthernetTab.Controls.Add(this.lblNetHubPort);
|
||||
this.EthernetTab.Controls.Add(this.numNetHubPort);
|
||||
this.EthernetTab.Controls.Add(this.txtNetHubHost);
|
||||
this.EthernetTab.Controls.Add(this.lblNetHubHost);
|
||||
this.EthernetTab.Controls.Add(this.EthernetInterfaceListBox);
|
||||
this.EthernetTab.Controls.Add(this.label5);
|
||||
this.EthernetTab.Location = new System.Drawing.Point(4, 22);
|
||||
@@ -186,8 +195,9 @@ namespace D.UI
|
||||
this.EthernetInterfaceListBox.FormattingEnabled = true;
|
||||
this.EthernetInterfaceListBox.Location = new System.Drawing.Point(10, 24);
|
||||
this.EthernetInterfaceListBox.Name = "EthernetInterfaceListBox";
|
||||
this.EthernetInterfaceListBox.Size = new System.Drawing.Size(332, 134);
|
||||
this.EthernetInterfaceListBox.Size = new System.Drawing.Size(332, 121);
|
||||
this.EthernetInterfaceListBox.TabIndex = 1;
|
||||
this.EthernetInterfaceListBox.SelectedValueChanged += new System.EventHandler(this.OnEthernetInterfaceChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
@@ -212,6 +222,16 @@ namespace D.UI
|
||||
this.DisplayTab.Text = "Display";
|
||||
this.DisplayTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FullScreenStretchCheckBox
|
||||
//
|
||||
this.FullScreenStretchCheckBox.AutoSize = true;
|
||||
this.FullScreenStretchCheckBox.Location = new System.Drawing.Point(6, 55);
|
||||
this.FullScreenStretchCheckBox.Name = "FullScreenStretchCheckBox";
|
||||
this.FullScreenStretchCheckBox.Size = new System.Drawing.Size(186, 17);
|
||||
this.FullScreenStretchCheckBox.TabIndex = 3;
|
||||
this.FullScreenStretchCheckBox.Text = "Stretch screen in Fullscreen mode";
|
||||
this.FullScreenStretchCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// DisplayScaleComboBox
|
||||
//
|
||||
this.DisplayScaleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
@@ -367,15 +387,53 @@ namespace D.UI
|
||||
this.Cancel_Button.Text = "Cancel";
|
||||
this.Cancel_Button.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FullScreenFilterCheckBox
|
||||
// lblNetHubHost
|
||||
//
|
||||
this.FullScreenStretchCheckBox.AutoSize = true;
|
||||
this.FullScreenStretchCheckBox.Location = new System.Drawing.Point(6, 55);
|
||||
this.FullScreenStretchCheckBox.Name = "FullScreenFilterCheckBox";
|
||||
this.FullScreenStretchCheckBox.Size = new System.Drawing.Size(186, 17);
|
||||
this.FullScreenStretchCheckBox.TabIndex = 3;
|
||||
this.FullScreenStretchCheckBox.Text = "Stretch screen in Fullscreen mode";
|
||||
this.FullScreenStretchCheckBox.UseVisualStyleBackColor = true;
|
||||
this.lblNetHubHost.AutoSize = true;
|
||||
this.lblNetHubHost.Location = new System.Drawing.Point(10, 150);
|
||||
this.lblNetHubHost.Name = "lblNetHubHost";
|
||||
this.lblNetHubHost.Size = new System.Drawing.Size(72, 13);
|
||||
this.lblNetHubHost.TabIndex = 2;
|
||||
this.lblNetHubHost.Text = "NetHub Host:";
|
||||
//
|
||||
// txtNetHubHost
|
||||
//
|
||||
this.txtNetHubHost.Location = new System.Drawing.Point(81, 147);
|
||||
this.txtNetHubHost.Name = "txtNetHubHost";
|
||||
this.txtNetHubHost.Size = new System.Drawing.Size(166, 20);
|
||||
this.txtNetHubHost.TabIndex = 3;
|
||||
this.txtNetHubHost.Validating += new System.ComponentModel.CancelEventHandler(this.OnNetHubHostValidating);
|
||||
//
|
||||
// numNetHubPort
|
||||
//
|
||||
this.numNetHubPort.Location = new System.Drawing.Point(282, 146);
|
||||
this.numNetHubPort.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numNetHubPort.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numNetHubPort.Name = "numNetHubPort";
|
||||
this.numNetHubPort.Size = new System.Drawing.Size(60, 20);
|
||||
this.numNetHubPort.TabIndex = 4;
|
||||
this.numNetHubPort.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// lblNetHubPort
|
||||
//
|
||||
this.lblNetHubPort.AutoSize = true;
|
||||
this.lblNetHubPort.Location = new System.Drawing.Point(253, 149);
|
||||
this.lblNetHubPort.Name = "lblNetHubPort";
|
||||
this.lblNetHubPort.Size = new System.Drawing.Size(29, 13);
|
||||
this.lblNetHubPort.TabIndex = 5;
|
||||
this.lblNetHubPort.Text = "Port:";
|
||||
//
|
||||
// ConfigurationDialog
|
||||
//
|
||||
@@ -404,6 +462,7 @@ namespace D.UI
|
||||
this.DisplayTab.PerformLayout();
|
||||
this.TimeTabPage.ResumeLayout(false);
|
||||
this.TimeTabPage.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numNetHubPort)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -436,5 +495,9 @@ namespace D.UI
|
||||
private System.Windows.Forms.DateTimePicker TODDatePicker;
|
||||
private System.Windows.Forms.RadioButton SpecifiedDateRadioButton;
|
||||
private System.Windows.Forms.CheckBox FullScreenStretchCheckBox;
|
||||
private System.Windows.Forms.Label lblNetHubPort;
|
||||
private System.Windows.Forms.NumericUpDown numNetHubPort;
|
||||
private System.Windows.Forms.TextBox txtNetHubHost;
|
||||
private System.Windows.Forms.Label lblNetHubHost;
|
||||
}
|
||||
}
|
||||
@@ -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,18 @@ namespace D.UI
|
||||
//
|
||||
// Populate the list with the interfaces available on the machine, if any.
|
||||
//
|
||||
EthernetInterfaceListBox.Enabled = 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 +206,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 +235,8 @@ namespace D.UI
|
||||
FullScreenStretch = FullScreenStretchCheckBox.Checked;
|
||||
|
||||
HostPacketInterfaceName = ((EthernetInterface)EthernetInterfaceListBox.SelectedItem).Name;
|
||||
NetHubHost = txtNetHubHost.Text;
|
||||
NetHubPort = (ushort)numNetHubPort.Value;
|
||||
|
||||
if (CurrentTimeDateRadioButton.Checked)
|
||||
{
|
||||
@@ -252,5 +261,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 cannot be empty");
|
||||
txtNetHubHost.Text = "localhost";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,21 @@ namespace D.UI
|
||||
UpdateFloppyDriveLabel();
|
||||
UpdateMouseState();
|
||||
}
|
||||
|
||||
private bool firstShown = true;
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
base.OnShown(e);
|
||||
if (firstShown) {
|
||||
firstShown = false;
|
||||
if (Configuration.Start && !_system.IsExecuting)
|
||||
{
|
||||
SystemExecutionContext context = new SystemExecutionContext(null, null, null, OnExecutionError);
|
||||
_system.StartExecution(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// UI Event handlers:
|
||||
@@ -305,6 +320,8 @@ namespace D.UI
|
||||
configDialog.MemorySize = Configuration.MemorySize;
|
||||
configDialog.HostID = Configuration.HostID;
|
||||
configDialog.HostPacketInterfaceName = Configuration.HostPacketInterfaceName;
|
||||
configDialog.NetHubHost = Configuration.NetHubHost;
|
||||
configDialog.NetHubPort = Configuration.NetHubPort;
|
||||
configDialog.ThrottleSpeed = Configuration.ThrottleSpeed;
|
||||
configDialog.DisplayScale = Configuration.DisplayScale;
|
||||
configDialog.FullScreenStretch = Configuration.FullScreenStretch;
|
||||
@@ -331,9 +348,13 @@ namespace D.UI
|
||||
((IOPMemoryBus)_system.IOP.Memory).UpdateHostIDProm();
|
||||
}
|
||||
|
||||
if (configDialog.HostPacketInterfaceName != Configuration.HostPacketInterfaceName)
|
||||
if (configDialog.HostPacketInterfaceName != Configuration.HostPacketInterfaceName
|
||||
|| configDialog.NetHubHost != Configuration.NetHubHost
|
||||
|| configDialog.NetHubPort != Configuration.NetHubPort)
|
||||
{
|
||||
Configuration.HostPacketInterfaceName = configDialog.HostPacketInterfaceName;
|
||||
Configuration.NetHubHost = configDialog.NetHubHost;
|
||||
Configuration.NetHubPort = configDialog.NetHubPort;
|
||||
_system.EthernetController.HostInterfaceChanged();
|
||||
}
|
||||
|
||||
@@ -443,7 +464,7 @@ namespace D.UI
|
||||
|
||||
private void OnFrameTimerTick(object sender, EventArgs e)
|
||||
{
|
||||
FPSStatusLabel.Text = String.Format("{0} Fields/Sec ({1}%)",
|
||||
FPSStatusLabel.Text = String.Format("{0:d3} Fields/Sec ({1:d3}%)",
|
||||
_frameCount,
|
||||
(int)((_frameCount / 77.4) * 100.0));
|
||||
|
||||
@@ -529,6 +550,7 @@ namespace D.UI
|
||||
|
||||
private void PopulateAltBoot()
|
||||
{
|
||||
_system.IOP.MiscIO.AltBoot = Configuration.AltBootMode;
|
||||
for (AltBootValues v = AltBootValues.None; v < AltBootValues.HeadCleaning; v++)
|
||||
{
|
||||
ToolStripMenuItem item = new ToolStripMenuItem(v.ToString());
|
||||
|
||||
139
D/readme.txt
139
D/readme.txt
@@ -1,4 +1,4 @@
|
||||
Readme.txt for Darkstar v1.1:
|
||||
Readme.txt for Darkstar v1.1.9.0:
|
||||
|
||||
1. Introduction and Overview
|
||||
============================
|
||||
@@ -57,7 +57,17 @@ use.
|
||||
|
||||
If you wish to make use of the emulated Star's Ethernet interface, you
|
||||
will need to have WinPCAP installed (on Windows) or libpcap (on the Unix of
|
||||
your choice). WinPCAP can be downloaded from http://www.winpcap.org/.
|
||||
your choice). WinPCAP can be downloaded from http://www.winpcap.org/.
|
||||
Using the Ethernet interface allows to access services on the network through
|
||||
the protocols supported by the guest operating system running in Darkstar. These
|
||||
can be TCP/IP based services like an FTP server or XNS (Xerox Network System)
|
||||
services. Real Xerox XNS server installations are rather seldom today, so
|
||||
using an XNS emulation like Dodo (see https://github.com/devhawala/dodo for
|
||||
setup and configuration details) may be an alternative for building up a virtual
|
||||
Xerox machines network.
|
||||
If only Dodo emulated XNS services are to be accessed from Darkstar, a direct
|
||||
connection to the Dodo NetHub can be configured instead of using a pcap device
|
||||
for accessing a real network.
|
||||
|
||||
|
||||
3.0 Getting Started
|
||||
@@ -394,8 +404,13 @@ The System Configuration tab provides configuration for three options:
|
||||
--------------------------
|
||||
|
||||
The Ethernet Configuration tab allows the selection of the host network interface
|
||||
to use with Darkstar. If WinPcap or libpcap is unavailable, no interfaces will
|
||||
be listed.
|
||||
to use with Darkstar. The listbox for the available interfaces contains at least
|
||||
the entries "None" (for no ethernet adapter) and "[[ Dodo-Nethub ]]" (for a direct
|
||||
connection to a Dodo NetHub). If WinPcap or libpcap is available, further network
|
||||
interfaces will be listed.
|
||||
|
||||
If the "[[ Dodo-Nethub ]]" entry is selected, the 2 input fields for the NetHub
|
||||
Host and Port will be activated for specifying the destination NetHub.
|
||||
|
||||
|
||||
4.3 Display Configuration
|
||||
@@ -465,16 +480,103 @@ The "?" or "help" command at the Console window will give you a brief
|
||||
synopsis of the various commands at your disposal.
|
||||
|
||||
|
||||
6.0 Known Issues
|
||||
6.0 Running from the command line
|
||||
=================================
|
||||
|
||||
The Darkstar program accepts the following optional command line parameters:
|
||||
|
||||
-config <configurationFile>
|
||||
specify the configuration file (see below) defining the presets
|
||||
for the configuration to be used (these presets can be overriden
|
||||
using the configuration dialog)
|
||||
|
||||
-rompath <path>
|
||||
specify the path where the ROM files are located
|
||||
|
||||
-start
|
||||
start the emulator when the UI is ready, this requires that the
|
||||
disk image to be used is defined (either through the configuration
|
||||
file or by the Windows defaults)
|
||||
|
||||
(on the Windows platform, these parameters can be given either on the
|
||||
command line prompt or can be included in the program invocation line
|
||||
specified for a reference icon)
|
||||
|
||||
Using configuration files simplifies using several Star machines, each
|
||||
consisting of a hard disk image file with the required presettings,
|
||||
each defined by a specific machine configuration file.
|
||||
|
||||
The configuration file is a text file with "parameter = value" lines
|
||||
for setting configuration values; empty lines and lines starting with
|
||||
a hash character are ignored.
|
||||
|
||||
The following configuration parameters can be given, matching the
|
||||
corresponding entries in the configuration dialog or the system menu:
|
||||
|
||||
- MemorySize = nnn
|
||||
system memory size, in KWords as decimal value.
|
||||
|
||||
- HardDriveImage = filename
|
||||
filename for the hard disk image to load
|
||||
|
||||
- FloppyDriveImage = filename
|
||||
filename for the floppy disk image to load
|
||||
|
||||
- HostID = 12-hex-digits
|
||||
the Ethernet host address for this machine, given as hexadecimal
|
||||
number for the 48 bit machine id
|
||||
|
||||
- HostPacketInterfaceName = device
|
||||
the name of the Ethernet adaptor on the emulator host to use for
|
||||
Ethernet emulation, one of: "None", "[[ Dodo-Nethub ]]" or any
|
||||
network adapter listed in the configuration dialog (as recognized
|
||||
by WinPcap or libpcap if present)
|
||||
|
||||
- ThrottleSpeed = boolean
|
||||
whether to cap execution speed at native execution speed or not
|
||||
|
||||
- DisplayScale = n
|
||||
scale factor to apply to the display
|
||||
|
||||
- FullScreenStretch = boolean
|
||||
whether to apply linear or nearest-neighbor filtering to the display,
|
||||
when scaled
|
||||
|
||||
- SlowPhosphor = boolean
|
||||
whether to apply a fake "slow phosphor" persistence to the emulated
|
||||
display
|
||||
|
||||
- TODSetMode = mode
|
||||
how to set the TOD clock at power up/reset, one of:
|
||||
HostTimeY2K, HostTime, SpecificDateAndTime, SpecificDate, NoChange
|
||||
|
||||
- TODDateTime = iso-datetime
|
||||
the specific date/time to set the TOD clock to if TODSetMode is
|
||||
"SpecificDateAndTime"
|
||||
|
||||
- TODDate = iso-date
|
||||
the specific date to set the TOD clock to if TODSetMode is "SpecificDate"
|
||||
|
||||
- AltBootMode = mode
|
||||
the preferred Alt-Boot mode for starting the machine, one of:
|
||||
None, DiagnosticRigid, Rigid, Floppy, Ethernet, DiagnosticEthernet,
|
||||
DiagnosticFloppy, AlternateEthernet, DiagnosticTrident1, DiagnosticTrident2,
|
||||
DiagnosticTrident3, HeadCleaning
|
||||
|
||||
- Start = boolean
|
||||
start the system when the UI is ready? (default: false)
|
||||
|
||||
|
||||
7.0 Known Issues
|
||||
================
|
||||
|
||||
- Speed throttling is not implemented on Unix platforms.
|
||||
- SDL is forced to software-rendering mode on Unix platformst
|
||||
- SDL is forced to software-rendering mode on Unix platforms
|
||||
due to an odd bug that has yet to be solved. Performance may suffer as a
|
||||
result.
|
||||
|
||||
|
||||
7.0 Reporting Bugs
|
||||
8.0 Reporting Bugs
|
||||
==================
|
||||
|
||||
If you believe you have found a new issue (or have a feature request) please
|
||||
@@ -491,7 +593,7 @@ The more detailed the bug report, the more possible it is for me to track down
|
||||
the cause.
|
||||
|
||||
|
||||
8.0 Source Code
|
||||
9.0 Source Code
|
||||
===============
|
||||
|
||||
The complete source code is available under the BSD license on GitHub at:
|
||||
@@ -501,8 +603,8 @@ https://github.com/livingcomputermuseum/Darkstar
|
||||
Contributions are welcome!
|
||||
|
||||
|
||||
9.0 Hard Disk Image Format
|
||||
==========================
|
||||
10.0 Hard Disk Image Format
|
||||
===========================
|
||||
|
||||
The Star's hard drive controller is implemented in microcode and controls the
|
||||
drive at a very low level, so the hard drive image format is not simply a dump
|
||||
@@ -546,8 +648,8 @@ extract data, parse each track, looking for the address marks and CRCs to
|
||||
delineate the actual data.
|
||||
|
||||
|
||||
10.0 Thanks and Acknowledgements
|
||||
===============================
|
||||
11.0 Thanks and Acknowledgements
|
||||
================================
|
||||
|
||||
Darkstar would not have been possible without the amazing preservation work of
|
||||
Bitsavers.org
|
||||
@@ -560,10 +662,21 @@ https://www.libsdl.org/ and is accessed using the SDL2-CS wrapper, see:
|
||||
https://github.com/flibitijibibo/SDL2-CS.
|
||||
|
||||
|
||||
11.0 Change History
|
||||
12.0 Change History
|
||||
===================
|
||||
|
||||
v1.1.9.0
|
||||
--------
|
||||
- new network device for direct connection to a Dodo NetHub
|
||||
- new optional command line parameter "-start" (start system when the UI is up)
|
||||
- new parameters in configuration-file to match relevant UI items
|
||||
- fix to Ethernet device for receiving packets larger than 56 bytes
|
||||
- fix to configuration-dialog to permit 48 significant bits for Host ID
|
||||
- fix to display for border pattern lines
|
||||
- added StarOS 5.0 disk image (including configuration file) to Disks subdirectory
|
||||
|
||||
v1.1.0.0
|
||||
--------
|
||||
- Floppies can now be formatted and written.
|
||||
- Tweak to "No change" time configuration option (sets Power Loss flag.)
|
||||
- Added full screen display mode
|
||||
|
||||
341
README.md
341
README.md
@@ -1,4 +1,4 @@
|
||||
Readme.txt for Darkstar v1.1:
|
||||
Readme.txt for Darkstar v1.1.9.0:
|
||||
|
||||
|
||||
1.0 Introduction and Overview
|
||||
@@ -23,14 +23,14 @@ Darkstar currently emulates the following Star hardware:
|
||||
- 8 inch floppy drive
|
||||
- 10mbit Ethernet
|
||||
- Real-time clock
|
||||
- Keyboard beeper
|
||||
|
||||
1.2 What's Not
|
||||
--------------
|
||||
|
||||
At this time, the below are not emulated by Darkstar:
|
||||
- Sound
|
||||
- Serial ports
|
||||
- The LSEP printer interface
|
||||
- Serial ports
|
||||
- The LSEP printer interface
|
||||
|
||||
2.0 Requirements
|
||||
================
|
||||
@@ -58,7 +58,17 @@ use.
|
||||
|
||||
If you wish to make use of the emulated Star's Ethernet interface, you
|
||||
will need to have WinPCAP installed (on Windows) or libpcap (on the Unix of
|
||||
your choice). WinPCAP can be downloaded from http://www.winpcap.org/.
|
||||
your choice). WinPCAP can be downloaded from http://www.winpcap.org/.
|
||||
Using the Ethernet interface allows to access services on the network through
|
||||
the protocols supported by the guest operating system running in Darkstar. These
|
||||
can be TCP/IP based services like an FTP server or XNS (Xerox Network System)
|
||||
services. Real Xerox XNS server installations are rather seldom today, so
|
||||
using an XNS emulation like Dodo (see https://github.com/devhawala/dodo for
|
||||
setup and configuration details) may be an alternative for building up a virtual
|
||||
Xerox machines network.
|
||||
If only Dodo emulated XNS services are to be accessed from Darkstar, a direct
|
||||
connection to the Dodo NetHub can be configured instead of using a pcap device
|
||||
for accessing a real network.
|
||||
|
||||
|
||||
3.0 Getting Started
|
||||
@@ -133,8 +143,7 @@ Alternate Boot - Allows selection of an alternate boot device. On a real Star,
|
||||
this is accomplished by holding down the Alt Boot button during
|
||||
power-up until the appropriate code appears in the MP display.
|
||||
Selecting a device in this menu will simulate holding the Alt Boot
|
||||
button as appropriate to select the boot device.
|
||||
|
||||
button as appropriate to select the boot device.
|
||||
In general you won't need to change this unless you are installing or
|
||||
performing maintenance on an operating system. However: Selecting
|
||||
"Rigid" rather than the default ("DiagnosticRigid") can save time
|
||||
@@ -151,7 +160,7 @@ Hard Disk - Allows loading or creating new hard disk images, which typically
|
||||
have a ".IMG" file extension. If an image is currently loaded, its
|
||||
name will be displayed in the space at the bottom of the submenu;
|
||||
hovering over this space will show the full path to the image.
|
||||
See Section 9.0 for information on the image format.
|
||||
See Section 10.0 for information on the image format.
|
||||
|
||||
Configuration - Invokes the Configuration dialog. See Section 4.0 for more
|
||||
details on configuration options.
|
||||
@@ -174,32 +183,32 @@ The Star's keyboard has many keys that are not present on a standard PC
|
||||
keyboard. Darkstar maps F1-F12, the arrow keys, and the home/end/pgup/pgdown
|
||||
keys to these special keys, as below:
|
||||
|
||||
Star Key PC Key
|
||||
----------------------
|
||||
Again F1
|
||||
Delete F2
|
||||
Find F3
|
||||
Copy F4
|
||||
Same F5
|
||||
Move F6
|
||||
Open F7 or Left Control
|
||||
Props F8 or Right Control
|
||||
Center F9
|
||||
Bold F10
|
||||
Italics F11
|
||||
Underline F12
|
||||
Superscript Print Screen
|
||||
Subscript Scroll Lock
|
||||
Larger/Smaller Pause
|
||||
Defaults Num Lock
|
||||
Skip/Next Home
|
||||
Undo Page Up
|
||||
Defn/Expand End
|
||||
Stop Page Down
|
||||
Help Up Arrow
|
||||
Margins Left Arrow
|
||||
Font Backslash
|
||||
Keyboard Down
|
||||
Star Key|PC Key
|
||||
--------|------
|
||||
Again|F1
|
||||
Delete|F2
|
||||
Find|F3
|
||||
Copy|F4
|
||||
Same|F5
|
||||
Move|F6
|
||||
Open|F7 or Left Control
|
||||
Props|F8 or Right Control
|
||||
Center|F9
|
||||
Bold|F10
|
||||
Italics|F11
|
||||
Underline|F12
|
||||
Superscript|Print Screen
|
||||
Subscript|Scroll Lock
|
||||
Larger/Smaller|Pause
|
||||
Defaults|Num Lock
|
||||
Skip/Next|Home
|
||||
Undo|Page Up
|
||||
Defn/Expand|End
|
||||
Stop|Page Down
|
||||
Help|Up Arrow
|
||||
Margins|Left Arrow
|
||||
Font|Backslash
|
||||
Keyboard|Down
|
||||
|
||||
|
||||
3.3 Software
|
||||
@@ -268,89 +277,89 @@ floppy disk.
|
||||
When starting the installation of a new operating system from scratch, there
|
||||
are a few steps that are not well documented and which are fairly unintuitive:
|
||||
|
||||
1) In general it is useful to have the time and date set in the Star's TOD
|
||||
clock before booting. Many Star operating systems and installers
|
||||
*really* want to know what time it is, and they don't trust you to type
|
||||
it in. If the TOD has an invalid time / date it will attempt to get it
|
||||
from the network and in many cases will not proceed until the network
|
||||
responds. Unless you have an XNS timeserver running on your network
|
||||
(you probably do not), use the Configuration dialog to set the time
|
||||
before booting (See section 4.0).
|
||||
1) In general it is useful to have the time and date set in the Star's TOD
|
||||
clock before booting. Many Star operating systems and installers
|
||||
*really* want to know what time it is, and they don't trust you to type
|
||||
it in. If the TOD has an invalid time / date it will attempt to get it
|
||||
from the network and in many cases will not proceed until the network
|
||||
responds. Unless you have an XNS timeserver running on your network
|
||||
(you probably do not), use the Configuration dialog to set the time
|
||||
before booting (See section 4.0).
|
||||
|
||||
2) If you are starting with a new unformatted hard disk the installer will
|
||||
hang waiting for the disk microcode to read the disk, usually after
|
||||
printing the initial banner ("Installer Version X.Y of DD-MMM-YY
|
||||
HH:MM:SS, etc."). It will sit here indefinitely.
|
||||
2) If you are starting with a new unformatted hard disk the installer will
|
||||
hang waiting for the disk microcode to read the disk, usually after
|
||||
printing the initial banner ("Installer Version X.Y of DD-MMM-YY
|
||||
HH:MM:SS, etc."). It will sit here indefinitely.
|
||||
|
||||
To get past this, you will need to boot the Diagnostic floppy (usually
|
||||
provided with each set of installation floppies) and use the diagnostics
|
||||
to format the disk. This is still more complicated than it should be
|
||||
due to the way the disk microcode interacts with an unformatted disk.
|
||||
After booting the diagnostic floppy you will be prompted to enter
|
||||
timezone and time / date information.
|
||||
To get past this, you will need to boot the Diagnostic floppy (usually
|
||||
provided with each set of installation floppies) and use the diagnostics
|
||||
to format the disk. This is still more complicated than it should be
|
||||
due to the way the disk microcode interacts with an unformatted disk.
|
||||
After booting the diagnostic floppy you will be prompted to enter
|
||||
timezone and time / date information.
|
||||
|
||||
After entering this information, the diagnostic will print something
|
||||
similar to:
|
||||
XX Megabyte Storage Diagnostic Program 8.0 of 11-Mar-88 11:16:45 PST
|
||||
>Fault Analysis
|
||||
After entering this information, the diagnostic will print something
|
||||
similar to:
|
||||
`XX Megabyte Storage Diagnostic Program 8.0 of 11-Mar-88 11:16:45 PST`
|
||||
`>Fault Analysis`
|
||||
|
||||
And then it will pause for 30-45 seconds and fail with:
|
||||
Fatal error: Microcode.
|
||||
|
||||
After which the system halts and will not respond to input.
|
||||
And then it will pause for 30-45 seconds and fail with:
|
||||
`Fatal error: Microcode.`
|
||||
|
||||
After which the system halts and will not respond to input.
|
||||
|
||||
This is because the Fault Analysis step is expecting a formatted disk
|
||||
and your disk is not yet formatted. The disk microcode is unable to
|
||||
cope and goes off into the weeds.
|
||||
This is because the Fault Analysis step is expecting a formatted disk
|
||||
and your disk is not yet formatted. The disk microcode is unable to
|
||||
cope and goes off into the weeds.
|
||||
|
||||
To work around this, when the ">Fault Analysis" line appears during
|
||||
boot, hit the "Stop" key on the Star's keyboard (this is mapped to
|
||||
"Page Down.") The diagnostic will print:
|
||||
<STOP> key acknowledged
|
||||
Command stopped
|
||||
|
||||
And leave you at the ">" prompt. Now you can format your disk!
|
||||
To work around this, when the `>Fault Analysis` line appears during
|
||||
boot, hit the "Stop" key on the Star's keyboard (this is mapped to
|
||||
"Page Down.") The diagnostic will print:
|
||||
`<STOP> key acknowledged`
|
||||
Command stopped
|
||||
|
||||
And leave you at the ">" prompt. Now you can format your disk!
|
||||
|
||||
Or can you? Typing a "?" will give you a list of available commands
|
||||
but there's nothing related to disk formatting in that list!
|
||||
Or can you? Typing a "?" will give you a list of available commands
|
||||
but there's nothing related to disk formatting in that list!
|
||||
|
||||
Xerox didn't want the average person to be able to format disks so this
|
||||
functionality is hidden by default. To enable it, you use the Logon
|
||||
command -- Type "Logon" and hit return, and it will ask you for a user
|
||||
name. Use "Xerox" and then provide the password "wizard" (or "elf",
|
||||
depending on your stature.) Your privileges will be upgraded and now
|
||||
"?" will reveal a host of fun commands! The "Format" command is what
|
||||
you want, and is mostly self-explanatory. Do *not* save the bad page
|
||||
table (as there isn't one, and the microcode will hang trying to read
|
||||
it.) Formatting will take several minutes after which you will be
|
||||
asked if you want to recreate the bad page table (say "yes."). You
|
||||
will given the option to do a media scan (you can if you want, but
|
||||
emulated disks have no bad spots so there isn't much point.)
|
||||
Xerox didn't want the average person to be able to format disks so this
|
||||
functionality is hidden by default. To enable it, you use the Logon
|
||||
command -- Type "Logon" and hit return, and it will ask you for a user
|
||||
name. Use "Xerox" and then provide the password "wizard" (or "elf",
|
||||
depending on your stature.) Your privileges will be upgraded and now
|
||||
"?" will reveal a host of fun commands! The "Format" command is what
|
||||
you want, and is mostly self-explanatory. Do *not* save the bad page
|
||||
table (as there isn't one, and the microcode will hang trying to read
|
||||
it.) Formatting will take several minutes after which you will be
|
||||
asked if you want to recreate the bad page table (say "yes."). You
|
||||
will given the option to do a media scan (you can if you want, but
|
||||
emulated disks have no bad spots so there isn't much point.)
|
||||
|
||||
Once the disk has been formatted, you can boot the Installer disk and
|
||||
go about doing the actual installation.
|
||||
Once the disk has been formatted, you can boot the Installer disk and
|
||||
go about doing the actual installation.
|
||||
|
||||
3) Yes, it really does take ViewPoint 10-15 minutes to boot the first time.
|
||||
It's not particularly swift on subsequent boots, either. Patience is a
|
||||
virtue when using a Star.
|
||||
3) Yes, it really does take ViewPoint 10-15 minutes to boot the first time.
|
||||
It's not particularly swift on subsequent boots, either. Patience is a
|
||||
virtue when using a Star.
|
||||
|
||||
4) If you get stuck at MP Code 937 during boot, first try the advice in
|
||||
(1) above.
|
||||
Setting dates post-Y2K may cause issues with some operating systems.
|
||||
On Viewpoint you might also want to install the Set Time utility
|
||||
(see the official Viewpoint docs and installer help for details).
|
||||
4) If you get stuck at MP Code 937 during boot, first try the advice in
|
||||
(1) above.
|
||||
Setting dates post-Y2K may cause issues with some operating systems.
|
||||
On Viewpoint you might also want to install the Set Time utility
|
||||
(see the official Viewpoint docs and installer help for details).
|
||||
|
||||
5) The default startup diagnostics that run during Viewpoint or XDE
|
||||
boot may fail the RTC test (with flashing MP code 0323 / 0007).
|
||||
This occurs if the emulated Star is not running at 100% speed --
|
||||
either because Throttling is off (See Section 4.1) or because your
|
||||
computer isn't capable of running the emulation at full speed. This is
|
||||
because the emulated Star is running faster or slower than the test
|
||||
expects relative to the RTC -- the test thinks that the RTC is behaving
|
||||
incorrectly. In these cases, you can either (1) Enable Throttling
|
||||
during boot (if the system is running too fast) or (2) use the
|
||||
"System->Alternate Boot" menu to select "Rigid" rather than "Default" --
|
||||
this will bypass startup diagnostics entirely.
|
||||
5) The default startup diagnostics that run during Viewpoint or XDE
|
||||
boot may fail the RTC test (with flashing MP code 0323 / 0007).
|
||||
This occurs if the emulated Star is not running at 100% speed --
|
||||
either because Throttling is off (See Section 4.1) or because your
|
||||
computer isn't capable of running the emulation at full speed. This is
|
||||
because the emulated Star is running faster or slower than the test
|
||||
expects relative to the RTC -- the test thinks that the RTC is behaving
|
||||
incorrectly. In these cases, you can either (1) Enable Throttling
|
||||
during boot (if the system is running too fast) or (2) use the
|
||||
"System->Alternate Boot" menu to select "Rigid" rather than "Default" --
|
||||
this will bypass startup diagnostics entirely.
|
||||
|
||||
The following passwords will allow you to run Viewpoint in perpetuity. When
|
||||
using them, ensure the emulated Star's TOD clock is set to a date in
|
||||
@@ -395,8 +404,13 @@ The System Configuration tab provides configuration for three options:
|
||||
--------------------------
|
||||
|
||||
The Ethernet Configuration tab allows the selection of the host network interface
|
||||
to use with Darkstar. If WinPcap or libpcap is unavailable, no interfaces will
|
||||
be listed.
|
||||
to use with Darkstar. The listbox for the available interfaces contains at least
|
||||
the entries `None` (for no ethernet adapter) and `[[ Dodo-Nethub ]]` (for a direct
|
||||
connection to a [Dodo](https://github.com/devhawala/dodo) NetHub). If WinPcap or libpcap
|
||||
is available, further network interfaces will be listed.
|
||||
|
||||
If the `[[ Dodo-Nethub ]]` entry is selected, the 2 input fields for the NetHub
|
||||
Host and Port will be activated for specifying the destination NetHub.
|
||||
|
||||
|
||||
4.3 Display Configuration
|
||||
@@ -466,7 +480,94 @@ The "?" or "help" command at the Console window will give you a brief
|
||||
synopsis of the various commands at your disposal.
|
||||
|
||||
|
||||
6.0 Known Issues
|
||||
6.0 Running from the command line
|
||||
=================================
|
||||
|
||||
The Darkstar program accepts the following optional command line parameters:
|
||||
|
||||
- `-config` _configurationFile_
|
||||
specify the configuration file (see below) defining the presets
|
||||
for the configuration to be used (these presets can be overriden
|
||||
using the configuration dialog)
|
||||
|
||||
- `-rompath` _path_
|
||||
specify the path where the ROM files are located
|
||||
|
||||
- `-start`
|
||||
start the emulator when the UI is ready, this requires that the
|
||||
disk image to be used is defined (either through the configuration
|
||||
file or by the Windows defaults)
|
||||
|
||||
(on the Windows platform, these parameters can be given either on the
|
||||
command line prompt or can be included in the program invocation line
|
||||
specified for a reference icon)
|
||||
|
||||
Using configuration files simplifies using several Star machines, each
|
||||
consisting of a hard disk image file with the required presettings,
|
||||
each defined by a specific machine configuration file.
|
||||
|
||||
The configuration file is a text file with "`parameter =` _value_" lines
|
||||
for setting configuration values; empty lines and lines starting with
|
||||
a hash character are ignored.
|
||||
|
||||
The following configuration parameters can be given, matching the
|
||||
corresponding entries in the configuration dialog or the system menu:
|
||||
|
||||
- `MemorySize =` _nnn_
|
||||
system memory size, in KWords as decimal value.
|
||||
|
||||
- `HardDriveImage =` _filename_
|
||||
filename for the hard disk image to load
|
||||
|
||||
- `FloppyDriveImage =` _filename_
|
||||
filename for the floppy disk image to load
|
||||
|
||||
- `HostID =` _12-hex-digits_
|
||||
the Ethernet host address for this machine, given as hexadecimal
|
||||
number for the 48 bit machine id
|
||||
|
||||
- `HostPacketInterfaceName =` _device_
|
||||
the name of the Ethernet adaptor on the emulator host to use for
|
||||
Ethernet emulation, one of: `None`, `[[ Dodo-Nethub ]]` or any
|
||||
network adapter listed in the configuration dialog (as recognized
|
||||
by WinPcap or libpcap, if present)
|
||||
|
||||
- `ThrottleSpeed =` _boolean_
|
||||
whether to cap execution speed at native execution speed or not
|
||||
|
||||
- `DisplayScale =` _n_
|
||||
scale factor to apply to the display
|
||||
|
||||
- `FullScreenStretch =` _boolean_
|
||||
whether to apply linear or nearest-neighbor filtering to the display,
|
||||
when scaled
|
||||
|
||||
- `SlowPhosphor =` _boolean_
|
||||
whether to apply a fake "slow phosphor" persistence to the emulated
|
||||
display
|
||||
|
||||
- `TODSetMode =` _mode_
|
||||
how to set the TOD clock at power up/reset, one of:
|
||||
HostTimeY2K, HostTime, SpecificDateAndTime, SpecificDate, NoChange
|
||||
|
||||
- `TODDateTime =` _iso-datetime_
|
||||
the specific date/time to set the TOD clock to if TODSetMode is
|
||||
"SpecificDateAndTime"
|
||||
|
||||
- `TODDate =` _iso-date_
|
||||
the specific date to set the TOD clock to if TODSetMode is "SpecificDate"
|
||||
|
||||
- `AltBootMode =` _mode_
|
||||
the preferred Alt-Boot mode for starting the machine, one of:
|
||||
None, DiagnosticRigid, Rigid, Floppy, Ethernet, DiagnosticEthernet,
|
||||
DiagnosticFloppy, AlternateEthernet, DiagnosticTrident1, DiagnosticTrident2,
|
||||
DiagnosticTrident3, HeadCleaning
|
||||
|
||||
- `Start =` _boolean_
|
||||
start the system when the UI is ready? (default: false)
|
||||
|
||||
|
||||
7.0 Known Issues
|
||||
================
|
||||
|
||||
- Speed throttling is not implemented on Unix platforms.
|
||||
@@ -475,7 +576,7 @@ synopsis of the various commands at your disposal.
|
||||
result.
|
||||
|
||||
|
||||
7.0 Reporting Bugs
|
||||
8.0 Reporting Bugs
|
||||
==================
|
||||
|
||||
If you believe you have found a new issue (or have a feature request) please
|
||||
@@ -492,7 +593,7 @@ The more detailed the bug report, the more possible it is for me to track down
|
||||
the cause.
|
||||
|
||||
|
||||
8.0 Source Code
|
||||
9.0 Source Code
|
||||
===============
|
||||
|
||||
The complete source code is available under the BSD license on GitHub at:
|
||||
@@ -502,8 +603,8 @@ https://github.com/livingcomputermuseum/Darkstar
|
||||
Contributions are welcome!
|
||||
|
||||
|
||||
9.0 Hard Disk Image Format
|
||||
==========================
|
||||
10.0 Hard Disk Image Format
|
||||
===========================
|
||||
|
||||
The Star's hard drive controller is implemented in microcode and controls the
|
||||
drive at a very low level, so the hard drive image format is not simply a dump
|
||||
@@ -547,8 +648,8 @@ extract data, parse each track, looking for the address marks and CRCs to
|
||||
delineate the actual data.
|
||||
|
||||
|
||||
10.0 Thanks and Acknowledgements
|
||||
===============================
|
||||
11.0 Thanks and Acknowledgements
|
||||
================================
|
||||
|
||||
Darkstar would not have been possible without the amazing preservation work of
|
||||
Bitsavers.org
|
||||
@@ -561,9 +662,19 @@ https://www.libsdl.org/ and is accessed using the SDL2-CS wrapper, see:
|
||||
https://github.com/flibitijibibo/SDL2-CS.
|
||||
|
||||
|
||||
11.0 Change History
|
||||
12.0 Change History
|
||||
===================
|
||||
|
||||
v1.1.9.0
|
||||
--------
|
||||
- new network device for direct connection to a Dodo NetHub
|
||||
- new optional command line parameter "-start" (start system when the UI is up)
|
||||
- new parameters in configuration-file to match relevant UI items
|
||||
- fix to Ethernet device for receiving packets larger than 56 bytes
|
||||
- fix to configuration-dialog to permit 48 significant bits for Host ID
|
||||
- fix to display for border pattern lines
|
||||
- added StarOS 5.0 disk image (including configuration file) to Disks subdirectory
|
||||
|
||||
v1.1
|
||||
----
|
||||
- Floppies can now be formatted and written.
|
||||
|
||||
Reference in New Issue
Block a user