Skip to content

Commit

Permalink
Merge pull request #17 from danoost/master
Browse files Browse the repository at this point in the history
Release 3.3.4
  • Loading branch information
danoost authored Jun 8, 2021
2 parents 8f1e0b2 + 55173bc commit 91df01f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change History for wsim and rexsim

## 3.3.4

* Add a warning notice to the status bar if low performance is detected.
* Can be clicked to open a dialog with some tips about how to improve performance.

## 3.3.3

* The duck can only quack once at a time
Expand Down
2 changes: 2 additions & 0 deletions RexSimulator/Hardware/Wramp/IR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ public override string ToString()
return string.Format("{0} ${1}, ${2}", Func, (RegisterFile.SpRegister)Rd, Rs);
case Function.movsg:
return string.Format("{0} ${1}, ${2}", Func, Rd, (RegisterFile.SpRegister)Rs);
case Function.lhi:
return string.Format("{0} ${1}, 0x{2:X4}", Func, Rd, Immed16);
}
}
return string.Format("{0}i ${1}, ${2}, 0x{3:X4}", Func, Rd, Rs, Immed16);
Expand Down
33 changes: 30 additions & 3 deletions RexSimulatorGui/Forms/RexBoardForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,33 @@ private void ResetToolStripStatusLabel()
}

/// <summary>
/// Opens an about dialog when the version label is clicked.
/// Opens an about dialog when the version label is clicked, or, if the
/// board is running slowly, opens a messagebox with some potential
/// fixes.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void toolStripStatusLabel1_Click(object sender, EventArgs e)
{
AboutBox aboutBox = new AboutBox();
aboutBox.Show();
if (toolStripStatusLabel1.Text.Contains("WRAMP is running slowly!"))
{
MessageBox.Show(
"If wsim is running slowly, you're probably in a virtual machine on Windows." + Environment.NewLine +
"The best way to get around this is by running Linux! If you're confident, try finding some instructions on how to run a live CD of Ubuntu! Otherwise, keep reading." + Environment.NewLine + Environment.NewLine +
"If you're running Windows 10 Home, your computer doesn't support virtualisation (also known as Hyper-V, VT-x, or VT-d). This will almost certainly cause performance issues." + Environment.NewLine +
"Try asking your lecturer or tutor if they know how to obtain a license key for Windows 10 Professional from Microsoft Azure Education." + Environment.NewLine + Environment.NewLine +
"If you're already using Windows 10 Professional, and virtualisation is turned on, you probably need to increase the number of CPU cores allocated to your VM. 2 is a good minimum, but 4 should be comfortable. Make sure you also give it a decent amount of RAM!" + Environment.NewLine + Environment.NewLine +
"Another way to get better performance is to run wsim directly under Windows with a copy downloaded from Github. It can be tricky to set up shared folders in way that makes it easy to get the .srec files out from the VM though, so good luck :)",
"WRAMP is running slowly!",
MessageBoxButtons.OK,
MessageBoxIcon.Exclamation
);
}
else
{
AboutBox aboutBox = new AboutBox();
aboutBox.Show();
}
}

/// <summary>
Expand All @@ -325,6 +344,14 @@ private void updateTimer_Tick(object sender, EventArgs e)
statusStrip1.BackColor = Color.Red;
toolStripStatusLabel1.Text = "WARNING: User Mode Enabled (Alpha Feature)";
}
// Set status message if the board is running slowly (<50%)
// This also enables the messagebox that can give tips on how to
// get around bad performance in VMs under Windows hosts.
else if (mRunning && (mLastClockRateSmoothed * 100 / TARGET_CLOCK_RATE) < 50)
{
statusStrip1.BackColor = Color.Yellow;
toolStripStatusLabel1.Text = "WARNING: WRAMP is running slowly! Click me for help!";
}
else
{
ResetToolStripStatusLabel();
Expand Down
4 changes: 2 additions & 2 deletions RexSimulatorGui/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
// 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("3.3.3")]
[assembly: AssemblyFileVersion("3.3.3")]
[assembly: AssemblyVersion("3.3.4")]
[assembly: AssemblyFileVersion("3.3.4")]

0 comments on commit 91df01f

Please sign in to comment.