-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimMain.h
68 lines (61 loc) · 1.54 KB
/
SimMain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/////////////////////////////////////////////////////////////////////////////
// Name: layout.h
// Purpose: Layout sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "NanoCpu.h"
#ifndef wxOVERRIDE
#define wxOVERRIDE
#endif
// Define a new application
class MyApp: public wxApp
{
public:
MyApp(){}
bool OnInit() wxOVERRIDE;
};
typedef enum id_regs
{
ID_R0, ID_R1, ID_R2, ID_R3, ID_R4, ID_R5, ID_R6, ID_R7,
ID_R8, ID_R9, ID_R10, ID_R11, ID_R12, ID_R13, ID_R14, ID_R15,
ID_IMM, ID_CCR,
REGS
} ID_REGS;
class MemListCtrl : public wxListView
{
public:
MemListCtrl(wxWindow* parent, int numitems);
wxString OnGetItemText(long item, long column) const;
};
extern class MyFrame* myFrame;
// the main frame class
class MyFrame : public wxFrame
{
void UpdateView();
public:
MyFrame();
// File Menu
void OnFileNew(wxCommandEvent& event);
void OnFileOpen(wxCommandEvent& event);
void OnFileSave(wxCommandEvent& event);
// Debug Menu
void OnDebugStepOver(wxCommandEvent& event);
void OnDebugStepInto(wxCommandEvent& event);
void OnDebugStepOut(wxCommandEvent& event);
void OnDebugGo(wxCommandEvent& event);
// Help Menu
void OnAbout(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
public:
MemListCtrl* m_memory;
wxTextCtrl* m_register[REGS];
wxCheckBox* m_iobox[16];
wxTextCtrl* m_log;
private:
NANO_CPU m_cpu;
wxDECLARE_EVENT_TABLE();
};