-
Notifications
You must be signed in to change notification settings - Fork 22
/
MMUMonitor.cpp
634 lines (557 loc) · 15.8 KB
/
MMUMonitor.cpp
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
// This file is part of VCC (Virtual Color Computer).
//
// VCC (Virtual Color Computer) is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// VCC (Virtual Color Computer) is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with VCC (Virtual Color Computer). If not, see <http://www.gnu.org/licenses/>.
//
// Processor State Display - Part of the Debugger package for VCC
// Authors: Mike Rojas, Chet Simpson
#include "MMUMonitor.h"
#include "Debugger.h"
#include "DebuggerUtils.h"
#include "defines.h"
#include "tcc1014mmu.h"
#include "resource.h"
#include <string>
#include <stdexcept>
namespace VCC { namespace Debugger { namespace UI { namespace
{
using mmupagebuffer_type = std::array<unsigned char, 8192>;
CriticalSection Section_;
MMUState MMUState_;
int MMUPage_ = 0;
mmupagebuffer_type MMUPageBuffer_;
HWND MMUMonitorWindow = NULL;
HWND hWndMMUMonitor;
HWND hWndVScrollBar;
int memoryOffset = 0;
int maxPageNo = 0;
BackBufferInfo BackBuffer_;
class MMUMonitorDebugClient : public Client
{
public:
void OnReset() override
{
SectionLocker lock(Section_);
std::fill(MMUPageBuffer_.begin(), MMUPageBuffer_.end(), unsigned char(0));
MMUPage_ = 0;
}
void OnUpdate() override
{
SectionLocker lock(Section_);
MMUState_ = GetMMUState();
GetMMUPage(MMUPage_, MMUPageBuffer_);
}
};
void DrawMMUMonitor(HDC hdc, LPRECT clientRect)
{
RECT rect = *clientRect;
// Clear our background.
HBRUSH brush = (HBRUSH)GetStockObject(WHITE_BRUSH);
FillRect(hdc, &rect, brush);
HPEN pen = (HPEN)CreatePen(PS_SOLID, 1, RGB(192, 192, 192));
HPEN thickPen = (HPEN)CreatePen(PS_SOLID, 2, RGB(192, 192, 192));
SelectObject(hdc, pen);
// Draw the border.
MoveToEx(hdc, rect.left, rect.top, NULL);
LineTo(hdc, rect.right - 1, rect.top);
LineTo(hdc, rect.right - 1, rect.bottom - 1);
LineTo(hdc, rect.left, rect.bottom - 1);
LineTo(hdc, rect.left, rect.top);
HFONT hFont = CreateFont(14, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS,
CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, FIXED_PITCH, TEXT("Consolas"));
SelectObject(hdc, hFont);
RECT rc;
int x = rect.left + 45;
int y = rect.top + 10;
SetTextColor(hdc, RGB(0, 0, 0));
SetRect(&rc, x, y, x + 80, y + 20);
DrawText(hdc, "Real Memory", 11, &rc, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
x += 100;
SetRect(&rc, x-5, y, x + 35, y + 20);
DrawText(hdc, "MAP 0", 5, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 80;
SetRect(&rc, x, y, x + 80, y + 20);
DrawText(hdc, "CPU Memory", 10, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 130;
SetRect(&rc, x-5, y, x + 35, y + 20);
DrawText(hdc, "MAP 1", 5, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 55;
SetRect(&rc, x, y, x + 80, y + 20);
DrawText(hdc, "Real Memory", 11, &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
y += 25;
// Pull out MMU state. Do it quickly to keep the emulator frame rate high.
MMUState regs;
int pageNo;
mmupagebuffer_type page;
{
SectionLocker lock(Section_);
regs = MMUState_;
pageNo = MMUPage_;
page = MMUPageBuffer_;
}
std::string s;
// Registers
for (int n = 0; n < 8; n++)
{
x = rect.left + 45;
if (regs.ActiveTask == 0)
{
SetTextColor(hdc, RGB(138, 27, 255));
}
else
{
SetTextColor(hdc, RGB(150, 150, 150));
}
SetRect(&rc, x, y, x + 80, y + 20);
int base = regs.Task0[n] * 8192;
s = ToHexString(base, 5, true) + "-" + ToHexString(base + 8191, 5, true);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
x += 100;
SelectObject(hdc, pen);
MoveToEx(hdc, x, y, NULL);
LineTo(hdc, x + 30, y);
LineTo(hdc, x + 30, y + 20);
LineTo(hdc, x, y + 20);
LineTo(hdc, x, y);
s = ToHexString(regs.Task0[n], 2, true);
if (regs.ActiveTask == 0)
{
SetTextColor(hdc, RGB(0, 0, 0));
}
else
{
SetTextColor(hdc, RGB(150, 150, 150));
}
SetRect(&rc, x, y, x + 30, y + 20);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 30;
if (regs.ActiveTask == 0)
{
SelectObject(hdc, thickPen);
MoveToEx(hdc, x, y + 10, NULL);
LineTo(hdc, x + 50, y + 10);
}
x += 50;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 80, y + 20);
s = ToHexString(n * 8192, 4, true) + "-" + ToHexString(((n + 1) * 8192) - 1, 4, true);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 80;
SelectObject(hdc, pen);
if (regs.ActiveTask == 1)
{
SelectObject(hdc, thickPen);
MoveToEx(hdc, x, y + 10, NULL);
LineTo(hdc, x + 50, y + 10);
}
x += 50;
SelectObject(hdc, pen);
MoveToEx(hdc, x, y, NULL);
LineTo(hdc, x + 30, y);
LineTo(hdc, x + 30, y + 20);
LineTo(hdc, x, y + 20);
LineTo(hdc, x, y);
if (regs.ActiveTask == 1)
{
SetTextColor(hdc, RGB(0, 0, 0));
}
else
{
SetTextColor(hdc, RGB(150, 150, 150));
}
s = ToHexString(regs.Task1[n], 2, true);
SetRect(&rc, x, y, x + 30, y + 20);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 50;
if (regs.ActiveTask == 1)
{
SetTextColor(hdc, RGB(138, 27, 255));
}
else
{
SetTextColor(hdc, RGB(150, 150, 150));
}
SetRect(&rc, x, y, x + 80, y + 20);
base = regs.Task1[n] * 8192;
s = ToHexString(base, 5, true) + "-" + ToHexString(base + 8191, 5, true);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
y += 25;
}
x = rect.left + 35;
y += 20;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "MMU Enable Bit", 14, &rc, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
x += 110;
SelectObject(hdc, pen);
MoveToEx(hdc, x, y, NULL);
LineTo(hdc, x + 30, y);
LineTo(hdc, x + 30, y + 20);
LineTo(hdc, x, y + 20);
LineTo(hdc, x, y);
s = std::to_string(regs.Enabled);
SetTextColor(hdc, RGB(0, 0, 0));
SetRect(&rc, x, y, x + 30, y + 20);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 40;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "$FF90 bit 6", 11, &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
x += 100;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "Ram Vectors", 11, &rc, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
x += 110;
SelectObject(hdc, pen);
MoveToEx(hdc, x, y, NULL);
LineTo(hdc, x + 30, y);
LineTo(hdc, x + 30, y + 20);
LineTo(hdc, x, y + 20);
LineTo(hdc, x, y);
s = std::to_string(regs.RamVectors);
SetTextColor(hdc, RGB(0, 0, 0));
SetRect(&rc, x, y, x + 30, y + 20);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 40;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "$FF90 bit 3", 11, &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
x = rect.left + 35;
y += 20;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "MMU Task Bit", 12, &rc, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
x += 110;
SelectObject(hdc, pen);
MoveToEx(hdc, x, y, NULL);
LineTo(hdc, x + 30, y);
LineTo(hdc, x + 30, y + 20);
LineTo(hdc, x, y + 20);
LineTo(hdc, x, y);
s = std::to_string(regs.ActiveTask);
SetTextColor(hdc, RGB(0, 0, 0));
SetRect(&rc, x, y, x + 30, y + 20);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 40;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "$FF91 bit 0", 11, &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
x += 100;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "Rom Mapping", 11, &rc, DT_RIGHT | DT_VCENTER | DT_SINGLELINE);
x += 110;
SelectObject(hdc, pen);
MoveToEx(hdc, x, y, NULL);
LineTo(hdc, x + 30, y);
LineTo(hdc, x + 30, y + 20);
LineTo(hdc, x, y + 20);
LineTo(hdc, x, y);
s = std::to_string(regs.RomMap);
SetTextColor(hdc, RGB(0, 0, 0));
SetRect(&rc, x, y, x + 30, y + 20);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
x += 40;
SetTextColor(hdc, RGB(138, 27, 255));
SetRect(&rc, x, y, x + 100, y + 20);
DrawText(hdc, "$FF90 bit 1-0", 13, &rc, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
int nCol1 = 60;
int nCol2 = 135;
x = 0;
y += 40;
MoveToEx(hdc, x, y, NULL);
LineTo(hdc, rect.right - 1, y);
LineTo(hdc, rect.right - 1, rect.bottom - 1);
LineTo(hdc, x, rect.bottom - 1);
LineTo(hdc, x, y);
// Draw our lines.
MoveToEx(hdc, x, y + 20, NULL);
LineTo(hdc, rect.right, y + 20);
MoveToEx(hdc, x + nCol1, y, NULL);
LineTo(hdc, x + nCol1, rect.bottom);
MoveToEx(hdc, rect.right - nCol2, y, NULL);
LineTo(hdc, rect.right - nCol2, rect.bottom);
// Memory Page
SetTextColor(hdc, RGB(138, 27, 255));
{
SetRect(&rc, x, y, x + nCol1, y + 20);
DrawText(hdc, "Address", 7, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
int mx = nCol1 + 5;
for (int n = 0; n < 16; n++)
{
if (n == 8)
{
mx += 15;
}
s = ToHexString(n, 2, false);
SetRect(&rc, x + mx + (n * 18), y, x + mx + (n * 18) + 20, y + 20);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_VCENTER | DT_SINGLELINE);
}
SetRect(&rc, rect.right - nCol2, y, rect.right - 5, y + 20);
DrawText(hdc, "ASCII", 6, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
}
// Draw the Address Lines.
y += 20;
int h = 18;
int nRows = 16;
for (int addrLine = 0; addrLine < nRows; addrLine++)
{
SetTextColor(hdc, RGB(138, 27, 255));
{
s = ToHexString(addrLine * 16 + memoryOffset + pageNo * 8192, 6, true);
SetRect(&rc, x, y, x + nCol1, y + h);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
}
// Pull out 16 bytes from page memory.
unsigned char line[16];
for (int n = 0; n < 16; n++)
{
auto addr = memoryOffset + (addrLine * 16) + n;
line[n] = page[addr];
}
// Hex Line in Hex Bytes
SetTextColor(hdc, RGB(0, 0, 0));
int mx = nCol1 + 5;
std::string ascii;
for (int n = 0; n < 16; n++)
{
if (isprint(line[n]))
{
ascii += line[n];
}
else
{
ascii += ".";
}
if (n == 8)
{
mx += 15;
}
s = ToHexString(line[n], 2, true);
SetRect(&rc, x + mx + (n * 18), y, x + mx + (n * 18) + 20, y + h);
DrawText(hdc, s.c_str(), s.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
}
// ASCII Line
mx = rect.right - nCol2;
{
SetRect(&rc, mx + 5, y, rect.right - 5, y + h);
DrawText(hdc, ascii.c_str(), ascii.size(), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
}
// Draw a separator.
if (addrLine % 4 == 3)
{
MoveToEx(hdc, x, y + h, NULL);
LineTo(hdc, rect.right, y + h);
}
y += h;
}
// Cleanup.
DeleteObject(pen);
DeleteObject(thickPen);
DeleteObject(hFont);
}
int GetMaximumPage()
{
unsigned int MemConfig[4] = { 0x20000,0x80000,0x200000,0x800000 };
maxPageNo = MemConfig[EmuState.RamSize] / 8192;
return maxPageNo;
}
void ChangeMemoryPage()
{
int page = SendDlgItemMessage(hWndMMUMonitor, IDC_SELECT_MMU_PAGE, CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
if (page < 0)
{
return;
}
int max = GetMaximumPage();
if (page >= max)
{
page = 0;
}
MMUPage_ = page;
}
INT_PTR CALLBACK MMUMonitorDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM /*lParam*/)
{
switch (message)
{
case WM_INITDIALOG:
{
hWndMMUMonitor = hDlg;
RECT Rect;
GetClientRect(hDlg, &Rect);
int ScrollBarTop = 315;
int ScrollBarWidth = 19;
hWndVScrollBar = CreateWindowEx(
0,
"SCROLLBAR",
NULL,
WS_VISIBLE | WS_CHILD | SBS_VERT,
Rect.right - ScrollBarWidth,
ScrollBarTop,
ScrollBarWidth,
Rect.bottom - 40 - ScrollBarTop,
hDlg,
(HMENU)IDT_MMU_VSCROLLBAR,
(HINSTANCE)GetWindowLong(hDlg, GWL_HINSTANCE),
NULL);
if (!hWndVScrollBar)
{
MessageBox(NULL, "Vertical Scroll Bar Failed.", "Error", MB_OK | MB_ICONERROR);
return 0;
}
SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_ALL;
si.nMin = 0x0000;
si.nMax = 0x1FFF;
si.nPage = 16 * 16;
si.nPos = 0;
SetScrollInfo(hWndVScrollBar, SB_CTL, &si, TRUE);
BackBuffer_ = AttachBackBuffer(hDlg, -20, -39);
int max = GetMaximumPage();
for (int page = 0; page < max; page++)
{
int base = page * 8192;
const std::string s(ToHexString(page, 2, true) + " - " + ToHexString(base, 5, true) + "-" + ToHexString(base + 8191, 5, true));
SendDlgItemMessage(hDlg, IDC_SELECT_MMU_PAGE, CB_ADDSTRING, (WPARAM)0, (LPARAM)ToLPCSTR(s));
}
SetTimer(hDlg, IDT_PROC_TIMER, 64, (TIMERPROC)NULL);
EmuState.Debugger.RegisterClient(hDlg, std::make_unique<MMUMonitorDebugClient>());
break;
}
case WM_MOUSEWHEEL:
{
SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_ALL;
GetScrollInfo(hWndVScrollBar, SB_CTL, &si);
int delta = GET_WHEEL_DELTA_WPARAM(wParam);
if (delta < 0)
{
si.nPos += si.nPage / 2;
}
else
{
si.nPos -= si.nPage / 2;
}
si.nPos = roundUp(si.nPos, 16);
si.fMask = SIF_POS;
SetScrollInfo(hWndVScrollBar, SB_CTL, &si, TRUE);
GetScrollInfo(hWndVScrollBar, SB_CTL, &si);
memoryOffset = si.nPos;
InvalidateRect(hDlg, &BackBuffer_.Rect, FALSE);
return 0;
}
case WM_VSCROLL:
{
SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_ALL;
GetScrollInfo(hWndVScrollBar, SB_CTL, &si);
std::string s;
switch ((int)LOWORD(wParam))
{
case SB_PAGEUP:
s = "SB_PAGEUP";
si.nPos -= si.nPage;
break;
case SB_PAGEDOWN:
s = "SB_PAGEDOWN";
si.nPos += si.nPage;
break;
case SB_THUMBPOSITION:
s = "SB_THUMBPOSITION";
si.nPos = si.nTrackPos;
break;
case SB_THUMBTRACK:
s = "SB_THUMBTRACK";
si.nPos = si.nTrackPos;
break;
case SB_TOP:
s = "SB_TOP";
si.nPos = 0;
break;
case SB_BOTTOM:
s = "SB_BOTTOM";
si.nPos = 0xFFFF;
break;
case SB_ENDSCROLL:
s = "SB_ENDSCROLL";
break;
case SB_LINEUP:
s = "SB_LINEUP";
si.nPos -= 16 * 8;
break;
case SB_LINEDOWN:
s = "SB_LINEDOWN";
si.nPos += 16 * 8;
break;
}
si.nPos = roundUp(si.nPos, 16);
si.fMask = SIF_POS;
SetScrollInfo(hWndVScrollBar, SB_CTL, &si, TRUE);
GetScrollInfo(hWndVScrollBar, SB_CTL, &si);
memoryOffset = si.nPos;
InvalidateRect(hDlg, &BackBuffer_.Rect, FALSE);
return 0;
}
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hDlg, &ps);
DrawMMUMonitor(BackBuffer_.DeviceContext, &BackBuffer_.Rect);
BitBlt(hdc, 0, 0, BackBuffer_.Width, BackBuffer_.Height, BackBuffer_.DeviceContext, 0, 0, SRCCOPY);
EndPaint(hDlg, &ps);
break;
}
case WM_TIMER:
switch (wParam)
{
case IDT_PROC_TIMER:
InvalidateRect(hDlg, &BackBuffer_.Rect, FALSE);
return 0;
}
break;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDC_SELECT_MMU_PAGE:
ChangeMemoryPage();
break;
case IDCLOSE:
case WM_DESTROY:
KillTimer(hDlg, IDT_PROC_TIMER);
DeleteDC(BackBuffer_.DeviceContext);
DestroyWindow(hDlg);
MMUMonitorWindow = NULL;
EmuState.Debugger.RemoveClient(hDlg);
break;
}
break;
}
return FALSE;
}
} } } }
void VCC::Debugger::UI::OpenMMUMonitorWindow(HINSTANCE instance, HWND parent)
{
if (MMUMonitorWindow == NULL)
{
MMUMonitorWindow = CreateDialog(
instance,
MAKEINTRESOURCE(IDD_MMU_MONITOR),
parent,
MMUMonitorDlgProc);
ShowWindow(MMUMonitorWindow, SW_SHOWNORMAL);
}
SetFocus(MMUMonitorWindow);
}