mirror of
https://github.com/livingcomputermuseum/ContrAlto.git
synced 2026-01-19 09:28:00 +00:00
Added full-screen mode, tweaked layout of debugger UI a bit.
This commit is contained in:
parent
46d625586f
commit
7faeb824f5
45
Contralto/UI/AltoWindow.Designer.cs
generated
45
Contralto/UI/AltoWindow.Designer.cs
generated
@ -29,7 +29,7 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AltoWindow));
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this._mainMenu = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveScreenshotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -56,22 +56,23 @@
|
||||
this.CaptureStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.SystemStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.DisplayBox = new System.Windows.Forms.PictureBox();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.fullScreenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this._mainMenu.SuspendLayout();
|
||||
this.StatusLine.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.DisplayBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
// _mainMenu
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this._mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.settingsToolStripMenuItem,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(608, 24);
|
||||
this.menuStrip1.TabIndex = 2;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
this._mainMenu.Location = new System.Drawing.Point(0, 0);
|
||||
this._mainMenu.Name = "_mainMenu";
|
||||
this._mainMenu.Size = new System.Drawing.Size(608, 24);
|
||||
this._mainMenu.TabIndex = 2;
|
||||
this._mainMenu.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
@ -108,7 +109,8 @@
|
||||
this.AlternateBootToolStripMenuItem,
|
||||
this.SystemEthernetBootMenu,
|
||||
this.optionsToolStripMenuItem,
|
||||
this.SystemShowDebuggerMenuItem});
|
||||
this.SystemShowDebuggerMenuItem,
|
||||
this.fullScreenToolStripMenuItem});
|
||||
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
|
||||
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(57, 20);
|
||||
this.settingsToolStripMenuItem.Text = "System";
|
||||
@ -253,7 +255,7 @@
|
||||
this.StatusLine.Size = new System.Drawing.Size(608, 25);
|
||||
this.StatusLine.TabIndex = 3;
|
||||
this.StatusLine.Text = "statusStrip1";
|
||||
this.StatusLine.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnKeyDown);
|
||||
this.StatusLine.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnKeyDown);
|
||||
//
|
||||
// DiskStatusLabel
|
||||
//
|
||||
@ -305,6 +307,15 @@
|
||||
this.DisplayBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.OnDisplayMouseMove);
|
||||
this.DisplayBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OnDisplayMouseUp);
|
||||
//
|
||||
// fullScreenToolStripMenuItem
|
||||
//
|
||||
this.fullScreenToolStripMenuItem.Name = "fullScreenToolStripMenuItem";
|
||||
this.fullScreenToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt)
|
||||
| System.Windows.Forms.Keys.F)));
|
||||
this.fullScreenToolStripMenuItem.Size = new System.Drawing.Size(223, 22);
|
||||
this.fullScreenToolStripMenuItem.Text = "Full Screen";
|
||||
this.fullScreenToolStripMenuItem.Click += new System.EventHandler(this.OnFullScreenMenuClick);
|
||||
//
|
||||
// AltoWindow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -312,22 +323,23 @@
|
||||
this.ClientSize = new System.Drawing.Size(608, 859);
|
||||
this.Controls.Add(this.StatusLine);
|
||||
this.Controls.Add(this.DisplayBox);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Controls.Add(this._mainMenu);
|
||||
this.DoubleBuffered = true;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.MainMenuStrip = this._mainMenu;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "AltoWindow";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Text = "ContrAlto";
|
||||
this.Deactivate += new System.EventHandler(this.OnWindowDeactivate);
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.OnAltoWindowClosed);
|
||||
this.SizeChanged += new System.EventHandler(this.OnWindowSizeChanged);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnKeyDown);
|
||||
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.OnKeyUp);
|
||||
this.Leave += new System.EventHandler(this.OnWindowLeave);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this._mainMenu.ResumeLayout(false);
|
||||
this._mainMenu.PerformLayout();
|
||||
this.StatusLine.ResumeLayout(false);
|
||||
this.StatusLine.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.DisplayBox)).EndInit();
|
||||
@ -339,7 +351,7 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox DisplayBox;
|
||||
private System.Windows.Forms.MenuStrip menuStrip1;
|
||||
private System.Windows.Forms.MenuStrip _mainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
@ -365,5 +377,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem AlternateBootToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveScreenshotToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripStatusLabel FPSLabel;
|
||||
private System.Windows.Forms.ToolStripMenuItem fullScreenToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
@ -22,6 +22,7 @@ namespace Contralto
|
||||
|
||||
_mouseCaptured = false;
|
||||
_currentCursorState = true;
|
||||
_fullScreenDisplay = false;
|
||||
|
||||
_displayBuffer = new Bitmap(608, 808, PixelFormat.Format1bppIndexed);
|
||||
DisplayBox.Image = _displayBuffer;
|
||||
@ -54,18 +55,17 @@ namespace Contralto
|
||||
|
||||
this.DoubleBuffered = true;
|
||||
|
||||
System.Timers.Timer fpsTimer = new System.Timers.Timer();
|
||||
fpsTimer.AutoReset = true;
|
||||
fpsTimer.Interval = 1000;
|
||||
fpsTimer.Elapsed += OnFPSTimerElapsed;
|
||||
fpsTimer.Start();
|
||||
_fpsTimer = new System.Timers.Timer();
|
||||
_fpsTimer.AutoReset = true;
|
||||
_fpsTimer.Interval = 1000;
|
||||
_fpsTimer.Elapsed += OnFPSTimerElapsed;
|
||||
_fpsTimer.Start();
|
||||
|
||||
|
||||
System.Timers.Timer diskTimer = new System.Timers.Timer();
|
||||
diskTimer.AutoReset = true;
|
||||
diskTimer.Interval = 25;
|
||||
diskTimer.Elapsed += OnDiskTimerElapsed;
|
||||
diskTimer.Start();
|
||||
_diskAccessTimer = new System.Timers.Timer();
|
||||
_diskAccessTimer.AutoReset = true;
|
||||
_diskAccessTimer.Interval = 25;
|
||||
_diskAccessTimer.Elapsed += OnDiskTimerElapsed;
|
||||
_diskAccessTimer.Start();
|
||||
}
|
||||
|
||||
public void AttachSystem(AltoSystem system)
|
||||
@ -188,6 +188,11 @@ namespace Contralto
|
||||
optionsWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void OnFullScreenMenuClick(object sender, EventArgs e)
|
||||
{
|
||||
BeginInvoke(new DisplayDelegate(ToggleFullScreen));
|
||||
}
|
||||
|
||||
private void OnHelpAboutClick(object sender, EventArgs e)
|
||||
{
|
||||
AboutBox about = new AboutBox();
|
||||
@ -270,6 +275,12 @@ namespace Contralto
|
||||
|
||||
private void OnAltoWindowClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
//
|
||||
// Stop UI timers
|
||||
//
|
||||
_fpsTimer.Stop();
|
||||
_diskAccessTimer.Stop();
|
||||
|
||||
// Halt the system and detach our display
|
||||
_controller.StopExecution();
|
||||
_system.DetachDisplay();
|
||||
@ -278,7 +289,7 @@ namespace Contralto
|
||||
//
|
||||
// Commit current configuration to disk
|
||||
//
|
||||
Configuration.WriteConfiguration();
|
||||
Configuration.WriteConfiguration();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
@ -764,6 +775,23 @@ namespace Contralto
|
||||
ReleaseMouse();
|
||||
}
|
||||
|
||||
private void OnWindowSizeChanged(object sender, EventArgs e)
|
||||
{
|
||||
//
|
||||
// If we've switched to a fullscreen mode, update the
|
||||
// Alto's display area.
|
||||
//
|
||||
if (_fullScreenDisplay)
|
||||
{
|
||||
DisplayBox.Top = 0;
|
||||
DisplayBox.Left = 0;
|
||||
DisplayBox.Width = this.Width;
|
||||
DisplayBox.Height = this.Height;
|
||||
DisplayBox.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
DisplayBox.BackColor = Color.Black;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnFPSTimerElapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
string fpsMessage = String.Format("{0} fields/sec", _system.DisplayController.Fields);
|
||||
@ -804,6 +832,41 @@ namespace Contralto
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleFullScreen()
|
||||
{
|
||||
_fullScreenDisplay = !_fullScreenDisplay;
|
||||
|
||||
if (_fullScreenDisplay)
|
||||
{
|
||||
// Save the original size and location of the Alto's Display so we can
|
||||
// restore it when full-screen mode is exited.
|
||||
_windowedDisplayBoxLocation = DisplayBox.Location;
|
||||
_windowedDisplayBoxSize = DisplayBox.Size;
|
||||
|
||||
// Hide window adornments and make the window full screen on the current
|
||||
// display.
|
||||
this.FormBorderStyle = FormBorderStyle.None;
|
||||
this.WindowState = FormWindowState.Maximized;
|
||||
_mainMenu.Visible = false;
|
||||
StatusLine.Visible = false;
|
||||
|
||||
// Once the window repaints we will center the Alto's display and
|
||||
// stretch if applicable.
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show everything that was hidden before.
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
_mainMenu.Visible = true;
|
||||
StatusLine.Visible = true;
|
||||
|
||||
DisplayBox.SizeMode = PictureBoxSizeMode.Normal;
|
||||
DisplayBox.Location = _windowedDisplayBoxLocation;
|
||||
DisplayBox.Size = _windowedDisplayBoxSize;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitKeymap()
|
||||
{
|
||||
_keyMap = new Dictionary<Keys, AltoKey>();
|
||||
@ -907,10 +970,16 @@ namespace Contralto
|
||||
// Keyboard mapping from windows vkeys to Alto keys
|
||||
private Dictionary<Keys, AltoKey> _keyMap;
|
||||
|
||||
// Mouse capture state
|
||||
private bool _mouseCaptured;
|
||||
private bool _currentCursorState;
|
||||
private bool _skipNextMouseMove;
|
||||
|
||||
// Full-screen state
|
||||
private bool _fullScreenDisplay;
|
||||
private Point _windowedDisplayBoxLocation;
|
||||
private Size _windowedDisplayBoxSize;
|
||||
|
||||
// The Alto system we're running
|
||||
private AltoSystem _system;
|
||||
|
||||
@ -920,17 +989,20 @@ namespace Contralto
|
||||
// The debugger, which may or may not be running.
|
||||
private Debugger _debugger;
|
||||
|
||||
// strings. TODO: move to resource
|
||||
private const string _noImageLoadedText = "<no image loaded>";
|
||||
private const string _systemStoppedText = "Alto Stopped.";
|
||||
private const string _systemRunningText = "Alto Running.";
|
||||
private const string _systemErrorText = "Alto Stopped due to error. See Debugger.";
|
||||
// Status bar things
|
||||
System.Timers.Timer _fpsTimer;
|
||||
System.Timers.Timer _diskAccessTimer;
|
||||
|
||||
private DiskActivityType _lastActivity;
|
||||
private Image _diskIdleImage;
|
||||
private Image _diskReadImage;
|
||||
private Image _diskWriteImage;
|
||||
private Image _diskSeekImage;
|
||||
private Image _diskSeekImage;
|
||||
|
||||
}
|
||||
// strings. TODO: move to resource
|
||||
private const string _noImageLoadedText = "<no image loaded>";
|
||||
private const string _systemStoppedText = "Alto Stopped.";
|
||||
private const string _systemRunningText = "Alto Running.";
|
||||
private const string _systemErrorText = "Alto Stopped due to error. See Debugger.";
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,10 +117,10 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="_mainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="menuStrip1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="_mainMenu.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="StatusLine.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
|
||||
1538
Contralto/UI/Debugger.Designer.cs
generated
1538
Contralto/UI/Debugger.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ pioneering graphical workstations developed at Xerox PARC in 1973.
|
||||
-------------------
|
||||
|
||||
ContrAlto currently emulates the following Alto hardware:
|
||||
- Alto IIxm CPU
|
||||
- Alto I and Alto II XM CPU
|
||||
- Microcode RAM (in 1K RAM, 1K RAM/2K ROM, or 3K RAM configurations)
|
||||
- 256KW of main memory (in 64KW banks)
|
||||
- Two Diablo Model 31 or 44 drives
|
||||
@ -23,7 +23,7 @@ ContrAlto currently emulates the following Alto hardware:
|
||||
--------------
|
||||
|
||||
At this time, ContrAlto does not support more exotic hardware such as Trident
|
||||
disks, printers using the utility port, the Orbit printer interface, or the
|
||||
disks, printers or audio using the utility port, the Orbit printer interface, or the
|
||||
keyset input device.
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ a mousewheel click maps to a click of the Alto's middle mouse button.
|
||||
|
||||
If you have a trackpad or other pointing device, using the middle mouse button
|
||||
may be more complicated. See what configuration options your operating system
|
||||
and/or drivers provides you for mapping mouse buttons.
|
||||
and/or drivers provide you for mapping mouse buttons.
|
||||
|
||||
|
||||
3.1.2 Keyboard
|
||||
@ -117,9 +117,9 @@ Alto Key PC Key
|
||||
-------- ----------
|
||||
LF Down Arrow
|
||||
BS Backspace
|
||||
Blank-Bottom F3
|
||||
Blank-Middle F2
|
||||
Blank-Top F1
|
||||
Blank-Middle F2
|
||||
Blank-Bottom F3
|
||||
<- (arrow) Left Arrow
|
||||
DEL Del
|
||||
LOCK F4
|
||||
@ -182,7 +182,7 @@ get you started:
|
||||
http://bitsavers.org/pdf/xerox/alto/Alto_Users_Handbook_Sep79.pdf
|
||||
|
||||
- "Alto Subsystems" documents many of the common Alto programs and tools
|
||||
("Subsystems" in Alto parlance) in detail.
|
||||
("subsystems" in Alto parlance) in detail.
|
||||
http://bitsavers.org/pdf/xerox/alto/AltoSubsystems_Oct79.pdf
|
||||
|
||||
- "Alto Operating System Reference Manual" is useful if you are going to do
|
||||
@ -204,10 +204,8 @@ get you started:
|
||||
http://bitsavers.org/pdf/xerox/alto/AltoHWRef.part2.pdf
|
||||
|
||||
- "A Field Guide to Alto-Land" is a casual perspective on Alto use (and
|
||||
the culture that grew around it) at Xerox.
|
||||
the culture that grew around it) at Xerox PARC.
|
||||
http://xeroxalto.computerhistory.org/_cd8_/altodocs/.fieldguide.press!2.pdf
|
||||
|
||||
|
||||
|
||||
|
||||
4.0 Configuration
|
||||
@ -280,7 +278,8 @@ simulated Alto display.
|
||||
The "Throttle Framerate" checkbox will force ContrAlto to run at an even 60
|
||||
fields/second (matching the speed of the original Alto). Use this if things
|
||||
are running too fast (for example, games that require reflexes.) Uncheck this
|
||||
if you want things to run as fast as possible (for example, compiling code.)
|
||||
if you want things to run as fast as possible (for example, compiling code or
|
||||
running Smalltalk.)
|
||||
|
||||
The "Interlaced Display" checkbox attempts to simulate the Alto's original
|
||||
interlaced display. Depending on your monitor and the speed of your computer
|
||||
@ -359,8 +358,8 @@ Reset: Resets the Alto system.
|
||||
-------------------------
|
||||
|
||||
The pane in the upper left of the debugger window shows the microcode listings
|
||||
for ROM0, ROM1, and RAM1. The listings for ROM0 and ROM1 are derived from the
|
||||
original source code listings. The listing for RAM1 is automatically
|
||||
for ROM0, ROM1, and RAM0-RAM2. The listings for ROM0 and ROM1 are derived from the
|
||||
original source code listings. The listing for the RAM banks is automatically
|
||||
disassembled from the contents of control RAM (and is generally more annoying
|
||||
to read.)
|
||||
|
||||
@ -370,7 +369,7 @@ Refresh, Display Word, Cursor, Display Horizontal, Display Vertical, Parity, and
|
||||
Disk Word). The source code for each task is highlighted in a different color
|
||||
to make task-specific code easy to differentiate.
|
||||
|
||||
ROM1 contains the listing for the Mesa microcode ROMs.
|
||||
ROM1 contains the listing for the Mesa 5.0 microcode ROMs.
|
||||
|
||||
|
||||
5.3 Memory Pane
|
||||
@ -408,7 +407,9 @@ CPU Registers:
|
||||
Shows the CPU L, M and T registers as well as ALU and memory registers.
|
||||
|
||||
General Registers:
|
||||
Shows the contents of the 32 R and 32 S registers (in octal).
|
||||
Shows the contents of the 32 R and 32 S registers (in octal).
|
||||
(The extra 7 sets of R and S registers on 3K CRAM machines are not yet
|
||||
displayed.)
|
||||
|
||||
Reserved Memory:
|
||||
Shows the contents of most "well known" memory locations. See the
|
||||
@ -421,9 +422,7 @@ Reserved Memory:
|
||||
At the moment, the following issues are known and being worked on. If you find
|
||||
an issue not listed here, see section 7.0 to report a new bug.
|
||||
|
||||
- Multiple drives do not function properly, there are still issues in the drive
|
||||
selection logic.
|
||||
|
||||
- BravoX does not run, trapping into SWAT with "DSt" as a diagnostic.
|
||||
|
||||
|
||||
7.0 Reporting Bugs
|
||||
@ -435,6 +434,7 @@ with "ContrAlto Bug".
|
||||
|
||||
When you send a report, please be as specific and detailed as possible:
|
||||
- What issue are you seeing?
|
||||
- What Alto software are you running?
|
||||
- What are the exact steps needed to reproduce the issue?
|
||||
|
||||
The more detailed the bug report, the more possible it is for me to track down
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user