Commit | Line | Data |
---|---|---|
0203b5fd JPM |
1 | //\r |
2 | // mainwin.h: Header file\r | |
3 | //\r | |
4 | // by James Hammons\r | |
5 | // (C) 2010 Underground Software\r | |
6 | //\r | |
7 | \r | |
8 | #ifndef __MAINWIN_H__\r | |
9 | #define __MAINWIN_H__\r | |
10 | \r | |
11 | //Hrm. uh??? I thought this wasn't the way to do this stuff...???\r | |
12 | #include <QtWidgets>\r | |
13 | #include "tom.h"\r | |
14 | \r | |
15 | #define RING_BUFFER_SIZE 32\r | |
16 | \r | |
a4e46c05 | 17 | // Main windows\r |
0203b5fd | 18 | class GLWidget;\r |
6564336c | 19 | //class VideoWindow;\r |
0203b5fd JPM |
20 | class AboutWindow;\r |
21 | class HelpWindow;\r | |
22 | class FilePickerWindow;\r | |
a2dfb8e5 | 23 | //class VideoOutputWindow;\r |
6564336c | 24 | //class DasmWindow;\r |
0203b5fd JPM |
25 | class m68KDasmWindow;\r |
26 | class GPUDasmWindow;\r | |
27 | class DSPDasmWindow;\r | |
28 | class EmuStatusWindow;\r | |
a4e46c05 JPM |
29 | \r |
30 | // Alpine\r | |
31 | class MemoryBrowserWindow;\r | |
32 | class StackBrowserWindow;\r | |
33 | class CPUBrowserWindow;\r | |
34 | class OPBrowserWindow;\r | |
35 | class M68KDasmBrowserWindow;\r | |
36 | class RISCDasmBrowserWindow;\r | |
37 | \r | |
38 | // Debugger\r | |
0203b5fd JPM |
39 | class AllWatchBrowserWindow;\r |
40 | class LocalBrowserWindow;\r | |
a4e46c05 | 41 | class CallStackBrowserWindow;\r |
0203b5fd JPM |
42 | class HeapAllocatorBrowserWindow;\r |
43 | class Memory1BrowserWindow;\r | |
6564336c | 44 | //class BrkWindow;\r |
0203b5fd | 45 | class ExceptionVectorTableBrowserWindow;\r |
6564336c | 46 | class FilesrcListWindow;\r |
0203b5fd | 47 | \r |
a4e46c05 | 48 | \r |
6564336c | 49 | // \r |
0203b5fd JPM |
50 | class MainWin: public QMainWindow\r |
51 | {\r | |
52 | // All Qt apps require this macro for signal/slot functionality to work\r | |
53 | Q_OBJECT\r | |
54 | \r | |
55 | public:\r | |
56 | // MainWin(QString);\r | |
57 | MainWin(bool);\r | |
58 | void LoadFile(QString);\r | |
59 | void SyncUI(void);\r | |
6564336c JPM |
60 | void DebuggerRefreshWindows(void);\r |
61 | void DebuggerResetWindows(void);\r | |
62 | void AlpineRefreshWindows(void);\r | |
0203b5fd JPM |
63 | \r |
64 | protected:\r | |
65 | void closeEvent(QCloseEvent *);\r | |
66 | void keyPressEvent(QKeyEvent *);\r | |
67 | void keyReleaseEvent(QKeyEvent *);\r | |
68 | \r | |
69 | private slots:\r | |
70 | void Open(void);\r | |
71 | void Configure(void);\r | |
72 | void Timer(void);\r | |
73 | void TogglePowerState(void);\r | |
74 | void ToggleRunState(void);\r | |
75 | void SetZoom100(void);\r | |
76 | void SetZoom200(void);\r | |
77 | void SetZoom300(void);\r | |
78 | void SetNTSC(void);\r | |
79 | void SetPAL(void);\r | |
80 | void ToggleBlur(void);\r | |
81 | void ShowAboutWin(void);\r | |
82 | void ShowHelpWin(void);\r | |
83 | void InsertCart(void);\r | |
84 | void Unpause(void);\r | |
85 | void LoadSoftware(QString);\r | |
86 | void ToggleCDUsage(void);\r | |
87 | void FrameAdvance(void);\r | |
0203b5fd | 88 | void ToggleFullScreen(void);\r |
a4e46c05 | 89 | void ShowEmuStatusWin(void);\r |
25251f31 | 90 | void MakeScreenshot(void);\r |
a4e46c05 JPM |
91 | // Debugger\r |
92 | void DebuggerTraceStepOver(void);\r | |
93 | void DebuggerTraceStepInto(void);\r | |
94 | void DebuggerRestart(void);\r | |
95 | void ShowAllWatchBrowserWin(void);\r | |
96 | void ShowLocalBrowserWin(void);\r | |
97 | void ShowCallStackBrowserWin(void);\r | |
98 | void ShowHeapAllocatorBrowserWin(void);\r | |
99 | void ShowMemory1BrowserWin(int NumWin);\r | |
100 | void ShowExceptionVectorTableBrowserWin(void);\r | |
0203b5fd | 101 | void NewBreakpointFunction(void);\r |
6564336c JPM |
102 | //void ShowVideoOutputWin(void);\r |
103 | //void ShowDasmWin(void);\r | |
a4e46c05 | 104 | // Alpine\r |
0203b5fd JPM |
105 | void ShowMemoryBrowserWin(void);\r |
106 | void ShowStackBrowserWin(void);\r | |
107 | void ShowCPUBrowserWin(void);\r | |
108 | void ShowOPBrowserWin(void);\r | |
109 | void ShowM68KDasmBrowserWin(void);\r | |
110 | void ShowRISCDasmBrowserWin(void);\r | |
0203b5fd JPM |
111 | \r |
112 | private:\r | |
113 | void HandleKeys(QKeyEvent *, bool);\r | |
114 | void HandleGamepads(void);\r | |
115 | void SetFullScreen(bool state = true);\r | |
116 | void ResizeMainWindow(void);\r | |
117 | void ReadUISettings(void);\r | |
118 | void ReadSettings(void);\r | |
119 | void WriteSettings(void);\r | |
120 | void WriteUISettings(void);\r | |
121 | \r | |
a4e46c05 | 122 | private:\r |
25251f31 | 123 | GLWidget *videoWidget;\r |
0203b5fd JPM |
124 | QMdiArea *mainWindowCentrale;\r |
125 | QMdiSubWindow *VideoOutputWindowCentrale;\r | |
6564336c JPM |
126 | AboutWindow *aboutWin;\r |
127 | HelpWindow *helpWin;\r | |
128 | FilePickerWindow *filePickWin;\r | |
129 | EmuStatusWindow *emuStatusWin;\r | |
130 | MemoryBrowserWindow *memBrowseWin;\r | |
131 | StackBrowserWindow *stackBrowseWin;\r | |
132 | CPUBrowserWindow *cpuBrowseWin;\r | |
133 | OPBrowserWindow *opBrowseWin;\r | |
134 | M68KDasmBrowserWindow *m68kDasmBrowseWin;\r | |
135 | RISCDasmBrowserWindow *riscDasmBrowseWin;\r | |
136 | //VideoOutputWindow *VideoOutputWin;\r | |
a4e46c05 JPM |
137 | AllWatchBrowserWindow *allWatchBrowseWin;\r |
138 | LocalBrowserWindow *LocalBrowseWin;\r | |
139 | CallStackBrowserWindow *CallStackBrowseWin;\r | |
0203b5fd JPM |
140 | ExceptionVectorTableBrowserWindow *exceptionvectortableBrowseWin;\r |
141 | HeapAllocatorBrowserWindow *heapallocatorBrowseWin;\r | |
a4e46c05 | 142 | Memory1BrowserWindow **mem1BrowseWin;\r |
6564336c | 143 | //DasmWindow * DasmWin;\r |
0203b5fd JPM |
144 | QTabWidget *dasmtabWidget;\r |
145 | //QDockWidget *dasmtabWidget;\r | |
146 | m68KDasmWindow *m68kDasmWin;\r | |
147 | GPUDasmWindow *GPUDasmWin;\r | |
148 | DSPDasmWindow *DSPDasmWin;\r | |
6564336c JPM |
149 | FilesrcListWindow *FilesrcListWin;\r |
150 | //BrkWindow *brkWin;\r | |
151 | QTimer *timer;\r | |
0203b5fd JPM |
152 | bool running;\r |
153 | int zoomLevel;\r | |
154 | bool powerButtonOn;\r | |
155 | bool showUntunedTankCircuit;\r | |
a4e46c05 | 156 | \r |
0203b5fd JPM |
157 | public:\r |
158 | bool cartridgeLoaded;\r | |
a4e46c05 | 159 | \r |
0203b5fd JPM |
160 | private:\r |
161 | bool allowUnknownSoftware;\r | |
162 | bool CDActive;\r | |
163 | // bool alpineLoadSuccessful;\r | |
164 | bool pauseForFileSelector;\r | |
165 | bool loadAndGo;\r | |
166 | bool keyHeld[8];\r | |
167 | bool fullScreen;\r | |
168 | bool scannedSoftwareFolder;\r | |
a4e46c05 | 169 | \r |
0203b5fd JPM |
170 | public:\r |
171 | bool plzDontKillMyComputer;\r | |
172 | uint32_t oldTimestamp;\r | |
173 | uint32_t ringBufferPointer;\r | |
174 | uint32_t ringBuffer[RING_BUFFER_SIZE];\r | |
a4e46c05 | 175 | \r |
0203b5fd JPM |
176 | private:\r |
177 | QPoint mainWinPosition;\r | |
178 | // QSize mainWinSize;\r | |
179 | int lastEditedProfile;\r | |
180 | QMenu * fileMenu;\r | |
181 | QMenu * helpMenu;\r | |
182 | QMenu * debugMenu, * debugWindowsMenu, *debugWindowsBrowsesMenu, *debugWindowsWatchMenu, *debugWindowOutputMenu, *debugWindowExceptionMenu, *debugWindowsMemoryMenu, *debugNewBreakpointMenu;\r | |
183 | QToolBar * toolbar;\r | |
184 | QToolBar * debugbar;\r | |
185 | QToolBar * debuggerbar;\r | |
186 | \r | |
187 | QActionGroup * zoomActs;\r | |
188 | QActionGroup * tvTypeActs;\r | |
189 | \r | |
190 | QAction * quitAppAct;\r | |
191 | QAction * powerAct;\r | |
192 | QAction * pauseAct;\r | |
193 | QAction * x1Act;\r | |
194 | QAction * x2Act;\r | |
195 | QAction * x3Act;\r | |
196 | QAction * ntscAct;\r | |
197 | QAction * palAct;\r | |
198 | QAction * blurAct;\r | |
199 | QAction * aboutAct;\r | |
200 | QAction * helpAct;\r | |
201 | QAction * filePickAct;\r | |
202 | QAction * configAct;\r | |
203 | QAction * emustatusAct;\r | |
204 | QAction * useCDAct;\r | |
205 | QAction * frameAdvanceAct;\r | |
206 | QAction *traceStepOverAct;\r | |
207 | QAction *traceStepIntoAct;\r | |
208 | QAction *restartAct;\r | |
209 | QAction * fullScreenAct;\r | |
6564336c | 210 | //QAction *DasmAct;\r |
25251f31 | 211 | QAction *screenshotAct;;\r |
0203b5fd | 212 | \r |
a4e46c05 | 213 | // Alpine\r |
0203b5fd JPM |
214 | QAction *memBrowseAct;\r |
215 | QAction *stackBrowseAct;\r | |
216 | QAction *cpuBrowseAct;\r | |
217 | QAction *opBrowseAct;\r | |
218 | QAction *m68kDasmBrowseAct;\r | |
219 | QAction *riscDasmBrowseAct;\r | |
a4e46c05 JPM |
220 | \r |
221 | // Debugger\r | |
6564336c | 222 | //QAction *VideoOutputAct;\r |
0203b5fd JPM |
223 | QAction *heapallocatorBrowseAct;\r |
224 | QAction *allWatchBrowseAct;\r | |
225 | QAction *LocalBrowseAct;\r | |
a4e46c05 | 226 | QAction *CallStackBrowseAct;\r |
0203b5fd JPM |
227 | QAction **mem1BrowseAct;\r |
228 | QAction *newBreakpointFunctionAct;\r | |
229 | QAction *exceptionVectorTableBrowseAct;\r | |
230 | \r | |
231 | QIcon powerGreen;\r | |
232 | QIcon powerRed;\r | |
233 | QIcon blur;\r | |
234 | uint32_t testPattern[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL];\r | |
235 | uint32_t testPattern2[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL];\r | |
236 | };\r | |
237 | \r | |
238 | #endif // __MAINWIN_H__\r |