From effd016dc7a6f8738fc0f378cfce841a86f05a40 Mon Sep 17 00:00:00 2001 From: Sour Date: Thu, 13 Feb 2020 00:05:12 -0500 Subject: [PATCH] Debugger: Assembler - Fixed minor issue with opcode $FF --- Core/Assembler.cpp | 2 +- GUI.NET/Debugger/frmAssembler.cs | 34 -------------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/Core/Assembler.cpp b/Core/Assembler.cpp index a2a0b9f4..6ac8ac95 100644 --- a/Core/Assembler.cpp +++ b/Core/Assembler.cpp @@ -324,7 +324,7 @@ void Assembler::AssembleInstruction(LineData &lineData, uint16_t &instructionAdd instructionAddress++; foundMatch = true; } else { - for(uint8_t i = 0; i < 255; i++) { + for(int i = 0; i < 256; i++) { AddrMode opMode = DisassemblyInfo::OPMode[i]; if(lineData.OpCode.compare(opName[i]) == 0) { bool modeMatch = opMode == lineData.Mode; diff --git a/GUI.NET/Debugger/frmAssembler.cs b/GUI.NET/Debugger/frmAssembler.cs index e2e4ac8b..f371c174 100644 --- a/GUI.NET/Debugger/frmAssembler.cs +++ b/GUI.NET/Debugger/frmAssembler.cs @@ -468,38 +468,4 @@ namespace Mesen.GUI.Debugger } } } - - public class ZoomlessRichTextBox : RichTextBox - { - public int NumberOfVisibleLines - { - get - { - int topIndex = this.GetCharIndexFromPosition(new Point(1, 1)); - int bottomIndex = this.GetCharIndexFromPosition(new Point(1, this.Height - 1)); - int topLine = this.GetLineFromCharIndex(topIndex); - int bottomLine = this.GetLineFromCharIndex(bottomIndex); - return bottomLine - topLine + 1; - } - } - - protected override void WndProc(ref Message m) - { - const int WM_SCROLLWHEEL = 0x20A; - - bool ctrl = Control.ModifierKeys.HasFlag(Keys.Control); - bool wheel = m.Msg == WM_SCROLLWHEEL; - - if(!ctrl || !wheel) { - //Block mouse wheel messages - base.WndProc(ref m); - } - } - - protected override void OnKeyDown(KeyEventArgs e) - { - e.SuppressKeyPress = e.Control && e.Shift && (e.KeyValue == (int)Keys.Oemcomma || e.KeyValue == (int)Keys.OemPeriod); - base.OnKeyDown(e); - } - } }