diff --git a/Contralto.sln b/Contralto.sln index b0ddee2..6d4f30c 100644 --- a/Contralto.sln +++ b/Contralto.sln @@ -1,11 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contralto", "Contralto\Contralto.csproj", "{CC6D96B3-8099-4497-8AD8-B0795A3353EA}" EndProject Global + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU diff --git a/Contralto/CPU/MicroInstruction.cs b/Contralto/CPU/MicroInstruction.cs index 0e98985..da185cf 100644 --- a/Contralto/CPU/MicroInstruction.cs +++ b/Contralto/CPU/MicroInstruction.cs @@ -171,6 +171,19 @@ namespace Contralto.CPU NEXT = (ushort)(code & 0x3ff); } + public override string ToString() + { + return String.Format("RSELECT={0} ALUF={1} BS={2} F1={3} F2={4} LoadT={5} LoadL={6} NEXT={7}", + Conversion.ToOctal((int)RSELECT), + ALUF, + BS, + F1, + F2, + LoadT, + LoadL, + Conversion.ToOctal(NEXT)); + } + public UInt32 RSELECT; public AluFunction ALUF; public BusSource BS; diff --git a/Contralto/CPU/Tasks/CursorTask.cs b/Contralto/CPU/Tasks/CursorTask.cs index c7e6f16..c2b1a96 100644 --- a/Contralto/CPU/Tasks/CursorTask.cs +++ b/Contralto/CPU/Tasks/CursorTask.cs @@ -11,7 +11,7 @@ namespace Contralto.CPU /// /// DisplayWordTask provides functionality for the DWT task /// - private class CursorTask : Task + private sealed class CursorTask : Task { public CursorTask(AltoCPU cpu) : base(cpu) { diff --git a/Contralto/CPU/Tasks/DiskTask.cs b/Contralto/CPU/Tasks/DiskTask.cs index 2490f8d..31c8495 100644 --- a/Contralto/CPU/Tasks/DiskTask.cs +++ b/Contralto/CPU/Tasks/DiskTask.cs @@ -16,7 +16,7 @@ namespace Contralto.CPU /// (for both Disk Sector and Disk Word tasks, since the special functions are /// identical between the two) /// - private class DiskTask : Task + private sealed class DiskTask : Task { public DiskTask(AltoCPU cpu, bool diskSectorTask) : base(cpu) { diff --git a/Contralto/CPU/Tasks/DisplayHorizontalTask.cs b/Contralto/CPU/Tasks/DisplayHorizontalTask.cs index 4c5059f..0ff1e7e 100644 --- a/Contralto/CPU/Tasks/DisplayHorizontalTask.cs +++ b/Contralto/CPU/Tasks/DisplayHorizontalTask.cs @@ -11,7 +11,7 @@ namespace Contralto.CPU /// /// DisplayWordTask provides functionality for the DHT task /// - private class DisplayHorizontalTask : Task + private sealed class DisplayHorizontalTask : Task { public DisplayHorizontalTask(AltoCPU cpu) : base(cpu) { diff --git a/Contralto/CPU/Tasks/DisplayVerticalTask.cs b/Contralto/CPU/Tasks/DisplayVerticalTask.cs index 07a6c3b..6306a5d 100644 --- a/Contralto/CPU/Tasks/DisplayVerticalTask.cs +++ b/Contralto/CPU/Tasks/DisplayVerticalTask.cs @@ -11,7 +11,7 @@ namespace Contralto.CPU /// /// DisplayVerticalTask provides functionality for the DVT task /// - private class DisplayVerticalTask : Task + private sealed class DisplayVerticalTask : Task { public DisplayVerticalTask(AltoCPU cpu) : base(cpu) { diff --git a/Contralto/CPU/Tasks/DisplayWordTask.cs b/Contralto/CPU/Tasks/DisplayWordTask.cs index 326edfb..88bc108 100644 --- a/Contralto/CPU/Tasks/DisplayWordTask.cs +++ b/Contralto/CPU/Tasks/DisplayWordTask.cs @@ -12,7 +12,7 @@ namespace Contralto.CPU /// /// DisplayWordTask provides functionality for the DWT task /// - private class DisplayWordTask : Task + private sealed class DisplayWordTask : Task { public DisplayWordTask(AltoCPU cpu) : base(cpu) { diff --git a/Contralto/CPU/Tasks/EmulatorTask.cs b/Contralto/CPU/Tasks/EmulatorTask.cs index fd562dd..482cccc 100644 --- a/Contralto/CPU/Tasks/EmulatorTask.cs +++ b/Contralto/CPU/Tasks/EmulatorTask.cs @@ -13,7 +13,7 @@ namespace Contralto.CPU /// /// EmulatorTask provides emulator (NOVA instruction set) specific operations. /// - private class EmulatorTask : Task + private sealed class EmulatorTask : Task { public EmulatorTask(AltoCPU cpu) : base(cpu) { @@ -81,8 +81,16 @@ namespace Contralto.CPU //throw new NotImplementedException(); break; - case EmulatorF1.SWMODE: - throw new NotImplementedException(); + case EmulatorF1.SWMODE: + _swMode = true; + break; + + case EmulatorF1.RDRAM: + _rdRam = true; + break; + + case EmulatorF1.WRTRAM: + _wrtRam = true; break; default: diff --git a/Contralto/CPU/Tasks/MemoryRefreshTask.cs b/Contralto/CPU/Tasks/MemoryRefreshTask.cs index 1342c35..397314b 100644 --- a/Contralto/CPU/Tasks/MemoryRefreshTask.cs +++ b/Contralto/CPU/Tasks/MemoryRefreshTask.cs @@ -13,7 +13,7 @@ namespace Contralto.CPU /// /// DisplayWordTask provides functionality for the Memory Refresh task /// - private class MemoryRefreshTask : Task + private sealed class MemoryRefreshTask : Task { public MemoryRefreshTask(AltoCPU cpu) : base(cpu) { diff --git a/Contralto/CPU/Tasks/Task.cs b/Contralto/CPU/Tasks/Task.cs index d185751..b5e12f3 100644 --- a/Contralto/CPU/Tasks/Task.cs +++ b/Contralto/CPU/Tasks/Task.cs @@ -56,6 +56,7 @@ namespace Contralto.CPU // "...each task start[s] at the location which is its task number" // _mpc = (ushort)_taskType; + _rdRam = false; } public virtual void BlockTask() @@ -71,7 +72,7 @@ namespace Contralto.CPU public bool ExecuteNext() { // TODO: cache microinstructions (or pre-decode them) to save consing all these up every time. - MicroInstruction instruction = UCodeMemory.DecodeCache[_mpc]; + MicroInstruction instruction = UCodeMemory.GetInstruction(_mpc); // Grab BLOCK bit so that other tasks / hardware can look at it _block = instruction.F1 == SpecialFunction1.Block; @@ -90,7 +91,8 @@ namespace Contralto.CPU /// True if a task switch has been requested by a TASK instruction, false otherwise. protected virtual bool ExecuteInstruction(MicroInstruction instruction) { - bool nextTask = false; + bool nextTask = false; + bool swMode = false; ushort aluData = 0; ushort nextModifier = 0; _loadR = false; @@ -226,9 +228,38 @@ namespace Contralto.CPU _busData &= ControlROM.ConstantROM[(instruction.RSELECT << 3) | ((uint)instruction.BS)]; } + // + // If there was a RDRAM operation last cycle, we AND in the uCode RAM data here. + // + if (_rdRam) + { + _busData &= UCodeMemory.ReadRAM(); + _rdRam = false; + } + // Do ALU operation aluData = ALU.Execute(instruction.ALUF, _busData, _cpu._t, _skip); + // + // If there was a WRTRAM operation last cycle, we write the uCode RAM here + // using the results of this instruction's ALU operation. + // + if (_wrtRam) + { + UCodeMemory.WriteRAM(aluData, _cpu._m); + _wrtRam = false; + } + + // + // If there was an SWMODE operation last cycle, we set the flag to ensure it + // takes effect at the end of this cycle. + // + if (_swMode) + { + _swMode = false; + swMode = true; + } + // Reset shifter op Shifter.SetOperation(ShifterOp.None, 0); @@ -385,6 +416,14 @@ namespace Contralto.CPU } _cpu._t = loadTFromALU ? aluData : _busData; + + // + // Control RAM: "...the control RAM address is specified by the control RAM + // address register... which is loaded from the ALU output whenver T is loaded + // from its source." + // + UCodeMemory.LoadControlRAMAddress(aluData); + } // Load L (and M) from ALU outputs. @@ -399,13 +438,24 @@ namespace Contralto.CPU // // Execute special functions that happen late in the cycle - // + // ExecuteSpecialFunction2Late(instruction); + // + // Switch banks if the last instruction had an SWMODE F1; + // this depends on the value of the NEXT field in this instruction + // + if (swMode) + { + Console.WriteLine("SWMODE NEXT {0} Modifier {1}", Conversion.ToOctal(instruction.NEXT), Conversion.ToOctal(nextModifier)); + UCodeMemory.SwitchMode((ushort)(instruction.NEXT | nextModifier)); + } + // // Select next address, using the address modifier from the last instruction. // _mpc = (ushort)(instruction.NEXT | nextModifier); + return nextTask; } @@ -450,6 +500,9 @@ namespace Contralto.CPU protected uint _rSelect; // RSELECT field from current instruction, potentially modified by task protected bool _loadS; // Whether to load S from M at and of cycle protected bool _loadR; // Whether to load R from shifter at end of cycle. + protected bool _rdRam; // Whether to load uCode RAM onto the bus during the next cycle. + protected bool _wrtRam; // Whether to write uCode RAM from M and ALU outputs during the next cycle. + protected bool _swMode; // Whether to switch uCode banks during the next cycle. // diff --git a/Contralto/CPU/UCodeMemory.cs b/Contralto/CPU/UCodeMemory.cs index 640f48a..57520e9 100644 --- a/Contralto/CPU/UCodeMemory.cs +++ b/Contralto/CPU/UCodeMemory.cs @@ -7,6 +7,15 @@ using System.Threading.Tasks; namespace Contralto.CPU { + public enum MicrocodeBank + { + ROM0 = 0, + ROM1, + RAM0, + RAM1, + RAM2 + } + struct RomFile { public RomFile(string filename, ushort addr, int bitPosition) @@ -29,27 +38,159 @@ namespace Contralto.CPU } private static void Init() - { + { + // + // TODO: this is currently configured for a 2K ROM machine + // (1K RAM, 2K ROM). This should be configurable. + // + // 1 bank of microcode RAM _uCodeRam = new UInt32[1024]; LoadMicrocode(_uCodeRoms); - _decodeCache = new MicroInstruction[2048]; - CacheMicrocodeDecode(); + // + // Cache 3k of instructions: 2K ROM, 1K RAM. + _decodeCache = new MicroInstruction[1024 * 3]; + + // Precache ROM + CacheMicrocodeROM(); + + // Start in ROM0 -- TODO: need to implement reset logic + _microcodeBank = MicrocodeBank.ROM0; + _ramAddr = 0; + _ramBank = 0; + _ramSelect = true; + _lowHalfsel = true; } + /// + /// Exposes the raw contents of the Microcode ROM + /// public static UInt32[] UCodeROM { get { return _uCodeRom; } } + /// + /// Exposes the raw contents of the Microcode RAM + /// public static UInt32[] UCodeRAM { get { return _uCodeRam; } } - public static MicroInstruction[] DecodeCache + public static MicrocodeBank Bank { - get { return _decodeCache; } + get { return _microcodeBank; } + } + + public static void LoadControlRAMAddress(ushort address) + { + _ramBank = (address & 0x3000) >> 12; + _ramSelect = (address & 0x0800) == 0; + _lowHalfsel = (address & 0x0400) == 0; + _ramAddr = (address & 0x3ff); + } + + /// + /// Implements the SWMODE F1 logic; selects the proper uCode bank (from + /// RAM or ROM) based on the supplied NEXT value. + /// + /// + public static void SwitchMode(ushort nextAddress) + { + Logging.Log.Write(Logging.LogComponent.Microcode, "SWMODE: Current Bank {0}", _microcodeBank); + + // 2K ROM + switch(_microcodeBank) + { + case MicrocodeBank.ROM0: + _microcodeBank = (nextAddress & 0x100) == 0 ? MicrocodeBank.RAM0 : MicrocodeBank.ROM1; + break; + + case MicrocodeBank.ROM1: + _microcodeBank = (nextAddress & 0x100) == 0 ? MicrocodeBank.ROM0 : MicrocodeBank.RAM0; + break; + + case MicrocodeBank.RAM0: + _microcodeBank = (nextAddress & 0x100) == 0 ? MicrocodeBank.ROM0 : MicrocodeBank.ROM1; + break; + } + + // for 1K ROM + //_microcodeBank = _microcodeBank == MicrocodeBank.ROM0 ? MicrocodeBank.RAM0 : MicrocodeBank.ROM0; + + Logging.Log.Write(Logging.LogComponent.Microcode, "SWMODE: New Bank {0}", _microcodeBank); + } + + public static ushort ReadRAM() + { + if (!_ramSelect) + { + throw new NotImplementedException("Read from microcode ROM not implemented."); + } + + if (_ramBank > 0) + { + throw new InvalidOperationException("RAM bank > 0, unexpected."); + } + + // pretend no ram for the moment + Logging.Log.Write(Logging.LogComponent.Microcode, "CRAM address for read: Bank {0}, RAM {1}, lowhalf {2} addr {3}", + _ramBank, + _ramSelect, + _lowHalfsel, + Conversion.ToOctal(_ramAddr)); + + UInt32 data = _uCodeRam[_ramAddr + (_ramBank * 1024)]; + + // Flip the necessary bits before returning them. + // (See table in section 8.3 of HWRef.) + ushort halfWord = (ushort)(_lowHalfsel ? data : (data >> 16)); + + Logging.Log.Write(Logging.LogComponent.Microcode, "CRAM data read: {0}-{1}", + _lowHalfsel ? "low" : "high", + Conversion.ToOctal(halfWord)); + + return halfWord; + } + + public static void WriteRAM(ushort low, ushort high) + { + if (!_ramSelect) + { + // No-op, can't write to ROM. + return; + } + + if (_ramBank > 0) + { + throw new InvalidOperationException("RAM bank > 0, unexpected."); + } + + Logging.Log.Write(Logging.LogComponent.Microcode, "CRAM address for write: Bank {0}, addr {1}", + _ramBank, + Conversion.ToOctal(_ramAddr)); + + Logging.Log.Write(Logging.LogComponent.Microcode, "CRAM write of low {0}, high {1}", + Conversion.ToOctal(low), + Conversion.ToOctal(high)); + + ushort address = (ushort)(_ramAddr + _ramBank * 1024); + + _uCodeRam[address] = ((UInt32)(high) << 16) | low; + + UpdateRAMCache(address); + } + + /// + /// Retrieve the microinstruction for the given address using the currently + /// selected memory bank. + /// + /// + /// + public static MicroInstruction GetInstruction(ushort address) + { + return _decodeCache[address + (int)_microcodeBank * 1024]; } private static void LoadMicrocode(RomFile[] romInfo) @@ -80,16 +221,36 @@ namespace Contralto.CPU } } + + for(int i=0;i<_uCodeRom.Length;i++) + { + _uCodeRom[i] = MapWord(_uCodeRom[i]); + } + + } + + private static UInt32 MapWord(UInt32 word) + { // Invert the requisite bits just to make things easier; the high bits of F1 and F2 and the Load L bit are inverted // already; we leave those alone. const UInt32 invertedBitMask = 0xfff77bff; - - for(int i=0;i<_uCodeRom.Length;i++) - { - UInt32 masked = _uCodeRom[i] & ~invertedBitMask; - _uCodeRom[i] = ((~_uCodeRom[i]) & invertedBitMask) | masked; - } + UInt32 masked = word & ~invertedBitMask; + word = ((~word) & invertedBitMask) | masked; + + return word; + } + + private static UInt32 MapRAMWord(UInt32 word) + { + // Invert the requisite bits just to make things easier; the high bits of F1 and F2 and the Load L bit are inverted + // already; we leave those alone. + const UInt32 bitMask = 0x00088400; + + UInt32 masked = ~word & bitMask; + word = (word & ~bitMask) | masked; + + return word; } private static int AddressMap(int address) @@ -98,7 +259,7 @@ namespace Contralto.CPU return mappedAddress; } - private static void CacheMicrocodeDecode() + private static void CacheMicrocodeROM() { for(int i=0;i<_uCodeRom.Length;i++) { @@ -106,6 +267,14 @@ namespace Contralto.CPU } } + private static void UpdateRAMCache(ushort address) + { + UInt32 instructionWord = _uCodeRam[address]; + _decodeCache[2048 + address] = new MicroInstruction(MapRAMWord(instructionWord)); + + Console.WriteLine(_decodeCache[2048 + address]); + } + private static RomFile[] _uCodeRoms = { // first K @@ -132,9 +301,14 @@ namespace Contralto.CPU private static UInt32[] _uCodeRom; private static UInt32[] _uCodeRam; - private static MicroInstruction[] _decodeCache; + private static MicrocodeBank _microcodeBank; + + private static int _ramBank; + private static bool _ramSelect; + private static bool _lowHalfsel; + private static int _ramAddr; } } diff --git a/Contralto/Debugger.Designer.cs b/Contralto/Debugger.Designer.cs index 74e68b0..58e4a88 100644 --- a/Contralto/Debugger.Designer.cs +++ b/Contralto/Debugger.Designer.cs @@ -28,29 +28,53 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); this.Microcode = new System.Windows.Forms.GroupBox(); - this.label2 = new System.Windows.Forms.Label(); - this.JumpToAddress = new System.Windows.Forms.TextBox(); - this._sourceViewer = new System.Windows.Forms.DataGridView(); + this.SourceTabs = new System.Windows.Forms.TabControl(); + this.Rom0Page = new System.Windows.Forms.TabPage(); + this._rom0SourceViewer = new System.Windows.Forms.DataGridView(); this.Breakpoint = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.T = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Addr = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Source = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Rom1Page = new System.Windows.Forms.TabPage(); + this._rom1SourceViewer = new System.Windows.Forms.DataGridView(); + this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Rom2Page = new System.Windows.Forms.TabPage(); + this._ram0SourceViewer = new System.Windows.Forms.DataGridView(); + this.dataGridViewCheckBoxColumn2 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.label2 = new System.Windows.Forms.Label(); + this.JumpToAddress = new System.Windows.Forms.TextBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this._registerData = new System.Windows.Forms.DataGridView(); this.RegNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -71,6 +95,10 @@ this.RegValue = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this._memoryData = new System.Windows.Forms.DataGridView(); + this.Bkpt = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.Address = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Data = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Disassembly = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.label1 = new System.Windows.Forms.Label(); this.ExecutionStateLabel = new System.Windows.Forms.Label(); this.groupBox5 = new System.Windows.Forms.GroupBox(); @@ -80,15 +108,17 @@ this.ResetButton = new System.Windows.Forms.Button(); this.RunToNextTaskButton = new System.Windows.Forms.Button(); this.NovaStep = new System.Windows.Forms.Button(); - this.Bkpt = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.Address = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Data = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Disassembly = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.DisplayBox = new System.Windows.Forms.PictureBox(); this.button1 = new System.Windows.Forms.Button(); this.Microcode.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this._sourceViewer)).BeginInit(); + this.SourceTabs.SuspendLayout(); + this.Rom0Page.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this._rom0SourceViewer)).BeginInit(); + this.Rom1Page.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this._rom1SourceViewer)).BeginInit(); + this.Rom2Page.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this._ram0SourceViewer)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this._registerData)).BeginInit(); this.groupBox2.SuspendLayout(); @@ -105,9 +135,9 @@ // // Microcode // + this.Microcode.Controls.Add(this.SourceTabs); this.Microcode.Controls.Add(this.label2); this.Microcode.Controls.Add(this.JumpToAddress); - this.Microcode.Controls.Add(this._sourceViewer); this.Microcode.Location = new System.Drawing.Point(3, 3); this.Microcode.Name = "Microcode"; this.Microcode.Size = new System.Drawing.Size(603, 625); @@ -115,6 +145,316 @@ this.Microcode.TabStop = false; this.Microcode.Text = "Microcode Source"; // + // SourceTabs + // + this.SourceTabs.Controls.Add(this.Rom0Page); + this.SourceTabs.Controls.Add(this.Rom1Page); + this.SourceTabs.Controls.Add(this.Rom2Page); + this.SourceTabs.Location = new System.Drawing.Point(6, 19); + this.SourceTabs.Name = "SourceTabs"; + this.SourceTabs.SelectedIndex = 0; + this.SourceTabs.Size = new System.Drawing.Size(590, 571); + this.SourceTabs.TabIndex = 14; + this.SourceTabs.SelectedIndexChanged += new System.EventHandler(this.OnTabChanged); + // + // Rom0Page + // + this.Rom0Page.Controls.Add(this._rom0SourceViewer); + this.Rom0Page.Location = new System.Drawing.Point(4, 22); + this.Rom0Page.Name = "Rom0Page"; + this.Rom0Page.Padding = new System.Windows.Forms.Padding(3); + this.Rom0Page.Size = new System.Drawing.Size(582, 545); + this.Rom0Page.TabIndex = 0; + this.Rom0Page.Text = "ROM0"; + this.Rom0Page.UseVisualStyleBackColor = true; + // + // _rom0SourceViewer + // + this._rom0SourceViewer.AllowUserToAddRows = false; + this._rom0SourceViewer.AllowUserToDeleteRows = false; + this._rom0SourceViewer.AllowUserToResizeColumns = false; + this._rom0SourceViewer.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Silver; + this._rom0SourceViewer.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this._rom0SourceViewer.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleVertical; + this._rom0SourceViewer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this._rom0SourceViewer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Breakpoint, + this.T, + this.Addr, + this.Source}); + this._rom0SourceViewer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this._rom0SourceViewer.Location = new System.Drawing.Point(0, 0); + this._rom0SourceViewer.Name = "_rom0SourceViewer"; + this._rom0SourceViewer.ReadOnly = true; + this._rom0SourceViewer.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle5.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this._rom0SourceViewer.RowHeadersDefaultCellStyle = dataGridViewCellStyle5; + this._rom0SourceViewer.RowHeadersVisible = false; + this._rom0SourceViewer.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this._rom0SourceViewer.RowTemplate.Height = 18; + this._rom0SourceViewer.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this._rom0SourceViewer.ShowCellErrors = false; + this._rom0SourceViewer.ShowEditingIcon = false; + this._rom0SourceViewer.ShowRowErrors = false; + this._rom0SourceViewer.Size = new System.Drawing.Size(582, 545); + this._rom0SourceViewer.TabIndex = 1; + this._rom0SourceViewer.TabStop = false; + this._rom0SourceViewer.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.SourceViewCellClick); + // + // Breakpoint + // + this.Breakpoint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.Breakpoint.FalseValue = "false"; + this.Breakpoint.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Breakpoint.HeaderText = "B"; + this.Breakpoint.IndeterminateValue = "null"; + this.Breakpoint.Name = "Breakpoint"; + this.Breakpoint.ReadOnly = true; + this.Breakpoint.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Breakpoint.TrueValue = "true"; + this.Breakpoint.Width = 20; + // + // T + // + this.T.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.T.DefaultCellStyle = dataGridViewCellStyle2; + this.T.HeaderText = "T"; + this.T.Name = "T"; + this.T.ReadOnly = true; + this.T.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.T.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.T.Width = 5; + // + // Addr + // + this.Addr.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Addr.DefaultCellStyle = dataGridViewCellStyle3; + this.Addr.HeaderText = "Addr"; + this.Addr.Name = "Addr"; + this.Addr.ReadOnly = true; + this.Addr.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Addr.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.Addr.Width = 5; + // + // Source + // + this.Source.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Source.DefaultCellStyle = dataGridViewCellStyle4; + this.Source.HeaderText = "Source Code"; + this.Source.Name = "Source"; + this.Source.ReadOnly = true; + this.Source.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Source.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // + // Rom1Page + // + this.Rom1Page.Controls.Add(this._rom1SourceViewer); + this.Rom1Page.Location = new System.Drawing.Point(4, 22); + this.Rom1Page.Name = "Rom1Page"; + this.Rom1Page.Padding = new System.Windows.Forms.Padding(3); + this.Rom1Page.Size = new System.Drawing.Size(582, 545); + this.Rom1Page.TabIndex = 1; + this.Rom1Page.Text = "ROM1"; + this.Rom1Page.UseVisualStyleBackColor = true; + // + // _rom1SourceViewer + // + this._rom1SourceViewer.AllowUserToAddRows = false; + this._rom1SourceViewer.AllowUserToDeleteRows = false; + this._rom1SourceViewer.AllowUserToResizeColumns = false; + this._rom1SourceViewer.AllowUserToResizeRows = false; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.Silver; + this._rom1SourceViewer.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + this._rom1SourceViewer.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleVertical; + this._rom1SourceViewer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this._rom1SourceViewer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewCheckBoxColumn1, + this.dataGridViewTextBoxColumn4, + this.dataGridViewTextBoxColumn3, + this.dataGridViewTextBoxColumn5}); + this._rom1SourceViewer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this._rom1SourceViewer.Location = new System.Drawing.Point(0, 0); + this._rom1SourceViewer.Name = "_rom1SourceViewer"; + this._rom1SourceViewer.ReadOnly = true; + this._rom1SourceViewer.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle10.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this._rom1SourceViewer.RowHeadersDefaultCellStyle = dataGridViewCellStyle10; + this._rom1SourceViewer.RowHeadersVisible = false; + this._rom1SourceViewer.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this._rom1SourceViewer.RowTemplate.Height = 18; + this._rom1SourceViewer.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this._rom1SourceViewer.ShowCellErrors = false; + this._rom1SourceViewer.ShowEditingIcon = false; + this._rom1SourceViewer.ShowRowErrors = false; + this._rom1SourceViewer.Size = new System.Drawing.Size(582, 545); + this._rom1SourceViewer.TabIndex = 2; + this._rom1SourceViewer.TabStop = false; + // + // dataGridViewCheckBoxColumn1 + // + this.dataGridViewCheckBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.dataGridViewCheckBoxColumn1.FalseValue = "false"; + this.dataGridViewCheckBoxColumn1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.dataGridViewCheckBoxColumn1.HeaderText = "B"; + this.dataGridViewCheckBoxColumn1.IndeterminateValue = "null"; + this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1"; + this.dataGridViewCheckBoxColumn1.ReadOnly = true; + this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewCheckBoxColumn1.TrueValue = "true"; + this.dataGridViewCheckBoxColumn1.Width = 20; + // + // dataGridViewTextBoxColumn4 + // + this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; + dataGridViewCellStyle7.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle7; + this.dataGridViewTextBoxColumn4.HeaderText = "Addr"; + this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; + this.dataGridViewTextBoxColumn4.ReadOnly = true; + this.dataGridViewTextBoxColumn4.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.dataGridViewTextBoxColumn4.Width = 5; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; + dataGridViewCellStyle8.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle8; + this.dataGridViewTextBoxColumn3.HeaderText = "Word"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.ReadOnly = true; + this.dataGridViewTextBoxColumn3.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.dataGridViewTextBoxColumn3.Width = 5; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + dataGridViewCellStyle9.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle9; + this.dataGridViewTextBoxColumn5.HeaderText = "Disassembly"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.ReadOnly = true; + this.dataGridViewTextBoxColumn5.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // + // Rom2Page + // + this.Rom2Page.Controls.Add(this._ram0SourceViewer); + this.Rom2Page.Location = new System.Drawing.Point(4, 22); + this.Rom2Page.Name = "Rom2Page"; + this.Rom2Page.Padding = new System.Windows.Forms.Padding(3); + this.Rom2Page.Size = new System.Drawing.Size(582, 545); + this.Rom2Page.TabIndex = 2; + this.Rom2Page.Text = "RAM0"; + this.Rom2Page.UseVisualStyleBackColor = true; + // + // _ram0SourceViewer + // + this._ram0SourceViewer.AllowUserToAddRows = false; + this._ram0SourceViewer.AllowUserToDeleteRows = false; + this._ram0SourceViewer.AllowUserToResizeColumns = false; + this._ram0SourceViewer.AllowUserToResizeRows = false; + dataGridViewCellStyle11.BackColor = System.Drawing.Color.Silver; + this._ram0SourceViewer.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; + this._ram0SourceViewer.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleVertical; + this._ram0SourceViewer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this._ram0SourceViewer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewCheckBoxColumn2, + this.dataGridViewTextBoxColumn7, + this.dataGridViewTextBoxColumn6, + this.dataGridViewTextBoxColumn8}); + this._ram0SourceViewer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this._ram0SourceViewer.Location = new System.Drawing.Point(0, 0); + this._ram0SourceViewer.Name = "_ram0SourceViewer"; + this._ram0SourceViewer.ReadOnly = true; + this._ram0SourceViewer.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle15.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this._ram0SourceViewer.RowHeadersDefaultCellStyle = dataGridViewCellStyle15; + this._ram0SourceViewer.RowHeadersVisible = false; + this._ram0SourceViewer.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + this._ram0SourceViewer.RowTemplate.Height = 18; + this._ram0SourceViewer.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this._ram0SourceViewer.ShowCellErrors = false; + this._ram0SourceViewer.ShowEditingIcon = false; + this._ram0SourceViewer.ShowRowErrors = false; + this._ram0SourceViewer.Size = new System.Drawing.Size(582, 545); + this._ram0SourceViewer.TabIndex = 2; + this._ram0SourceViewer.TabStop = false; + // + // dataGridViewCheckBoxColumn2 + // + this.dataGridViewCheckBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.dataGridViewCheckBoxColumn2.FalseValue = "false"; + this.dataGridViewCheckBoxColumn2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.dataGridViewCheckBoxColumn2.HeaderText = "B"; + this.dataGridViewCheckBoxColumn2.IndeterminateValue = "null"; + this.dataGridViewCheckBoxColumn2.Name = "dataGridViewCheckBoxColumn2"; + this.dataGridViewCheckBoxColumn2.ReadOnly = true; + this.dataGridViewCheckBoxColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewCheckBoxColumn2.TrueValue = "true"; + this.dataGridViewCheckBoxColumn2.Width = 20; + // + // dataGridViewTextBoxColumn7 + // + this.dataGridViewTextBoxColumn7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; + dataGridViewCellStyle12.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle12; + this.dataGridViewTextBoxColumn7.HeaderText = "Addr"; + this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; + this.dataGridViewTextBoxColumn7.ReadOnly = true; + this.dataGridViewTextBoxColumn7.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.dataGridViewTextBoxColumn7.Width = 5; + // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; + dataGridViewCellStyle13.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn6.DefaultCellStyle = dataGridViewCellStyle13; + this.dataGridViewTextBoxColumn6.HeaderText = "Word"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.ReadOnly = true; + this.dataGridViewTextBoxColumn6.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.dataGridViewTextBoxColumn6.Width = 5; + // + // dataGridViewTextBoxColumn8 + // + this.dataGridViewTextBoxColumn8.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + dataGridViewCellStyle14.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.dataGridViewTextBoxColumn8.DefaultCellStyle = dataGridViewCellStyle14; + this.dataGridViewTextBoxColumn8.HeaderText = "Disassembly"; + this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; + this.dataGridViewTextBoxColumn8.ReadOnly = true; + this.dataGridViewTextBoxColumn8.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridViewTextBoxColumn8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // // label2 // this.label2.AutoSize = true; @@ -133,95 +473,6 @@ this.JumpToAddress.TabStop = false; this.JumpToAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnJumpAddressKeyDown); // - // _sourceViewer - // - this._sourceViewer.AllowUserToAddRows = false; - this._sourceViewer.AllowUserToDeleteRows = false; - this._sourceViewer.AllowUserToResizeColumns = false; - this._sourceViewer.AllowUserToResizeRows = false; - dataGridViewCellStyle31.BackColor = System.Drawing.Color.Silver; - this._sourceViewer.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle31; - this._sourceViewer.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.SingleVertical; - this._sourceViewer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this._sourceViewer.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.Breakpoint, - this.T, - this.Addr, - this.Source}); - this._sourceViewer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this._sourceViewer.Location = new System.Drawing.Point(10, 19); - this._sourceViewer.Name = "_sourceViewer"; - this._sourceViewer.ReadOnly = true; - this._sourceViewer.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle35.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle35.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle35.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle35.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle35.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle35.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle35.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this._sourceViewer.RowHeadersDefaultCellStyle = dataGridViewCellStyle35; - this._sourceViewer.RowHeadersVisible = false; - this._sourceViewer.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this._sourceViewer.RowTemplate.Height = 18; - this._sourceViewer.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this._sourceViewer.ShowCellErrors = false; - this._sourceViewer.ShowEditingIcon = false; - this._sourceViewer.ShowRowErrors = false; - this._sourceViewer.Size = new System.Drawing.Size(584, 571); - this._sourceViewer.TabIndex = 1; - this._sourceViewer.TabStop = false; - this._sourceViewer.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.SourceViewCellClick); - // - // Breakpoint - // - this.Breakpoint.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.Breakpoint.FalseValue = "false"; - this.Breakpoint.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Breakpoint.HeaderText = "B"; - this.Breakpoint.IndeterminateValue = "null"; - this.Breakpoint.Name = "Breakpoint"; - this.Breakpoint.ReadOnly = true; - this.Breakpoint.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Breakpoint.TrueValue = "true"; - this.Breakpoint.Width = 20; - // - // T - // - this.T.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; - dataGridViewCellStyle32.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.T.DefaultCellStyle = dataGridViewCellStyle32; - this.T.HeaderText = "T"; - this.T.Name = "T"; - this.T.ReadOnly = true; - this.T.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.T.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.T.Width = 5; - // - // Addr - // - this.Addr.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCellsExceptHeader; - dataGridViewCellStyle33.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Addr.DefaultCellStyle = dataGridViewCellStyle33; - this.Addr.HeaderText = "Addr"; - this.Addr.Name = "Addr"; - this.Addr.ReadOnly = true; - this.Addr.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Addr.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.Addr.Width = 5; - // - // Source - // - this.Source.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - dataGridViewCellStyle34.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Source.DefaultCellStyle = dataGridViewCellStyle34; - this.Source.HeaderText = "Source Code"; - this.Source.Name = "Source"; - this.Source.ReadOnly = true; - this.Source.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Source.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // // groupBox1 // this.groupBox1.Controls.Add(this._registerData); @@ -238,21 +489,21 @@ this._registerData.AllowUserToDeleteRows = false; this._registerData.AllowUserToResizeColumns = false; this._registerData.AllowUserToResizeRows = false; - dataGridViewCellStyle36.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this._registerData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle36; + dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this._registerData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16; this._registerData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this._registerData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.RegNum, this.R, this.S}); - dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle37.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle37.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle37.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle37.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle37.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this._registerData.DefaultCellStyle = dataGridViewCellStyle37; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle17.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this._registerData.DefaultCellStyle = dataGridViewCellStyle17; this._registerData.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this._registerData.Location = new System.Drawing.Point(7, 19); this._registerData.MultiSelect = false; @@ -358,21 +609,21 @@ // this._taskData.AllowUserToAddRows = false; this._taskData.AllowUserToDeleteRows = false; - dataGridViewCellStyle38.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this._taskData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle38; + dataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this._taskData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle18; this._taskData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this._taskData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.TaskName, this.TaskState, this.TaskPC}); - dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle39.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle39.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle39.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle39.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle39.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this._taskData.DefaultCellStyle = dataGridViewCellStyle39; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle19.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this._taskData.DefaultCellStyle = dataGridViewCellStyle19; this._taskData.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this._taskData.Location = new System.Drawing.Point(7, 19); this._taskData.MultiSelect = false; @@ -429,20 +680,20 @@ // this._otherRegs.AllowUserToAddRows = false; this._otherRegs.AllowUserToDeleteRows = false; - dataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this._otherRegs.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle40; + dataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this._otherRegs.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle20; this._otherRegs.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this._otherRegs.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Reg, this.RegValue}); - dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle41.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle41.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle41.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle41.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle41.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this._otherRegs.DefaultCellStyle = dataGridViewCellStyle41; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle21.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this._otherRegs.DefaultCellStyle = dataGridViewCellStyle21; this._otherRegs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this._otherRegs.Location = new System.Drawing.Point(7, 19); this._otherRegs.MultiSelect = false; @@ -495,8 +746,8 @@ this._memoryData.AllowUserToAddRows = false; this._memoryData.AllowUserToDeleteRows = false; this._memoryData.AllowUserToResizeRows = false; - dataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this._memoryData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle42; + dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this._memoryData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22; this._memoryData.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText; this._memoryData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this._memoryData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -504,14 +755,14 @@ this.Address, this.Data, this.Disassembly}); - dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle43.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle43.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle43.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle43.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle43.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this._memoryData.DefaultCellStyle = dataGridViewCellStyle43; + dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle23.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this._memoryData.DefaultCellStyle = dataGridViewCellStyle23; this._memoryData.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this._memoryData.Location = new System.Drawing.Point(6, 19); this._memoryData.MultiSelect = false; @@ -533,6 +784,49 @@ this._memoryData.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.MemoryViewCellClick); this._memoryData.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnMemoryCellValueNeeded); // + // Bkpt + // + this.Bkpt.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.Bkpt.FalseValue = "false"; + this.Bkpt.HeaderText = "B"; + this.Bkpt.Name = "Bkpt"; + this.Bkpt.ReadOnly = true; + this.Bkpt.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Bkpt.ToolTipText = "Breakpoint"; + this.Bkpt.TrueValue = "true"; + this.Bkpt.Width = 20; + // + // Address + // + this.Address.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.Address.HeaderText = "Addr"; + this.Address.MinimumWidth = 16; + this.Address.Name = "Address"; + this.Address.ReadOnly = true; + this.Address.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Address.ToolTipText = "Address"; + this.Address.Width = 54; + // + // Data + // + this.Data.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.Data.HeaderText = "Data"; + this.Data.MinimumWidth = 16; + this.Data.Name = "Data"; + this.Data.ReadOnly = true; + this.Data.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Data.ToolTipText = "Data"; + this.Data.Width = 55; + // + // Disassembly + // + this.Disassembly.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.Disassembly.HeaderText = "Disassembly"; + this.Disassembly.Name = "Disassembly"; + this.Disassembly.ReadOnly = true; + this.Disassembly.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Disassembly.ToolTipText = "Disassembly"; + // // label1 // this.label1.AutoSize = true; @@ -565,20 +859,20 @@ // this._diskData.AllowUserToAddRows = false; this._diskData.AllowUserToDeleteRows = false; - dataGridViewCellStyle44.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this._diskData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle44; + dataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this._diskData.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle24; this._diskData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this._diskData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle45.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle45.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle45.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle45.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle45.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle45.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle45.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this._diskData.DefaultCellStyle = dataGridViewCellStyle45; + dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle25.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle25.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle25.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle25.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle25.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this._diskData.DefaultCellStyle = dataGridViewCellStyle25; this._diskData.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this._diskData.Location = new System.Drawing.Point(6, 19); this._diskData.MultiSelect = false; @@ -646,49 +940,6 @@ this.NovaStep.UseVisualStyleBackColor = true; this.NovaStep.Click += new System.EventHandler(this.NovaStep_Click); // - // Bkpt - // - this.Bkpt.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.Bkpt.FalseValue = "false"; - this.Bkpt.HeaderText = "B"; - this.Bkpt.Name = "Bkpt"; - this.Bkpt.ReadOnly = true; - this.Bkpt.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Bkpt.ToolTipText = "Breakpoint"; - this.Bkpt.TrueValue = "true"; - this.Bkpt.Width = 20; - // - // Address - // - this.Address.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.Address.HeaderText = "Addr"; - this.Address.MinimumWidth = 16; - this.Address.Name = "Address"; - this.Address.ReadOnly = true; - this.Address.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Address.ToolTipText = "Address"; - this.Address.Width = 54; - // - // Data - // - this.Data.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.Data.HeaderText = "Data"; - this.Data.MinimumWidth = 16; - this.Data.Name = "Data"; - this.Data.ReadOnly = true; - this.Data.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Data.ToolTipText = "Data"; - this.Data.Width = 55; - // - // Disassembly - // - this.Disassembly.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.Disassembly.HeaderText = "Disassembly"; - this.Disassembly.Name = "Disassembly"; - this.Disassembly.ReadOnly = true; - this.Disassembly.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Disassembly.ToolTipText = "Disassembly"; - // // groupBox6 // this.groupBox6.Controls.Add(this.DisplayBox); @@ -751,7 +1002,13 @@ this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.Debugger_PreviewKeyDown); this.Microcode.ResumeLayout(false); this.Microcode.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this._sourceViewer)).EndInit(); + this.SourceTabs.ResumeLayout(false); + this.Rom0Page.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this._rom0SourceViewer)).EndInit(); + this.Rom1Page.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this._rom1SourceViewer)).EndInit(); + this.Rom2Page.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this._ram0SourceViewer)).EndInit(); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this._registerData)).EndInit(); this.groupBox2.ResumeLayout(false); @@ -772,7 +1029,7 @@ #endregion private System.Windows.Forms.GroupBox Microcode; - private System.Windows.Forms.DataGridView _sourceViewer; + private System.Windows.Forms.DataGridView _rom0SourceViewer; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Button StepButton; private System.Windows.Forms.Button AutoStep; @@ -815,5 +1072,19 @@ private System.Windows.Forms.GroupBox groupBox6; private System.Windows.Forms.PictureBox DisplayBox; private System.Windows.Forms.Button button1; + private System.Windows.Forms.TabControl SourceTabs; + private System.Windows.Forms.TabPage Rom0Page; + private System.Windows.Forms.TabPage Rom1Page; + private System.Windows.Forms.DataGridView _rom1SourceViewer; + private System.Windows.Forms.TabPage Rom2Page; + private System.Windows.Forms.DataGridView _ram0SourceViewer; + private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; + private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8; } } \ No newline at end of file diff --git a/Contralto/Debugger.cs b/Contralto/Debugger.cs index 8be6d98..b168f85 100644 --- a/Contralto/Debugger.cs +++ b/Contralto/Debugger.cs @@ -47,21 +47,21 @@ namespace Contralto SourceLine src = new SourceLine(line); - int i = _sourceViewer.Rows.Add( + int i = _rom0SourceViewer.Rows.Add( false, // breakpoint GetTextForTask(src.Task), src.Address, src.Text); // Give the row a color based on the task - _sourceViewer.Rows[i].DefaultCellStyle.BackColor = GetColorForTask(src.Task); + _rom0SourceViewer.Rows[i].DefaultCellStyle.BackColor = GetColorForTask(src.Task); // Tag the row based on the PROM address (if any) to make it easy to find. if (!String.IsNullOrEmpty(src.Address)) { - _sourceViewer.Rows[i].Tag = Convert.ToUInt16(src.Address, 8); + _rom0SourceViewer.Rows[i].Tag = Convert.ToUInt16(src.Address, 8); } - } + } // Ensure the UI view gets refreshed to display the current MPC source Refresh(); @@ -114,20 +114,20 @@ namespace Contralto private void RefreshUI() { // Registers - for(int i=0;i<32;i++) + for (int i = 0; i < 32; i++) { - _registerData.Rows[i].Cells[0].Value = Conversion.ToOctal(i,2); + _registerData.Rows[i].Cells[0].Value = Conversion.ToOctal(i, 2); _registerData.Rows[i].Cells[1].Value = Conversion.ToOctal(_system.CPU.R[i], 6); _registerData.Rows[i].Cells[2].Value = Conversion.ToOctal(_system.CPU.S[0][i], 6); } // Tasks - for (int i=0;i<16;i++) + for (int i = 0; i < 16; i++) { _taskData.Rows[i].Cells[0].Value = GetTextForTask((TaskType)i); _taskData.Rows[i].Cells[1].Value = GetTextForTaskState(_system.CPU.Tasks[i]); _taskData.Rows[i].Cells[2].Value = - _system.CPU.Tasks[i] != null ? Conversion.ToOctal(_system.CPU.Tasks[i].MPC, 4) : String.Empty; + _system.CPU.Tasks[i] != null ? Conversion.ToOctal(_system.CPU.Tasks[i].MPC, 4) : String.Empty; } // Other registers @@ -152,19 +152,35 @@ namespace Contralto _diskData.Rows[6].Cells[1].Value = Conversion.ToOctal(_system.DiskController.KADR, 6); _diskData.Rows[7].Cells[1].Value = Conversion.ToOctal(_system.DiskController.KCOM, 6); _diskData.Rows[8].Cells[1].Value = Conversion.ToOctal(_system.DiskController.KSTAT, 6); - _diskData.Rows[9].Cells[1].Value = _system.DiskController.RECNO.ToString(); + _diskData.Rows[9].Cells[1].Value = _system.DiskController.RECNO.ToString(); - // Find the right source line. - HighlightMicrocodeSourceLine(_system.CPU.CurrentTask.MPC); + // + // Select active tab based on current UCode bank + switch (UCodeMemory.Bank) + { + case MicrocodeBank.ROM0: + SourceTabs.TabIndex = 0; + break; + + case MicrocodeBank.ROM1: + SourceTabs.TabIndex = 1; + break; + + case MicrocodeBank.RAM0: + SourceTabs.TabIndex = 2; + break; + } + + RefreshMicrocodeDisassembly(); // Highlight the nova memory location corresponding to the emulator PC. // TODO: this should be configurable ushort pc = _system.CPU.R[6]; - HighlightNovaSourceLine(pc); + HighlightNovaSourceLine(pc); // Exec state - switch(_execState) + switch (_execState) { case ExecutionState.Stopped: ExecutionStateLabel.Text = "Stopped"; @@ -201,6 +217,30 @@ namespace Contralto } + private void RefreshMicrocodeDisassembly() + { + // Update non-ROM code listings, depending on the currently active tab + switch (SourceTabs.SelectedIndex) + { + case 0: + // Find the right source line and highlight it. + HighlightMicrocodeSourceLine(_rom0SourceViewer, _system.CPU.CurrentTask.MPC); + break; + + case 1: + SourceTabs.TabIndex = 1; + RefreshMicrocodeDisassembly(MicrocodeBank.ROM1); + HighlightMicrocodeSourceLine(_rom1SourceViewer, _system.CPU.CurrentTask.MPC); + break; + + case 2: + SourceTabs.TabIndex = 2; + RefreshMicrocodeDisassembly(MicrocodeBank.RAM0); + HighlightMicrocodeSourceLine(_ram0SourceViewer, _system.CPU.CurrentTask.MPC); + break; + } + } + private void InitControls() { for (int i = 0; i < 32; i++) @@ -241,8 +281,8 @@ namespace Contralto _displayBuffer = new Bitmap(608, 808, PixelFormat.Format1bppIndexed); DisplayBox.Image = _displayBuffer; - } + /// /// Handle breakpoint placement on column 0. @@ -256,12 +296,12 @@ namespace Contralto { // See if this is a source line, if so check/uncheck the box // and set/unset a breakpoint for the line - if (_sourceViewer.Rows[e.RowIndex].Tag != null) + if (_rom0SourceViewer.Rows[e.RowIndex].Tag != null) { - bool value = (bool)_sourceViewer.Rows[e.RowIndex].Cells[0].Value; - _sourceViewer.Rows[e.RowIndex].Cells[0].Value = !value; + bool value = (bool)_rom0SourceViewer.Rows[e.RowIndex].Cells[0].Value; + _rom0SourceViewer.Rows[e.RowIndex].Cells[0].Value = !value; - ModifyMicrocodeBreakpoint((UInt16)_sourceViewer.Rows[e.RowIndex].Tag, !value); + ModifyMicrocodeBreakpoint((UInt16)_rom0SourceViewer.Rows[e.RowIndex].Tag, !value); } } @@ -280,17 +320,63 @@ namespace Contralto } } - - private void HighlightMicrocodeSourceLine(UInt16 address) + private void RefreshMicrocodeDisassembly(MicrocodeBank bank) { - foreach (DataGridViewRow row in _sourceViewer.Rows) + DataGridView view = null; + uint[] uCode = null; + switch (bank) + { + case MicrocodeBank.ROM1: + view = _rom1SourceViewer; + uCode = UCodeMemory.UCodeROM; + break; + + case MicrocodeBank.RAM0: + view = _ram0SourceViewer; + uCode = UCodeMemory.UCodeRAM; + break; + } + + bool bFirstTime = view.Rows.Count == 0; + + + for(int i=0;i<1024;i++) + { + int address = (bank == MicrocodeBank.RAM0) ? i : 1024 + i; + MicroInstruction instruction = new MicroInstruction(uCode[address]); + + if (bFirstTime) + { + // Create new row + int index = view.Rows.Add( + false, // breakpoint + Conversion.ToOctal(address, 4), + Conversion.ToOctal((int)uCode[address], 11), + UCodeDisassembler.DisassembleInstruction(instruction, TaskType.Emulator)); + + view.Rows[index].Tag = (ushort)i; + } + else + { + // Update existing row + view.Rows[i].Cells[1].Value = Conversion.ToOctal(address, 4); + view.Rows[i].Cells[2].Value = Conversion.ToOctal((int)uCode[address], 11); + view.Rows[i].Cells[3].Value = UCodeDisassembler.DisassembleInstruction(instruction, TaskType.Emulator); + } + } + } + + + private void HighlightMicrocodeSourceLine(DataGridView view, UInt16 address) + { + foreach (DataGridViewRow row in view.Rows) { if (row.Tag != null && (ushort)(row.Tag) == address) { - _sourceViewer.ClearSelection(); + view.ClearSelection(); row.Selected = true; - _sourceViewer.CurrentCell = row.Cells[0]; + view.CurrentCell = row.Cells[0]; break; } } @@ -554,6 +640,11 @@ namespace Contralto } + private void OnTabChanged(object sender, EventArgs e) + { + RefreshMicrocodeDisassembly(); + } + private void Debugger_Load(object sender, EventArgs e) { @@ -569,7 +660,7 @@ namespace Contralto UInt16 address = Convert.ToUInt16(JumpToAddress.Text, 8); // find the source address that matches this, if any. - HighlightMicrocodeSourceLine(address); + HighlightMicrocodeSourceLine(_rom0SourceViewer, address); } catch { @@ -778,11 +869,22 @@ namespace Contralto // Hacky initial implementation of keyboard input. private void Debugger_KeyDown(object sender, KeyEventArgs e) { - e.SuppressKeyPress = true; + //e.Handled = true; + //e.SuppressKeyPress = true; if (_keyMap.ContainsKey(e.KeyCode)) { _system.Keyboard.KeyDown(_keyMap[e.KeyCode]); } + + if (e.Control) + { + _system.Keyboard.KeyDown(_keyMap[Keys.ControlKey]); + } + + if (e.Shift) + { + _system.Keyboard.KeyDown(_keyMap[Keys.LShiftKey]); + } } private void DisplayBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) @@ -792,10 +894,11 @@ namespace Contralto private void Debugger_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { + /* if (_keyMap.ContainsKey(e.KeyCode)) { _system.Keyboard.KeyDown(_keyMap[e.KeyCode]); - } + } */ } private void Debugger_KeyUp(object sender, KeyEventArgs e) @@ -805,7 +908,18 @@ namespace Contralto _system.Keyboard.KeyUp(_keyMap[e.KeyCode]); } - e.SuppressKeyPress = true; + // e.Handled = true; + // e.SuppressKeyPress = true; + + if (e.Control) + { + _system.Keyboard.KeyUp(_keyMap[Keys.ControlKey]); + } + + if (e.Shift) + { + _system.Keyboard.KeyUp(_keyMap[Keys.LShiftKey]); + } } private void InitKeymap() @@ -862,6 +976,7 @@ namespace Contralto _keyMap.Add(Keys.LShiftKey, AltoKey.LShift); _keyMap.Add(Keys.RShiftKey, AltoKey.RShift); _keyMap.Add(Keys.ControlKey, AltoKey.CTRL); + _keyMap.Add(Keys.Return, AltoKey.Return); } @@ -922,7 +1037,6 @@ namespace Contralto { _system.CPU.Hack(); } - - + } } diff --git a/Contralto/Debugger.resx b/Contralto/Debugger.resx index be4a8f3..077b547 100644 --- a/Contralto/Debugger.resx +++ b/Contralto/Debugger.resx @@ -129,6 +129,30 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True diff --git a/Contralto/IO/DiskController.cs b/Contralto/IO/DiskController.cs index af9b6c6..6090c17 100644 --- a/Contralto/IO/DiskController.cs +++ b/Contralto/IO/DiskController.cs @@ -477,7 +477,7 @@ namespace Contralto.IO { if (_debugRead) { - Console.WriteLine("--- missed word {0}({1}) ---", _sectorWordIndex, _kDataRead); + //Console.WriteLine("--- missed word {0}({1}) ---", _sectorWordIndex, _kDataRead); } Log.Write(LogType.Verbose, LogComponent.DiskWordTask, "Sector {0} Word {1} read into KDATA", _sector, Conversion.ToOctal(diskWord)); diff --git a/Contralto/Logging/Log.cs b/Contralto/Logging/Log.cs index 679891c..cc5af43 100644 --- a/Contralto/Logging/Log.cs +++ b/Contralto/Logging/Log.cs @@ -21,6 +21,7 @@ namespace Contralto.Logging Memory = 0x20, Keyboard = 0x40, Display = 0x80, + Microcode = 0x100, All = 0x7fffffff } diff --git a/Contralto/Memory/MemoryBus.cs b/Contralto/Memory/MemoryBus.cs index e370d78..653b801 100644 --- a/Contralto/Memory/MemoryBus.cs +++ b/Contralto/Memory/MemoryBus.cs @@ -185,7 +185,7 @@ namespace Contralto.Memory case 5: // Single word read - Log.Write(LogType.Verbose, LogComponent.Memory, "Single-word read of {0} from {1} (cycle 5)", Conversion.ToOctal(_memoryData), Conversion.ToOctal(_memoryAddress ^ 1)); + //Log.Write(LogType.Verbose, LogComponent.Memory, "Single-word read of {0} from {1} (cycle 5)", Conversion.ToOctal(_memoryData), Conversion.ToOctal(_memoryAddress ^ 1)); return _memoryData; // *** @@ -205,12 +205,13 @@ namespace Contralto.Memory // If this is memory cycle 6 we will return the last half of the doubleword to complete a double-word read. if (_memoryCycle == 6) { - Log.Write(LogType.Verbose, LogComponent.Memory, "Double-word read of {0} from {1} (cycle 6)", Conversion.ToOctal(_memoryData2), Conversion.ToOctal(_memoryAddress ^ 1)); + + //Log.Write(LogType.Verbose, LogComponent.Memory, "Double-word read of {0} from {1} (cycle 6)", Conversion.ToOctal(_memoryData2), Conversion.ToOctal(_memoryAddress ^ 1)); return _memoryData2; } else - { - Log.Write(LogType.Verbose, LogComponent.Memory, "Single-word read of {0} from {1} (post cycle 6)", Conversion.ToOctal(_memoryData), Conversion.ToOctal(_memoryAddress)); + { + //Log.Write(LogType.Verbose, LogComponent.Memory, "Single-word read of {0} from {1} (post cycle 6)", Conversion.ToOctal(_memoryData), Conversion.ToOctal(_memoryAddress)); return _memoryData; } } @@ -234,23 +235,26 @@ namespace Contralto.Memory WriteToBus(_memoryAddress, data, _task, _extendedMemoryReference); _doubleWordStore = true; + /* Log.Write( LogType.Verbose, LogComponent.Memory, "Single-word store of {0} to {1} (cycle 3)", Conversion.ToOctal(data), - Conversion.ToOctal(_memoryAddress)); + Conversion.ToOctal(_memoryAddress)); */ break; case 4: _memoryData = data; // Only really necessary to show in debugger + + /* Log.Write( LogType.Verbose, LogComponent.Memory, _doubleWordStore ? "Double-word store of {0} to {1} (cycle 4)" : "Single-word store of {0} to {1} (cycle 4)", Conversion.ToOctal(data), _doubleWordStore ? Conversion.ToOctal(_memoryAddress ^ 1) : Conversion.ToOctal(_memoryAddress)); - + */ WriteToBus(_doubleWordStore ? (ushort)(_memoryAddress ^ 1) : _memoryAddress, data, _task, _extendedMemoryReference); break; }