Skip to content

Commit 423e144

Browse files
committed
[3.1.0] Features and bugfixes
* FEATURE: Pressing Ctrl+A on a serial port also opens the file send dialog. * BUGFIX: Switches are on when they're up, not down. This has changed since the REX boards. * BUGFIX: Coloured interrupt indicators only colour if they are unmasked in $cctrl.
1 parent b28ca1b commit 423e144

File tree

4 files changed

+36
-17
lines changed

4 files changed

+36
-17
lines changed

CHANGELOG.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Change History for rexsim
22

3-
## r21
3+
## 3.1.0
4+
5+
* Pressing Ctrl+A on serial port forms now opens the send file dialog to make following WRAMPmon's instructions not useless.
6+
* Switches are on when they're up, not down. This has changed since the REX boards.
7+
* Coloured interrupt indicators only appear if they are unmasked in $cctrl.
8+
9+
## r21 - 3.0.0
410

511
* Various changes to reflect the Basys implementation of WRAMP. This includes visuals and the specifications of the board: clock rate, amount of RAM, new parallel controls, etc.
6-
* Bump version to 3.0.0
12+
* Bump version to 3.0.0 and begin using semantic versioning scheme
713
* Update WRAMPmon to version 0.7
814
* Fix the warnings that were generated by xbuild
915
* Annotations including Address Bus, Program Counter, and Interrupts have been moved underneath the picture of the board. The new board does not have physical lights for interrupts.

RexSimulator/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("3.0.0")]
36-
[assembly: AssemblyFileVersion("3.0.0")]
35+
[assembly: AssemblyVersion("3.1.0")]
36+
[assembly: AssemblyFileVersion("3.1.0")]

RexSimulatorGui/Controls/RexWidget.cs

+7-6
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,12 @@ private void DrawIRQs(Graphics g)
285285
// these magic numbers give approximately 40px of space
286286
// between each label.
287287
DrawIRQ(g, "Interrupts:", mBoard.mIrqs.Value != 0, 5, 550);
288-
DrawIRQ(g, "Button", mBoard.mIrqs.GetBit(1), 150, 550);
289-
DrawIRQ(g, "Timer", mBoard.mIrqs.GetBit(2), 250, 550);
290-
DrawIRQ(g, "Parallel", mBoard.mIrqs.GetBit(3), 340, 550);
291-
DrawIRQ(g, "Serial 1", mBoard.mIrqs.GetBit(4), 460, 550);
292-
DrawIRQ(g, "Serial 2", mBoard.mIrqs.GetBit(5), 580, 550);
288+
289+
DrawIRQ(g, "Button", mBoard.mIrqs.GetBit(1) && (mBoard.CPU.mSpRegisters[RexSimulator.Hardware.Wramp.RegisterFile.SpRegister.cctrl] & (1 << 5)) != 0, 150, 550);
290+
DrawIRQ(g, "Timer", mBoard.mIrqs.GetBit(2) && (mBoard.CPU.mSpRegisters[RexSimulator.Hardware.Wramp.RegisterFile.SpRegister.cctrl] & (1 << 6)) != 0, 250, 550);
291+
DrawIRQ(g, "Parallel", mBoard.mIrqs.GetBit(3) && (mBoard.CPU.mSpRegisters[RexSimulator.Hardware.Wramp.RegisterFile.SpRegister.cctrl] & (1 << 7)) != 0, 340, 550);
292+
DrawIRQ(g, "Serial 1", mBoard.mIrqs.GetBit(4) && (mBoard.CPU.mSpRegisters[RexSimulator.Hardware.Wramp.RegisterFile.SpRegister.cctrl] & (1 << 8)) != 0, 460, 550);
293+
DrawIRQ(g, "Serial 2", mBoard.mIrqs.GetBit(5) && (mBoard.CPU.mSpRegisters[RexSimulator.Hardware.Wramp.RegisterFile.SpRegister.cctrl] & (1 << 9)) != 0, 580, 550);
293294
}
294295

295296
private void DrawLeds(Graphics g)
@@ -352,7 +353,7 @@ private void DrawSwitch(Graphics g, Point p, Brush b, int switchNo)
352353
g.FillRectangle(b, p.X - mSwitchBorderSize.Width / 2, p.Y - mSwitchBorderSize.Height / 2, mSwitchBorderSize.Width, mSwitchBorderSize.Height);
353354

354355
bool on = ((mBoard.Parallel.Switches & (1 << switchNo)) != 0);
355-
int y = on ? mSwitchSize.Height : -mSwitchSize.Height;
356+
int y = on ? -mSwitchSize.Height : mSwitchSize.Height;
356357
y += p.Y;
357358
g.FillRectangle(b, p.X - mSwitchBorderSize.Width / 2, p.Y - mSwitchBorderSize.Height / 2, mSwitchBorderSize.Width, mSwitchBorderSize.Height);
358359

RexSimulatorGui/Forms/BasicSerialPortForm.cs

+19-7
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,7 @@ private void SerialPortForm_FormClosing(object sender, FormClosingEventArgs e)
158158
this.Hide();
159159
}
160160

161-
/// <summary>
162-
/// Upload a file.
163-
/// </summary>
164-
/// <param name="sender"></param>
165-
/// <param name="e"></param>
166-
private void sendFileToolStripMenuItem_Click(object sender, EventArgs e)
161+
private void UploadFileDialog()
167162
{
168163
if (mUploadFileWorker != null && mUploadFileWorker.ThreadState == System.Threading.ThreadState.Running)
169164
mUploadFileWorker.Abort();
@@ -177,6 +172,16 @@ private void sendFileToolStripMenuItem_Click(object sender, EventArgs e)
177172
}
178173
}
179174

175+
/// <summary>
176+
/// Upload a file.
177+
/// </summary>
178+
/// <param name="sender"></param>
179+
/// <param name="e"></param>
180+
private void sendFileToolStripMenuItem_Click(object sender, EventArgs e)
181+
{
182+
UploadFileDialog();
183+
}
184+
180185
/// <summary>
181186
/// Transmit a keypress to the board.
182187
/// </summary>
@@ -185,7 +190,14 @@ private void sendFileToolStripMenuItem_Click(object sender, EventArgs e)
185190
private void serialTextBox_KeyPress(object sender, KeyPressEventArgs e)
186191
{
187192
e.Handled = true;
188-
mSerialPort.SendAsync(e.KeyChar);
193+
if (Control.ModifierKeys == Keys.Control)
194+
{
195+
UploadFileDialog();
196+
}
197+
else
198+
{
199+
mSerialPort.SendAsync(e.KeyChar);
200+
}
189201
}
190202

191203
/// <summary>

0 commit comments

Comments
 (0)