Line 5... |
Line 5... |
#include <iomanip>
|
#include <iomanip>
|
#include <string>
|
#include <string>
|
#include <vcclr.h>
|
#include <vcclr.h>
|
#include <string.h>
|
#include <string.h>
|
#include <math.h>
|
#include <math.h>
|
|
#include "stdafx.h"
|
|
#include "frmRun.h"
|
#include "frmRegisters.h"
|
#include "frmRegisters.h"
|
#include "frmBreakpoints.h"
|
#include "frmBreakpoints.h"
|
#include "frmScreen.h"
|
#include "frmScreen.h"
|
#include "frmKeyboard.h"
|
#include "frmKeyboard.h"
|
#include "frmUart.h"
|
#include "frmUart.h"
|
Line 17... |
Line 19... |
#include "About.h"
|
#include "About.h"
|
//#include "fmrPCS.h"
|
//#include "fmrPCS.h"
|
#include "frmInterrupts.h"
|
#include "frmInterrupts.h"
|
#include "frmStack.h"
|
#include "frmStack.h"
|
#include "frmMemory.h"
|
#include "frmMemory.h"
|
//#include "Disassem.h"
|
|
#include "clsCPU.h"
|
|
#include "clsPIC.h"
|
|
#include "clsDisassem.h"
|
|
|
|
clsDisassem da;
|
clsDisassem da;
|
extern clsSystem system1;
|
extern clsSystem system1;
|
extern unsigned int breakpoints[30];
|
extern unsigned int breakpoints[30];
|
extern unsigned __int64 ibreakpoints[10];
|
extern unsigned __int64 ibreakpoints[10];
|
Line 37... |
Line 35... |
unsigned int stepover_pc;
|
unsigned int stepover_pc;
|
bool animate;
|
bool animate;
|
bool fullspeed;
|
bool fullspeed;
|
bool runstop;
|
bool runstop;
|
|
|
|
bool screenClosed;
|
|
bool dbgScreenClosed;
|
|
bool keyboardClosed;
|
|
|
namespace emuThor {
|
namespace emuThor {
|
|
|
using namespace System;
|
using namespace System;
|
using namespace System::ComponentModel;
|
using namespace System::ComponentModel;
|
using namespace System::Collections;
|
using namespace System::Collections;
|
Line 67... |
Line 69... |
stepout = false;
|
stepout = false;
|
stepover = false;
|
stepover = false;
|
animate = false;
|
animate = false;
|
isRunning = false;
|
isRunning = false;
|
mut = gcnew Mutex(false, "emuThor");
|
mut = gcnew Mutex(false, "emuThor");
|
frmKeyboard^ keyboardFrm = gcnew frmKeyboard(mut);
|
registersFrm = nullptr;
|
|
memoryFrm = nullptr;
|
|
stackFrm = nullptr;
|
|
interruptsFrm = nullptr;
|
|
PCHistoryFrm = nullptr;
|
|
breakpointsFrm = nullptr;
|
|
keyboardFrm = gcnew frmKeyboard(mut);
|
keyboardFrm->Show();
|
keyboardFrm->Show();
|
frmScreen^ screenFrm = gcnew frmScreen(mut, "Main Screen");
|
screenClosed = false;
|
|
dbgScreenClosed = false;
|
|
screenFrm = gcnew frmScreen(mut, "Main Screen");
|
|
mut->WaitOne();
|
screenFrm->pVidMem = &system1.VideoMem[0];
|
screenFrm->pVidMem = &system1.VideoMem[0];
|
screenFrm->pVidDirty = &system1.VideoMemDirty[0];
|
screenFrm->pVidDirty = &system1.VideoMemDirty[0];
|
|
screenFrm->which = 0;
|
|
mut->ReleaseMutex();
|
screenFrm->Show();
|
screenFrm->Show();
|
frmScreen^ DBGScreenFrm = gcnew frmScreen(mut, "Debug Screen");
|
DBGScreenFrm = gcnew frmScreen(mut, "Debug Screen");
|
|
mut->WaitOne();
|
DBGScreenFrm->pVidMem = &system1.DBGVideoMem[0];
|
DBGScreenFrm->pVidMem = &system1.DBGVideoMem[0];
|
DBGScreenFrm->pVidDirty = &system1.DBGVideoMemDirty[0];
|
DBGScreenFrm->pVidDirty = &system1.DBGVideoMemDirty[0];
|
|
DBGScreenFrm->which = 1;
|
|
mut->ReleaseMutex();
|
DBGScreenFrm->Show();
|
DBGScreenFrm->Show();
|
frmUart^ uartFrm = gcnew frmUart(mut);
|
uartFrm = gcnew frmUart(mut);
|
|
uartFrm->MdiParent = this;
|
uartFrm->Show();
|
uartFrm->Show();
|
uartFrm->WindowState = FormWindowState::Minimized;
|
uartFrm->WindowState = FormWindowState::Minimized;
|
|
runFrm = gcnew frmRun(mut);
|
|
runFrm->MdiParent = this;
|
|
runFrm->WindowState = FormWindowState::Maximized;
|
|
runFrm->Show();
|
// myThreadDelegate = gcnew ThreadStart(this, &frmMain::Run);
|
// myThreadDelegate = gcnew ThreadStart(this, &frmMain::Run);
|
// myThread = gcnew Thread(myThreadDelegate);
|
// myThread = gcnew Thread(myThreadDelegate);
|
// myThread->Start();
|
// myThread->Start();
|
|
|
// this->SetStyle(ControlStyles::AllPaintingInWmPaint |
|
// this->SetStyle(ControlStyles::AllPaintingInWmPaint |
|
Line 106... |
Line 127... |
private: System::Windows::Forms::MenuStrip^ menuStrip1;
|
private: System::Windows::Forms::MenuStrip^ menuStrip1;
|
protected:
|
protected:
|
private: System::Windows::Forms::ToolStripMenuItem^ viewToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ viewToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ registersToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ registersToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ runToolStripMenuItem;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem;
|
private: System::Windows::Forms::ToolStrip^ toolStrip1;
|
private: System::Windows::Forms::ToolStrip^ toolStrip1;
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton1;
|
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton2;
|
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton3;
|
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton4;
|
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton5;
|
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton6;
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton6;
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton7;
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton7;
|
private: System::Windows::Forms::ToolStripMenuItem^ loadINTELHexFIleToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ loadINTELHexFIleToolStripMenuItem;
|
private: System::Windows::Forms::OpenFileDialog^ openFileDialog1;
|
private: System::Windows::Forms::OpenFileDialog^ openFileDialog1;
|
private: System::Windows::Forms::Label^ lblChecksumError;
|
private: System::Windows::Forms::Label^ lblChecksumError;
|
private: System::Windows::Forms::ToolStripMenuItem^ memoryToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ memoryToolStripMenuItem;
|
private: System::Windows::Forms::PictureBox^ pictureBox1;
|
private: System::Windows::Forms::PictureBox^ pictureBox1;
|
private: System::Windows::Forms::ListBox^ listBoxAdr;
|
|
private: System::Windows::Forms::ListBox^ listBoxBytes;
|
|
private: System::Windows::Forms::ListBox^ listBoxCode;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ stepToolStripMenuItem;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ resetToolStripMenuItem;
|
|
private: System::Windows::Forms::Label^ lblLEDS;
|
private: System::Windows::Forms::Label^ lblLEDS;
|
private: System::Windows::Forms::ToolStripMenuItem^ breakpointsToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ breakpointsToolStripMenuItem;
|
private: ThreadStart^ myThreadDelegate;
|
private: ThreadStart^ myThreadDelegate;
|
private: Thread^ myThread;
|
private: Thread^ myThread;
|
private: System::Windows::Forms::ToolStripMenuItem^ fullSpeedToolStripMenuItem;
|
|
private: System::Windows::Forms::Timer^ timer1;
|
private: System::Windows::Forms::Timer^ timer1;
|
private: System::Windows::Forms::ToolStripMenuItem^ animateFastToolStripMenuItem;
|
|
private: System::Windows::Forms::TrackBar^ trackBar1;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ freeRunToolStripMenuItem;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ stackToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ stackToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ interruptToolStripMenuItem;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ pCHistoryToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ pCHistoryToolStripMenuItem;
|
private: System::ComponentModel::BackgroundWorker^ backgroundWorker1;
|
private: System::ComponentModel::BackgroundWorker^ backgroundWorker1;
|
private: Mutex^ mut;
|
private: Mutex^ mut;
|
private: System::Windows::Forms::ToolStripButton^ toolStripButton8;
|
private: frmKeyboard^ keyboardFrm;
|
|
private: frmScreen^ screenFrm;
|
|
private: frmScreen^ DBGScreenFrm;
|
|
private: frmRun^ runFrm;
|
|
private: frmRegisters^ registersFrm;
|
|
private: frmMemory^ memoryFrm;
|
|
private: frmStack^ stackFrm;
|
|
private: frmInterrupts^ interruptsFrm;
|
|
private: frmPCHistory^ PCHistoryFrm;
|
|
private: frmBreakpoints^ breakpointsFrm;
|
|
private: frmUart^ uartFrm;
|
|
|
private: System::Windows::Forms::ToolStripMenuItem^ keyboardToolStripMenuItem;
|
private: System::Windows::Forms::ToolStripMenuItem^ keyboardToolStripMenuItem;
|
private: System::Windows::Forms::Timer^ timer30;
|
private: System::Windows::Forms::Timer^ timer30;
|
private: System::Windows::Forms::Timer^ timer1024;
|
private: System::Windows::Forms::Timer^ timer1024;
|
|
|
|
|
|
private: System::Windows::Forms::ToolStripMenuItem^ screenToolStripMenuItem;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ debugScreenToolStripMenuItem;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ runToolStripMenuItem1;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ interruptsToolStripMenuItem;
|
|
private: System::Windows::Forms::ToolStripMenuItem^ uartToolStripMenuItem;
|
|
private: System::Windows::Forms::PictureBox^ pictureBox2;
|
|
|
|
|
private: System::ComponentModel::IContainer^ components;
|
private: System::ComponentModel::IContainer^ components;
|
private:
|
private:
|
/// <summary>
|
/// <summary>
|
/// Required designer variable.
|
/// Required designer variable.
|
/// </summary>
|
/// </summary>
|
Line 164... |
Line 205... |
this->components = (gcnew System::ComponentModel::Container());
|
this->components = (gcnew System::ComponentModel::Container());
|
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(frmMain::typeid));
|
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(frmMain::typeid));
|
this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
|
this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
|
this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->loadINTELHexFIleToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->loadINTELHexFIleToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->runToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->resetToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->stepToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->fullSpeedToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->animateFastToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->freeRunToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->interruptToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->viewToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->viewToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->registersToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->registersToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->memoryToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->memoryToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->breakpointsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->breakpointsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->interruptsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stackToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stackToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->pCHistoryToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->pCHistoryToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->keyboardToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->keyboardToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->screenToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->debugScreenToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->uartToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
this->runToolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->toolStrip1 = (gcnew System::Windows::Forms::ToolStrip());
|
this->toolStrip1 = (gcnew System::Windows::Forms::ToolStrip());
|
this->toolStripButton1 = (gcnew System::Windows::Forms::ToolStripButton());
|
|
this->toolStripButton2 = (gcnew System::Windows::Forms::ToolStripButton());
|
|
this->toolStripButton3 = (gcnew System::Windows::Forms::ToolStripButton());
|
|
this->toolStripButton4 = (gcnew System::Windows::Forms::ToolStripButton());
|
|
this->toolStripButton5 = (gcnew System::Windows::Forms::ToolStripButton());
|
|
this->toolStripButton6 = (gcnew System::Windows::Forms::ToolStripButton());
|
this->toolStripButton6 = (gcnew System::Windows::Forms::ToolStripButton());
|
this->toolStripButton7 = (gcnew System::Windows::Forms::ToolStripButton());
|
this->toolStripButton7 = (gcnew System::Windows::Forms::ToolStripButton());
|
this->toolStripButton8 = (gcnew System::Windows::Forms::ToolStripButton());
|
|
this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
|
this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
|
this->lblChecksumError = (gcnew System::Windows::Forms::Label());
|
this->lblChecksumError = (gcnew System::Windows::Forms::Label());
|
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
|
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
|
this->listBoxAdr = (gcnew System::Windows::Forms::ListBox());
|
|
this->listBoxBytes = (gcnew System::Windows::Forms::ListBox());
|
|
this->listBoxCode = (gcnew System::Windows::Forms::ListBox());
|
|
this->lblLEDS = (gcnew System::Windows::Forms::Label());
|
this->lblLEDS = (gcnew System::Windows::Forms::Label());
|
this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
|
this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
|
this->trackBar1 = (gcnew System::Windows::Forms::TrackBar());
|
|
this->backgroundWorker1 = (gcnew System::ComponentModel::BackgroundWorker());
|
this->backgroundWorker1 = (gcnew System::ComponentModel::BackgroundWorker());
|
this->timer30 = (gcnew System::Windows::Forms::Timer(this->components));
|
this->timer30 = (gcnew System::Windows::Forms::Timer(this->components));
|
this->timer1024 = (gcnew System::Windows::Forms::Timer(this->components));
|
this->timer1024 = (gcnew System::Windows::Forms::Timer(this->components));
|
|
this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
|
this->menuStrip1->SuspendLayout();
|
this->menuStrip1->SuspendLayout();
|
this->toolStrip1->SuspendLayout();
|
this->toolStrip1->SuspendLayout();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar1))->BeginInit();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->BeginInit();
|
this->SuspendLayout();
|
this->SuspendLayout();
|
//
|
//
|
// menuStrip1
|
// menuStrip1
|
//
|
//
|
this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(4) {this->fileToolStripMenuItem,
|
this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->fileToolStripMenuItem,
|
this->runToolStripMenuItem, this->viewToolStripMenuItem, this->aboutToolStripMenuItem});
|
this->viewToolStripMenuItem, this->aboutToolStripMenuItem});
|
this->menuStrip1->Location = System::Drawing::Point(0, 0);
|
this->menuStrip1->Location = System::Drawing::Point(0, 0);
|
this->menuStrip1->Name = L"menuStrip1";
|
this->menuStrip1->Name = L"menuStrip1";
|
this->menuStrip1->Size = System::Drawing::Size(684, 24);
|
this->menuStrip1->Size = System::Drawing::Size(911, 24);
|
this->menuStrip1->TabIndex = 0;
|
this->menuStrip1->TabIndex = 0;
|
this->menuStrip1->Text = L"menuStrip1";
|
this->menuStrip1->Text = L"menuStrip1";
|
//
|
//
|
// fileToolStripMenuItem
|
// fileToolStripMenuItem
|
//
|
//
|
Line 230... |
Line 260... |
this->loadINTELHexFIleToolStripMenuItem->Name = L"loadINTELHexFIleToolStripMenuItem";
|
this->loadINTELHexFIleToolStripMenuItem->Name = L"loadINTELHexFIleToolStripMenuItem";
|
this->loadINTELHexFIleToolStripMenuItem->Size = System::Drawing::Size(178, 22);
|
this->loadINTELHexFIleToolStripMenuItem->Size = System::Drawing::Size(178, 22);
|
this->loadINTELHexFIleToolStripMenuItem->Text = L"&Load INTEL Hex FIle";
|
this->loadINTELHexFIleToolStripMenuItem->Text = L"&Load INTEL Hex FIle";
|
this->loadINTELHexFIleToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::loadINTELHexFIleToolStripMenuItem_Click);
|
this->loadINTELHexFIleToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::loadINTELHexFIleToolStripMenuItem_Click);
|
//
|
//
|
// runToolStripMenuItem
|
|
//
|
|
this->runToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(6) {this->resetToolStripMenuItem,
|
|
this->stepToolStripMenuItem, this->fullSpeedToolStripMenuItem, this->animateFastToolStripMenuItem, this->freeRunToolStripMenuItem,
|
|
this->interruptToolStripMenuItem});
|
|
this->runToolStripMenuItem->Name = L"runToolStripMenuItem";
|
|
this->runToolStripMenuItem->Size = System::Drawing::Size(40, 20);
|
|
this->runToolStripMenuItem->Text = L"&Run";
|
|
//
|
|
// resetToolStripMenuItem
|
|
//
|
|
this->resetToolStripMenuItem->Name = L"resetToolStripMenuItem";
|
|
this->resetToolStripMenuItem->Size = System::Drawing::Size(143, 22);
|
|
this->resetToolStripMenuItem->Text = L"&Reset";
|
|
this->resetToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::resetToolStripMenuItem_Click);
|
|
//
|
|
// stepToolStripMenuItem
|
|
//
|
|
this->stepToolStripMenuItem->Name = L"stepToolStripMenuItem";
|
|
this->stepToolStripMenuItem->Size = System::Drawing::Size(143, 22);
|
|
this->stepToolStripMenuItem->Text = L"&Step";
|
|
this->stepToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::stepToolStripMenuItem_Click);
|
|
//
|
|
// fullSpeedToolStripMenuItem
|
|
//
|
|
this->fullSpeedToolStripMenuItem->Name = L"fullSpeedToolStripMenuItem";
|
|
this->fullSpeedToolStripMenuItem->Size = System::Drawing::Size(143, 22);
|
|
this->fullSpeedToolStripMenuItem->Text = L"&Full Speed";
|
|
this->fullSpeedToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::fullSpeedToolStripMenuItem_Click);
|
|
//
|
|
// animateFastToolStripMenuItem
|
|
//
|
|
this->animateFastToolStripMenuItem->Name = L"animateFastToolStripMenuItem";
|
|
this->animateFastToolStripMenuItem->Size = System::Drawing::Size(143, 22);
|
|
this->animateFastToolStripMenuItem->Text = L"&Animate Fast";
|
|
this->animateFastToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::animateFastToolStripMenuItem_Click);
|
|
//
|
|
// freeRunToolStripMenuItem
|
|
//
|
|
this->freeRunToolStripMenuItem->Name = L"freeRunToolStripMenuItem";
|
|
this->freeRunToolStripMenuItem->Size = System::Drawing::Size(143, 22);
|
|
this->freeRunToolStripMenuItem->Text = L"Free Run";
|
|
this->freeRunToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::freeRunToolStripMenuItem_Click);
|
|
//
|
|
// interruptToolStripMenuItem
|
|
//
|
|
this->interruptToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"interruptToolStripMenuItem.Image")));
|
|
this->interruptToolStripMenuItem->Name = L"interruptToolStripMenuItem";
|
|
this->interruptToolStripMenuItem->Size = System::Drawing::Size(143, 22);
|
|
this->interruptToolStripMenuItem->Text = L"&Interrupt";
|
|
this->interruptToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::interruptToolStripMenuItem_Click);
|
|
//
|
|
// viewToolStripMenuItem
|
// viewToolStripMenuItem
|
//
|
//
|
this->viewToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(6) {this->registersToolStripMenuItem,
|
this->viewToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(11) {this->registersToolStripMenuItem,
|
this->memoryToolStripMenuItem, this->breakpointsToolStripMenuItem, this->stackToolStripMenuItem, this->pCHistoryToolStripMenuItem,
|
this->memoryToolStripMenuItem, this->breakpointsToolStripMenuItem, this->interruptsToolStripMenuItem, this->stackToolStripMenuItem,
|
this->keyboardToolStripMenuItem});
|
this->pCHistoryToolStripMenuItem, this->keyboardToolStripMenuItem, this->screenToolStripMenuItem, this->debugScreenToolStripMenuItem,
|
|
this->uartToolStripMenuItem, this->runToolStripMenuItem1});
|
this->viewToolStripMenuItem->Name = L"viewToolStripMenuItem";
|
this->viewToolStripMenuItem->Name = L"viewToolStripMenuItem";
|
this->viewToolStripMenuItem->Size = System::Drawing::Size(44, 20);
|
this->viewToolStripMenuItem->Size = System::Drawing::Size(44, 20);
|
this->viewToolStripMenuItem->Text = L"&View";
|
this->viewToolStripMenuItem->Text = L"&View";
|
//
|
//
|
// registersToolStripMenuItem
|
// registersToolStripMenuItem
|
//
|
//
|
this->registersToolStripMenuItem->Name = L"registersToolStripMenuItem";
|
this->registersToolStripMenuItem->Name = L"registersToolStripMenuItem";
|
this->registersToolStripMenuItem->Size = System::Drawing::Size(136, 22);
|
this->registersToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
this->registersToolStripMenuItem->Text = L"&Registers";
|
this->registersToolStripMenuItem->Text = L"&Registers";
|
this->registersToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::registersToolStripMenuItem_Click);
|
this->registersToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::registersToolStripMenuItem_Click);
|
//
|
//
|
// memoryToolStripMenuItem
|
// memoryToolStripMenuItem
|
//
|
//
|
this->memoryToolStripMenuItem->Name = L"memoryToolStripMenuItem";
|
this->memoryToolStripMenuItem->Name = L"memoryToolStripMenuItem";
|
this->memoryToolStripMenuItem->Size = System::Drawing::Size(136, 22);
|
this->memoryToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
this->memoryToolStripMenuItem->Text = L"&Memory";
|
this->memoryToolStripMenuItem->Text = L"&Memory";
|
this->memoryToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::memoryToolStripMenuItem_Click);
|
this->memoryToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::memoryToolStripMenuItem_Click);
|
//
|
//
|
// breakpointsToolStripMenuItem
|
// breakpointsToolStripMenuItem
|
//
|
//
|
|
this->breakpointsToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"breakpointsToolStripMenuItem.Image")));
|
this->breakpointsToolStripMenuItem->Name = L"breakpointsToolStripMenuItem";
|
this->breakpointsToolStripMenuItem->Name = L"breakpointsToolStripMenuItem";
|
this->breakpointsToolStripMenuItem->Size = System::Drawing::Size(136, 22);
|
this->breakpointsToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
this->breakpointsToolStripMenuItem->Text = L"&Breakpoints";
|
this->breakpointsToolStripMenuItem->Text = L"&Breakpoints";
|
this->breakpointsToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::breakpointsToolStripMenuItem_Click);
|
this->breakpointsToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::breakpointsToolStripMenuItem_Click);
|
//
|
//
|
|
// interruptsToolStripMenuItem
|
|
//
|
|
this->interruptsToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"interruptsToolStripMenuItem.Image")));
|
|
this->interruptsToolStripMenuItem->Name = L"interruptsToolStripMenuItem";
|
|
this->interruptsToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
|
this->interruptsToolStripMenuItem->Text = L"&Interrupts - PIC";
|
|
this->interruptsToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::interruptsToolStripMenuItem_Click);
|
|
//
|
// stackToolStripMenuItem
|
// stackToolStripMenuItem
|
//
|
//
|
this->stackToolStripMenuItem->Name = L"stackToolStripMenuItem";
|
this->stackToolStripMenuItem->Name = L"stackToolStripMenuItem";
|
this->stackToolStripMenuItem->Size = System::Drawing::Size(136, 22);
|
this->stackToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
this->stackToolStripMenuItem->Text = L"&Stack";
|
this->stackToolStripMenuItem->Text = L"&Stack";
|
this->stackToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::stackToolStripMenuItem_Click);
|
this->stackToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::stackToolStripMenuItem_Click);
|
//
|
//
|
// pCHistoryToolStripMenuItem
|
// pCHistoryToolStripMenuItem
|
//
|
//
|
this->pCHistoryToolStripMenuItem->Name = L"pCHistoryToolStripMenuItem";
|
this->pCHistoryToolStripMenuItem->Name = L"pCHistoryToolStripMenuItem";
|
this->pCHistoryToolStripMenuItem->Size = System::Drawing::Size(136, 22);
|
this->pCHistoryToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
this->pCHistoryToolStripMenuItem->Text = L"&PC History";
|
this->pCHistoryToolStripMenuItem->Text = L"&PC History";
|
this->pCHistoryToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::pCHistoryToolStripMenuItem_Click);
|
this->pCHistoryToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::pCHistoryToolStripMenuItem_Click);
|
//
|
//
|
// keyboardToolStripMenuItem
|
// keyboardToolStripMenuItem
|
//
|
//
|
this->keyboardToolStripMenuItem->Name = L"keyboardToolStripMenuItem";
|
this->keyboardToolStripMenuItem->Name = L"keyboardToolStripMenuItem";
|
this->keyboardToolStripMenuItem->Size = System::Drawing::Size(136, 22);
|
this->keyboardToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
this->keyboardToolStripMenuItem->Text = L"&Keyboard";
|
this->keyboardToolStripMenuItem->Text = L"&Keyboard";
|
this->keyboardToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::keyboardToolStripMenuItem_Click);
|
this->keyboardToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::keyboardToolStripMenuItem_Click);
|
//
|
//
|
|
// screenToolStripMenuItem
|
|
//
|
|
this->screenToolStripMenuItem->Name = L"screenToolStripMenuItem";
|
|
this->screenToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
|
this->screenToolStripMenuItem->Text = L"Screen";
|
|
this->screenToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::screenToolStripMenuItem_Click);
|
|
//
|
|
// debugScreenToolStripMenuItem
|
|
//
|
|
this->debugScreenToolStripMenuItem->Name = L"debugScreenToolStripMenuItem";
|
|
this->debugScreenToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
|
this->debugScreenToolStripMenuItem->Text = L"Debug Screen";
|
|
this->debugScreenToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::debugScreenToolStripMenuItem_Click);
|
|
//
|
|
// uartToolStripMenuItem
|
|
//
|
|
this->uartToolStripMenuItem->Name = L"uartToolStripMenuItem";
|
|
this->uartToolStripMenuItem->Size = System::Drawing::Size(154, 22);
|
|
this->uartToolStripMenuItem->Text = L"&Uart";
|
|
this->uartToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::uartToolStripMenuItem_Click);
|
|
//
|
|
// runToolStripMenuItem1
|
|
//
|
|
this->runToolStripMenuItem1->Name = L"runToolStripMenuItem1";
|
|
this->runToolStripMenuItem1->Size = System::Drawing::Size(154, 22);
|
|
this->runToolStripMenuItem1->Text = L"Run";
|
|
this->runToolStripMenuItem1->Click += gcnew System::EventHandler(this, &frmMain::runToolStripMenuItem1_Click);
|
|
//
|
// aboutToolStripMenuItem
|
// aboutToolStripMenuItem
|
//
|
//
|
this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem";
|
this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem";
|
this->aboutToolStripMenuItem->Size = System::Drawing::Size(52, 20);
|
this->aboutToolStripMenuItem->Size = System::Drawing::Size(52, 20);
|
this->aboutToolStripMenuItem->Text = L"&About";
|
this->aboutToolStripMenuItem->Text = L"&About";
|
this->aboutToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::aboutToolStripMenuItem_Click);
|
this->aboutToolStripMenuItem->Click += gcnew System::EventHandler(this, &frmMain::aboutToolStripMenuItem_Click);
|
//
|
//
|
// toolStrip1
|
// toolStrip1
|
//
|
//
|
this->toolStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(8) {this->toolStripButton1,
|
this->toolStrip1->Dock = System::Windows::Forms::DockStyle::None;
|
this->toolStripButton2, this->toolStripButton3, this->toolStripButton4, this->toolStripButton5, this->toolStripButton6, this->toolStripButton7,
|
this->toolStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->toolStripButton6,
|
this->toolStripButton8});
|
this->toolStripButton7});
|
this->toolStrip1->Location = System::Drawing::Point(0, 24);
|
this->toolStrip1->Location = System::Drawing::Point(12, 32);
|
this->toolStrip1->Name = L"toolStrip1";
|
this->toolStrip1->Name = L"toolStrip1";
|
this->toolStrip1->Size = System::Drawing::Size(684, 25);
|
this->toolStrip1->Size = System::Drawing::Size(58, 25);
|
this->toolStrip1->TabIndex = 1;
|
this->toolStrip1->TabIndex = 1;
|
this->toolStrip1->Text = L"toolStrip1";
|
this->toolStrip1->Text = L"toolStrip1";
|
//
|
//
|
// toolStripButton1
|
|
//
|
|
this->toolStripButton1->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
|
this->toolStripButton1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton1.Image")));
|
|
this->toolStripButton1->ImageTransparentColor = System::Drawing::Color::Magenta;
|
|
this->toolStripButton1->Name = L"toolStripButton1";
|
|
this->toolStripButton1->Size = System::Drawing::Size(23, 22);
|
|
this->toolStripButton1->Text = L"Step Into";
|
|
this->toolStripButton1->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton1_Click);
|
|
//
|
|
// toolStripButton2
|
|
//
|
|
this->toolStripButton2->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
|
this->toolStripButton2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton2.Image")));
|
|
this->toolStripButton2->ImageTransparentColor = System::Drawing::Color::Magenta;
|
|
this->toolStripButton2->Name = L"toolStripButton2";
|
|
this->toolStripButton2->Size = System::Drawing::Size(23, 22);
|
|
this->toolStripButton2->Text = L"Step Over (Bounce)";
|
|
this->toolStripButton2->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton2_Click);
|
|
//
|
|
// toolStripButton3
|
|
//
|
|
this->toolStripButton3->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
|
this->toolStripButton3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton3.Image")));
|
|
this->toolStripButton3->ImageTransparentColor = System::Drawing::Color::Magenta;
|
|
this->toolStripButton3->Name = L"toolStripButton3";
|
|
this->toolStripButton3->Size = System::Drawing::Size(23, 22);
|
|
this->toolStripButton3->Text = L"Step Out Of";
|
|
this->toolStripButton3->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton3_Click);
|
|
//
|
|
// toolStripButton4
|
|
//
|
|
this->toolStripButton4->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
|
this->toolStripButton4->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton4.Image")));
|
|
this->toolStripButton4->ImageTransparentColor = System::Drawing::Color::Magenta;
|
|
this->toolStripButton4->Name = L"toolStripButton4";
|
|
this->toolStripButton4->Size = System::Drawing::Size(23, 22);
|
|
this->toolStripButton4->Text = L"Run";
|
|
this->toolStripButton4->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton4_Click);
|
|
//
|
|
// toolStripButton5
|
|
//
|
|
this->toolStripButton5->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
|
this->toolStripButton5->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton5.Image")));
|
|
this->toolStripButton5->ImageTransparentColor = System::Drawing::Color::Magenta;
|
|
this->toolStripButton5->Name = L"toolStripButton5";
|
|
this->toolStripButton5->Size = System::Drawing::Size(23, 22);
|
|
this->toolStripButton5->Text = L"Stop";
|
|
this->toolStripButton5->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton5_Click);
|
|
//
|
|
// toolStripButton6
|
// toolStripButton6
|
//
|
//
|
this->toolStripButton6->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
this->toolStripButton6->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
this->toolStripButton6->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton6.Image")));
|
this->toolStripButton6->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton6.Image")));
|
this->toolStripButton6->ImageTransparentColor = System::Drawing::Color::Magenta;
|
this->toolStripButton6->ImageTransparentColor = System::Drawing::Color::Magenta;
|
Line 421... |
Line 387... |
this->toolStripButton7->Name = L"toolStripButton7";
|
this->toolStripButton7->Name = L"toolStripButton7";
|
this->toolStripButton7->Size = System::Drawing::Size(23, 22);
|
this->toolStripButton7->Size = System::Drawing::Size(23, 22);
|
this->toolStripButton7->Text = L"Breakpoints";
|
this->toolStripButton7->Text = L"Breakpoints";
|
this->toolStripButton7->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton7_Click);
|
this->toolStripButton7->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton7_Click);
|
//
|
//
|
// toolStripButton8
|
|
//
|
|
this->toolStripButton8->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
|
|
this->toolStripButton8->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton8.Image")));
|
|
this->toolStripButton8->ImageTransparentColor = System::Drawing::Color::Magenta;
|
|
this->toolStripButton8->Name = L"toolStripButton8";
|
|
this->toolStripButton8->Size = System::Drawing::Size(23, 22);
|
|
this->toolStripButton8->Text = L"Reset Button";
|
|
this->toolStripButton8->Click += gcnew System::EventHandler(this, &frmMain::toolStripButton8_Click);
|
|
//
|
|
// openFileDialog1
|
// openFileDialog1
|
//
|
//
|
this->openFileDialog1->DefaultExt = L"hex";
|
this->openFileDialog1->DefaultExt = L"hex";
|
this->openFileDialog1->FileName = L"boot";
|
this->openFileDialog1->FileName = L"boot";
|
this->openFileDialog1->Filter = L"\"INTEL Hex Files|*.hex|All Files|*.*\"";
|
this->openFileDialog1->Filter = L"\"INTEL Hex Files|*.hex|All Files|*.*\"";
|
Line 442... |
Line 398... |
//
|
//
|
// lblChecksumError
|
// lblChecksumError
|
//
|
//
|
this->lblChecksumError->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
|
this->lblChecksumError->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
|
this->lblChecksumError->AutoSize = true;
|
this->lblChecksumError->AutoSize = true;
|
this->lblChecksumError->Location = System::Drawing::Point(75, 557);
|
this->lblChecksumError->Location = System::Drawing::Point(195, 655);
|
this->lblChecksumError->Name = L"lblChecksumError";
|
this->lblChecksumError->Name = L"lblChecksumError";
|
this->lblChecksumError->Size = System::Drawing::Size(35, 13);
|
this->lblChecksumError->Size = System::Drawing::Size(35, 13);
|
this->lblChecksumError->TabIndex = 2;
|
this->lblChecksumError->TabIndex = 2;
|
this->lblChecksumError->Text = L"label1";
|
this->lblChecksumError->Text = L"label1";
|
//
|
//
|
// pictureBox1
|
// pictureBox1
|
//
|
//
|
this->pictureBox1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
|
this->pictureBox1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
|
this->pictureBox1->Location = System::Drawing::Point(12, 542);
|
this->pictureBox1->Location = System::Drawing::Point(12, 640);
|
this->pictureBox1->Name = L"pictureBox1";
|
this->pictureBox1->Name = L"pictureBox1";
|
this->pictureBox1->Size = System::Drawing::Size(218, 12);
|
this->pictureBox1->Size = System::Drawing::Size(218, 12);
|
this->pictureBox1->TabIndex = 3;
|
this->pictureBox1->TabIndex = 3;
|
this->pictureBox1->TabStop = false;
|
this->pictureBox1->TabStop = false;
|
this->pictureBox1->Click += gcnew System::EventHandler(this, &frmMain::pictureBox1_Click);
|
this->pictureBox1->Click += gcnew System::EventHandler(this, &frmMain::pictureBox1_Click);
|
this->pictureBox1->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &frmMain::pictureBox1_Paint);
|
this->pictureBox1->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &frmMain::pictureBox1_Paint);
|
//
|
//
|
// listBoxAdr
|
|
//
|
|
this->listBoxAdr->FormattingEnabled = true;
|
|
this->listBoxAdr->Location = System::Drawing::Point(12, 83);
|
|
this->listBoxAdr->Name = L"listBoxAdr";
|
|
this->listBoxAdr->Size = System::Drawing::Size(71, 433);
|
|
this->listBoxAdr->TabIndex = 4;
|
|
//
|
|
// listBoxBytes
|
|
//
|
|
this->listBoxBytes->FormattingEnabled = true;
|
|
this->listBoxBytes->Location = System::Drawing::Point(89, 83);
|
|
this->listBoxBytes->Name = L"listBoxBytes";
|
|
this->listBoxBytes->Size = System::Drawing::Size(141, 433);
|
|
this->listBoxBytes->TabIndex = 5;
|
|
//
|
|
// listBoxCode
|
|
//
|
|
this->listBoxCode->FormattingEnabled = true;
|
|
this->listBoxCode->Location = System::Drawing::Point(236, 83);
|
|
this->listBoxCode->Name = L"listBoxCode";
|
|
this->listBoxCode->Size = System::Drawing::Size(327, 433);
|
|
this->listBoxCode->TabIndex = 6;
|
|
//
|
|
// lblLEDS
|
// lblLEDS
|
//
|
//
|
this->lblLEDS->AutoSize = true;
|
this->lblLEDS->AutoSize = true;
|
this->lblLEDS->Location = System::Drawing::Point(271, 542);
|
this->lblLEDS->Location = System::Drawing::Point(255, 639);
|
this->lblLEDS->Name = L"lblLEDS";
|
this->lblLEDS->Name = L"lblLEDS";
|
this->lblLEDS->Size = System::Drawing::Size(40, 13);
|
this->lblLEDS->Size = System::Drawing::Size(31, 13);
|
this->lblLEDS->TabIndex = 7;
|
this->lblLEDS->TabIndex = 7;
|
this->lblLEDS->Text = L"lblLeds";
|
this->lblLEDS->Text = L"0000";
|
|
this->lblLEDS->Visible = false;
|
//
|
//
|
// timer1
|
// timer1
|
//
|
//
|
this->timer1->Enabled = true;
|
this->timer1->Enabled = true;
|
this->timer1->Tick += gcnew System::EventHandler(this, &frmMain::timer1_Tick);
|
this->timer1->Tick += gcnew System::EventHandler(this, &frmMain::timer1_Tick);
|
//
|
//
|
// trackBar1
|
|
//
|
|
this->trackBar1->Location = System::Drawing::Point(426, 32);
|
|
this->trackBar1->Maximum = 999999;
|
|
this->trackBar1->Minimum = 3;
|
|
this->trackBar1->Name = L"trackBar1";
|
|
this->trackBar1->Size = System::Drawing::Size(137, 45);
|
|
this->trackBar1->TabIndex = 8;
|
|
this->trackBar1->TickStyle = System::Windows::Forms::TickStyle::TopLeft;
|
|
this->trackBar1->Value = 10000;
|
|
this->trackBar1->Scroll += gcnew System::EventHandler(this, &frmMain::trackBar1_Scroll);
|
|
//
|
|
// timer30
|
// timer30
|
//
|
//
|
this->timer30->Tick += gcnew System::EventHandler(this, &frmMain::timer30_Tick);
|
this->timer30->Tick += gcnew System::EventHandler(this, &frmMain::timer30_Tick);
|
//
|
//
|
// timer1024
|
// timer1024
|
//
|
//
|
this->timer1024->Tick += gcnew System::EventHandler(this, &frmMain::timer1024_Tick);
|
this->timer1024->Tick += gcnew System::EventHandler(this, &frmMain::timer1024_Tick);
|
//
|
//
|
|
// pictureBox2
|
|
//
|
|
this->pictureBox2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left));
|
|
this->pictureBox2->Location = System::Drawing::Point(305, 631);
|
|
this->pictureBox2->Name = L"pictureBox2";
|
|
this->pictureBox2->Size = System::Drawing::Size(172, 38);
|
|
this->pictureBox2->TabIndex = 9;
|
|
this->pictureBox2->TabStop = false;
|
|
this->pictureBox2->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &frmMain::pictureBox2_Paint);
|
|
//
|
// frmMain
|
// frmMain
|
//
|
//
|
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
this->ClientSize = System::Drawing::Size(684, 583);
|
this->ClientSize = System::Drawing::Size(911, 681);
|
this->Controls->Add(this->trackBar1);
|
this->Controls->Add(this->pictureBox2);
|
|
this->Controls->Add(this->toolStrip1);
|
this->Controls->Add(this->lblLEDS);
|
this->Controls->Add(this->lblLEDS);
|
this->Controls->Add(this->listBoxCode);
|
|
this->Controls->Add(this->listBoxBytes);
|
|
this->Controls->Add(this->listBoxAdr);
|
|
this->Controls->Add(this->pictureBox1);
|
this->Controls->Add(this->pictureBox1);
|
this->Controls->Add(this->lblChecksumError);
|
this->Controls->Add(this->lblChecksumError);
|
this->Controls->Add(this->toolStrip1);
|
|
this->Controls->Add(this->menuStrip1);
|
this->Controls->Add(this->menuStrip1);
|
|
this->IsMdiContainer = true;
|
this->MainMenuStrip = this->menuStrip1;
|
this->MainMenuStrip = this->menuStrip1;
|
this->Name = L"frmMain";
|
this->Name = L"frmMain";
|
this->Text = L"Thor ISA Emulator";
|
this->Text = L"Thor ISA Emulator";
|
this->menuStrip1->ResumeLayout(false);
|
this->menuStrip1->ResumeLayout(false);
|
this->menuStrip1->PerformLayout();
|
this->menuStrip1->PerformLayout();
|
this->toolStrip1->ResumeLayout(false);
|
this->toolStrip1->ResumeLayout(false);
|
this->toolStrip1->PerformLayout();
|
this->toolStrip1->PerformLayout();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar1))->EndInit();
|
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->EndInit();
|
this->ResumeLayout(false);
|
this->ResumeLayout(false);
|
this->PerformLayout();
|
this->PerformLayout();
|
|
|
}
|
}
|
#pragma endregion
|
#pragma endregion
|
|
|
private: System::Void registersToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void registersToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmRegisters^ form = gcnew frmRegisters(mut);
|
if (registersFrm)
|
form->Show();
|
registersFrm->Activate();
|
|
else {
|
|
registersFrm = gcnew frmRegisters(mut);
|
|
registersFrm->MdiParent = this;
|
|
registersFrm->Show();
|
|
}
|
}
|
}
|
private: System::Void loadINTELHexFIleToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void loadINTELHexFIleToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
this->openFileDialog1->ShowDialog();
|
this->openFileDialog1->ShowDialog();
|
LoadIntelHexFile();
|
LoadIntelHexFile();
|
|
if (runFrm)
|
|
runFrm->UpdateListBoxes();
|
return;
|
return;
|
}
|
}
|
|
|
private: int IHChecksumCheck(const char *buf) {
|
private: int IHChecksumCheck(const char *buf) {
|
int nn;
|
int nn;
|
Line 646... |
Line 582... |
//this->checkedListBox1->Items->Add(gcnew String(str_ad_insn.c_str()));
|
//this->checkedListBox1->Items->Add(gcnew String(str_ad_insn.c_str()));
|
}
|
}
|
fp_in.close();
|
fp_in.close();
|
system1.WriteROM = false;
|
system1.WriteROM = false;
|
ad = firstAdr;
|
ad = firstAdr;
|
UpdateListBoxes(ad);
|
if (runFrm)
|
|
runFrm->UpdateListBoxes();
|
if (chksum != 0) {
|
if (chksum != 0) {
|
sprintf(buf2, "Checksum Error: %d", chksum);
|
sprintf(buf2, "Checksum Error: %d", chksum);
|
this->lblChecksumError->Text = gcnew String(buf2);
|
this->lblChecksumError->Text = gcnew String(buf2);
|
}
|
}
|
else
|
else
|
this->lblChecksumError->Text = "Checksum OK";
|
this->lblChecksumError->Text = "Checksum OK";
|
System::Windows::Forms::Cursor::Current = System::Windows::Forms::Cursors::Default;
|
System::Windows::Forms::Cursor::Current = System::Windows::Forms::Cursors::Default;
|
}
|
}
|
private: System::Void memoryToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void memoryToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmMemory^ form = gcnew frmMemory(mut);
|
if (memoryFrm)
|
form->Show();
|
memoryFrm->Activate();
|
|
else {
|
|
memoryFrm = gcnew frmMemory(mut);
|
|
memoryFrm->MdiParent = this;
|
|
memoryFrm->Show();
|
|
}
|
}
|
}
|
private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
|
}
|
}
|
private: System::Void pictureBox1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
|
private: System::Void pictureBox1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
|
Graphics^ gr = e->Graphics;
|
Graphics^ gr = e->Graphics;
|
Line 678... |
Line 620... |
gr->FillEllipse(gcnew SolidBrush(Color::Green),System::Drawing::Rectangle(w*nn,0,w-1,h-1));
|
gr->FillEllipse(gcnew SolidBrush(Color::Green),System::Drawing::Rectangle(w*nn,0,w-1,h-1));
|
else
|
else
|
gr->FillEllipse(gcnew SolidBrush(Color::FromArgb(0xFF003000)),System::Drawing::Rectangle(w*nn,0,w-1,h-1));
|
gr->FillEllipse(gcnew SolidBrush(Color::FromArgb(0xFF003000)),System::Drawing::Rectangle(w*nn,0,w-1,h-1));
|
}
|
}
|
}
|
}
|
private: void UpdateListBoxes(int ad)
|
|
{
|
|
int nn,nb,kk;
|
|
char buf2[100];
|
|
std::string dstr;
|
|
std::string buf;
|
|
int adr[32];
|
|
int adf;
|
|
|
|
listBoxAdr->Items->Clear();
|
|
listBoxBytes->Items->Clear();
|
|
listBoxCode->Items->Clear();
|
|
for (nn = 0; nn < 32; nn++) {
|
|
adr[nn] = ad;
|
|
sprintf(buf2,"%06X", ad);
|
|
buf = std::string(buf2);
|
|
this->listBoxAdr->Items->Add(gcnew String(buf.c_str()));
|
|
dstr = da.Disassem(ad,&nb);
|
|
buf2[0] = '\0';
|
|
for (kk = 0; kk < nb; kk++) {
|
|
sprintf(&buf2[strlen(buf2)], "%02X ", system1.ReadByte(ad));
|
|
ad++;
|
|
}
|
|
buf = std::string(buf2);
|
|
this->listBoxBytes->Items->Add(gcnew String(buf.c_str()));
|
|
this->listBoxCode->Items->Add(gcnew String(dstr.c_str()));
|
|
}
|
|
for (nn = 0; nn < 32; nn++) {
|
|
mut->WaitOne();
|
|
adf = system1.cpu2.pc;
|
|
mut->ReleaseMutex();
|
|
if (adr[nn]==adf) {
|
|
this->listBoxAdr->SetSelected(nn,true);
|
|
this->listBoxBytes->SetSelected(nn,true);
|
|
this->listBoxCode->SetSelected(nn,true);
|
|
}
|
|
}
|
|
}
|
|
private: System::Void stepToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
}
|
|
private: System::Void resetToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
Reset();
|
|
}
|
|
private: void Reset() {
|
|
int ad;
|
|
mut->WaitOne();
|
|
system1.Reset();
|
|
ad = system1.cpu2.pc-32;
|
|
mut->ReleaseMutex();
|
|
UpdateListBoxes(PCIsInList(ad));
|
|
}
|
|
|
|
// Try and align the disassembled code with the current PC.
|
|
private: int PCIsInList(int as)
|
|
{
|
|
int nn, nb;
|
|
std::string dstr;
|
|
int ae;
|
|
int ad = as;
|
|
|
|
for (ad = as; ad > as-32; ad--) {
|
|
ae = ad;
|
|
for (nn = 0; nn < 64; nn++) {
|
|
mut->WaitOne();
|
|
if (ae==system1.cpu2.pc) {
|
|
mut->ReleaseMutex();
|
|
return ad;
|
|
}
|
|
mut->ReleaseMutex();
|
|
dstr = da.Disassem(ae,&nb);
|
|
ae += nb;
|
|
}
|
|
}
|
|
return as;
|
|
}
|
|
|
|
private: void DoStepInto() {
|
|
// animate = false;
|
|
// isRunning = false;
|
|
char buf[100];
|
|
mut->WaitOne();
|
|
system1.Step();
|
|
mut->ReleaseMutex();
|
|
UpdateListBoxes(PCIsInList(system1.cpu2.pc-32));
|
|
sprintf(buf, "%04X", system1.leds);
|
|
lblLEDS->Text = gcnew String(buf);
|
|
pictureBox1->Refresh();
|
|
}
|
|
private: void DoStopButton() {
|
|
mut->WaitOne();
|
|
animate = false;
|
|
isRunning = false;
|
|
// cpu2.brk = true;
|
|
fullspeed = false;
|
|
mut->ReleaseMutex();
|
|
this->fullSpeedToolStripMenuItem->Checked = false;
|
|
this->animateFastToolStripMenuItem->Checked = false;
|
|
this->timer1->Interval = 100;
|
|
}
|
|
private: System::Void toolStripButton1_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
DoStepInto();
|
|
}
|
|
private: System::Void openFileDialog1_FileOk(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
|
private: System::Void openFileDialog1_FileOk(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
|
}
|
}
|
private: System::Void aboutToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void aboutToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
About^ form = gcnew About;
|
About^ form = gcnew About;
|
|
form->MdiParent = this;
|
form->Show();
|
form->Show();
|
}
|
}
|
private: System::Void breakpointsToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void breakpointsToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmBreakpoints^ form = gcnew frmBreakpoints(mut);
|
if (breakpointsFrm)
|
form->ShowDialog();
|
breakpointsFrm->Activate();
|
}
|
|
private: System::Void fullSpeedToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
this->fullSpeedToolStripMenuItem->Checked = !this->fullSpeedToolStripMenuItem->Checked;
|
|
mut->WaitOne();
|
|
fullspeed = this->fullSpeedToolStripMenuItem->Checked;
|
|
mut->ReleaseMutex();
|
|
if (this->fullSpeedToolStripMenuItem->Checked)
|
|
this->timer1->Interval = 1000;
|
|
else {
|
else {
|
this->timer1->Interval = (int)sqrt((float)1000000-trackBar1->Value);
|
breakpointsFrm = gcnew frmBreakpoints(mut);
|
}
|
breakpointsFrm->MdiParent = this;
|
this->animateFastToolStripMenuItem->Checked = false;
|
breakpointsFrm->Show();
|
}
|
|
private: System::Void toolStripButton3_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
mut->WaitOne();
|
|
step_depth = system1.cpu2.sub_depth;
|
|
stepout = true;
|
|
animate = false;
|
|
fullspeed = true;
|
|
isRunning = true;
|
|
mut->ReleaseMutex();
|
|
this->fullSpeedToolStripMenuItem->Checked = true;
|
|
}
|
}
|
private: System::Void animateFastToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
mut->WaitOne();
|
|
isRunning = false;
|
|
animate = true;
|
|
mut->ReleaseMutex();
|
|
this->timer1->Interval = 1;
|
|
this->trackBar1->Value = 3;
|
|
this->fullSpeedToolStripMenuItem->Checked = false;
|
|
this->animateFastToolStripMenuItem->Checked = true;
|
|
}
|
}
|
private: System::Void toolStripButton5_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void fullSpeedToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
DoStopButton();
|
|
}
|
|
private: System::Void toolStripButton2_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
mut->WaitOne();
|
|
stepover_pc = system1.cpu2.pc;
|
|
stepover_depth = system1.cpu2.sub_depth;
|
|
stepover = true;
|
|
animate = false;
|
|
fullspeed = true;
|
|
isRunning = true;
|
|
mut->ReleaseMutex();
|
|
this->fullSpeedToolStripMenuItem->Checked = true;
|
|
}
|
}
|
private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
|
static int tt = 0;
|
|
int xx;
|
|
|
|
if (this->timer1->Interval < 10)
|
|
tt += 1;
|
|
if (tt == 10 * this->timer1->Interval) {
|
|
tt = 0;
|
|
UpdateListBoxes(PCIsInList(system1.cpu2.pc-32));
|
|
}
|
|
else
|
|
UpdateListBoxes(PCIsInList(system1.cpu2.pc-32));
|
|
// if (fullspeed) {
|
|
// for (xx = 0; xx < 100000; xx++)
|
|
// RunCPU();
|
|
// }
|
|
mut->WaitOne();
|
|
if (!isRunning && animate) {
|
|
system1.Step();
|
|
}
|
|
mut->ReleaseMutex();
|
|
|
|
if (trigger30) {
|
if (trigger30) {
|
trigger30 = false;
|
trigger30 = false;
|
if (interval30==-1) {
|
if (interval30==-1) {
|
mut->WaitOne();
|
mut->WaitOne();
|
system1.pic1.irq30Hz = true;
|
system1.pic1.irq30Hz = true;
|
Line 882... |
Line 663... |
else {
|
else {
|
this->timer1024->Interval = interval1024;
|
this->timer1024->Interval = interval1024;
|
this->timer1024->Enabled = true;
|
this->timer1024->Enabled = true;
|
}
|
}
|
}
|
}
|
|
if (interruptsFrm)
|
|
interruptsFrm->UpdateForm();
|
|
if (isRunning) {
|
|
if (registersFrm)
|
|
registersFrm->UpdateForm();
|
|
if (PCHistoryFrm)
|
|
PCHistoryFrm->UpdateForm();
|
|
if (stackFrm)
|
|
stackFrm->UpdateForm();
|
}
|
}
|
private: System::Void toolStripButton4_Click(System::Object^ sender, System::EventArgs^ e) {
|
pictureBox1->Invalidate();
|
fmrFreeRun^ form = gcnew fmrFreeRun(mut);
|
pictureBox2->Invalidate();
|
form->Show();
|
|
/*
|
|
if (fullspeed) {
|
|
isRunning = true;
|
|
}
|
|
else {
|
|
isRunning = false;
|
|
animate = true;
|
|
this->timer1->Interval = (int)(sqrt((float)1000000-trackBar1->Value));
|
|
}
|
|
*/
|
|
}
|
}
|
private: System::Void toolStripButton7_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void toolStripButton7_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmBreakpoints^ form = gcnew frmBreakpoints(mut);
|
if (breakpointsFrm)
|
form->ShowDialog();
|
breakpointsFrm->Activate();
|
}
|
else {
|
private: System::Void trackBar1_Scroll(System::Object^ sender, System::EventArgs^ e) {
|
breakpointsFrm = gcnew frmBreakpoints(mut);
|
animate = true;
|
breakpointsFrm->MdiParent = this;
|
isRunning = false;
|
breakpointsFrm->Show();
|
// cpu2.brk = true;
|
|
fullspeed = false;
|
|
this->fullSpeedToolStripMenuItem->Checked = false;
|
|
// this->animateFastToolStripMenuItem->Checked = false;
|
|
this->timer1->Interval = (int)(sqrt((float)1000000-trackBar1->Value));
|
|
}
|
}
|
private: System::Void freeRunToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
fmrFreeRun^ form = gcnew fmrFreeRun(mut);
|
|
form->Show();
|
|
}
|
}
|
private: System::Void stackToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void stackToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmStack^ form = gcnew frmStack(mut);
|
if (stackFrm)
|
form->Show();
|
stackFrm->Activate();
|
|
else {
|
|
stackFrm = gcnew frmStack(mut);
|
|
stackFrm->MdiParent = this;
|
|
stackFrm->Show();
|
|
}
|
}
|
}
|
private: System::Void interruptToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void interruptToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmInterrupts^ form = gcnew frmInterrupts(mut);
|
if (interruptsFrm)
|
form->ShowDialog();
|
interruptsFrm->Activate();
|
|
else {
|
|
interruptsFrm = gcnew frmInterrupts(mut);
|
|
interruptsFrm->MdiParent = this;
|
|
interruptsFrm->Show();
|
|
}
|
}
|
}
|
private: System::Void toolStripButton6_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void toolStripButton6_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmInterrupts^ form = gcnew frmInterrupts(mut);
|
if (interruptsFrm)
|
form->ShowDialog();
|
interruptsFrm->Activate();
|
|
else {
|
|
interruptsFrm = gcnew frmInterrupts(mut);
|
|
interruptsFrm->MdiParent = this;
|
|
interruptsFrm->Show();
|
|
}
|
}
|
}
|
private: System::Void pCHistoryToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void pCHistoryToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmPCHistory^ form = gcnew frmPCHistory(mut);
|
if (PCHistoryFrm)
|
form->Show();
|
PCHistoryFrm->Activate();
|
|
else {
|
|
PCHistoryFrm = gcnew frmPCHistory(mut);
|
|
PCHistoryFrm->MdiParent = this;
|
|
PCHistoryFrm->Show();
|
}
|
}
|
private: System::Void toolStripButton8_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
Reset();
|
|
}
|
}
|
private: System::Void keyboardToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void keyboardToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
frmKeyboard^ keyboardFrm = gcnew frmKeyboard(mut);
|
if (keyboardFrm)
|
|
keyboardFrm->Show();
|
|
else {
|
|
keyboardFrm = gcnew frmKeyboard(mut);
|
keyboardFrm->Show();
|
keyboardFrm->Show();
|
}
|
}
|
|
}
|
private: System::Void timer30_Tick(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void timer30_Tick(System::Object^ sender, System::EventArgs^ e) {
|
mut->WaitOne();
|
mut->WaitOne();
|
system1.pic1.irq30Hz = true;
|
system1.pic1.irq30Hz = true;
|
mut->ReleaseMutex();
|
mut->ReleaseMutex();
|
}
|
}
|
private: System::Void timer1024_Tick(System::Object^ sender, System::EventArgs^ e) {
|
private: System::Void timer1024_Tick(System::Object^ sender, System::EventArgs^ e) {
|
mut->WaitOne();
|
mut->WaitOne();
|
system1.pic1.irq1024Hz = true;
|
system1.pic1.irq1024Hz = true;
|
mut->ReleaseMutex();
|
mut->ReleaseMutex();
|
}
|
}
|
|
private: System::Void screenToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
if (screenClosed) {
|
|
screenFrm = gcnew frmScreen(mut, "Main Screen");
|
|
mut->WaitOne();
|
|
screenFrm->pVidMem = &system1.VideoMem[0];
|
|
screenFrm->pVidDirty = &system1.VideoMemDirty[0];
|
|
screenFrm->which = 0;
|
|
mut->ReleaseMutex();
|
|
screenFrm->Show();
|
|
}
|
|
else
|
|
screenFrm->Activate();
|
|
}
|
|
private: System::Void debugScreenToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
if (dbgScreenClosed) {
|
|
DBGScreenFrm = gcnew frmScreen(mut, "Debug Screen");
|
|
mut->WaitOne();
|
|
DBGScreenFrm->pVidMem = &system1.DBGVideoMem[0];
|
|
DBGScreenFrm->pVidDirty = &system1.DBGVideoMemDirty[0];
|
|
DBGScreenFrm->which = 1;
|
|
mut->ReleaseMutex();
|
|
DBGScreenFrm->Show();
|
|
}
|
|
else
|
|
DBGScreenFrm->Activate();
|
|
}
|
|
private: System::Void runToolStripMenuItem1_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
if (runFrm == nullptr) {
|
|
runFrm = gcnew frmRun(mut);
|
|
runFrm->MdiParent = this;
|
|
runFrm->WindowState = FormWindowState::Maximized;
|
|
runFrm->Show();
|
|
}
|
|
else
|
|
runFrm->Activate();
|
|
}
|
|
private: System::Void interruptsToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
if (interruptsFrm)
|
|
interruptsFrm->Activate();
|
|
else {
|
|
interruptsFrm = gcnew frmInterrupts(mut);
|
|
interruptsFrm->MdiParent = this;
|
|
interruptsFrm->Show();
|
|
}
|
|
}
|
|
private: System::Void uartToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
if (uartFrm==nullptr) {
|
|
uartFrm = gcnew frmUart(mut);
|
|
uartFrm->MdiParent = this;
|
|
uartFrm->Show();
|
|
}
|
|
else
|
|
uartFrm->Activate();
|
|
}
|
|
private: System::Void pictureBox2_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
|
|
Graphics^ gr = e->Graphics;
|
|
System::Drawing::Font^ myfont;
|
|
std::string str;
|
|
SolidBrush^ bkbr;
|
|
SolidBrush^ fgbr;
|
|
int xx,kk;
|
|
char buf[9];
|
|
for (xx = 0; xx < 8; xx++)
|
|
{
|
|
kk = (system1.sevenseg.dat >> (xx * 4)) & 0xF;
|
|
if (kk < 10)
|
|
buf[7-xx] = '0' + kk;
|
|
else
|
|
switch(kk) {
|
|
case 10: buf[7-xx] = 'A'; break;
|
|
case 11: buf[7-xx] = 'b'; break;
|
|
case 12: buf[7-xx] = 'C'; break;
|
|
case 13: buf[7-xx] = 'd'; break;
|
|
case 14: buf[7-xx] = 'E'; break;
|
|
case 15: buf[7-xx] = 'F'; break;
|
|
}
|
|
}
|
|
buf[8] = '\0';
|
|
myfont = gcnew System::Drawing::Font("Lucida Console", 24);
|
|
bkbr = gcnew System::Drawing::SolidBrush(System::Drawing::Color::Black);
|
|
gr->FillRectangle(bkbr,this->pictureBox2->ClientRectangle);
|
|
fgbr = gcnew System::Drawing::SolidBrush(Color::FromArgb(0xFF3F0000));
|
|
gr->DrawString(gcnew String("88888888"),myfont,fgbr,0,0);
|
|
fgbr = gcnew System::Drawing::SolidBrush(Color::FromArgb(0x7FFF0000));
|
|
gr->DrawString(gcnew String(buf),myfont,fgbr,2,2);
|
|
}
|
};
|
};
|
}
|
}
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|