-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbkemulvideo.cpp
More file actions
90 lines (75 loc) · 1.77 KB
/
bkemulvideo.cpp
File metadata and controls
90 lines (75 loc) · 1.77 KB
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
#include "stdafx.h"
#include "bkemulvideo.h"
#include "bkemul.h"
#include "bkemulapp.h"
#include "bkemulmainfrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
using namespace bkemul;
// --------------------------------------------------------------
// ---------- BKEmulVideo
// --------------------------------------------------------------
BKEmulVideo::BKEmulVideo():
colorMonitor( false ),
smallScreen( false )
{
}
BKEmulVideo::~BKEmulVideo()
{
}
const BYTE* BKEmulVideo::getMemory( WORD address ) const
{
return emul.memory.getMemory( address );
}
BYTE BKEmulVideo::getMemoryByte( WORD address )
{
return emul.getMemoryByte( address );
}
WORD BKEmulVideo::getMemoryWord( WORD address )
{
return emul.getMemoryWord( address );
}
void BKEmulVideo::setMemoryByte( WORD address, BYTE data )
{
emul.setMemoryByte( address, data );
}
void BKEmulVideo::setMemoryWord( WORD address, WORD data )
{
emul.setMemoryWord( address, data );
}
void BKEmulVideo::updateMonitor() const
{
emulApp.mainFrame->updateMonitor();
}
void BKEmulVideo::updateScrolling( BYTE delta ) const
{
emulApp.mainFrame->updateScrolling( delta );
}
void BKEmulVideo::updateVideoMemoryByte( WORD address ) const
{
emulApp.mainFrame->updateVideoMemory.push_back( address );
}
void BKEmulVideo::updateVideoMemoryWord( WORD address ) const
{
emulApp.mainFrame->updateVideoMemory.push_back( address );
emulApp.mainFrame->updateVideoMemory.push_back( address + 1 );
}
void BKEmulVideo::setColorMonitor( const bool value )
{
if ( colorMonitor != value ) {
colorMonitor = value;
updateMonitor();
}
}
void BKEmulVideo::setSmallScreen( const bool value )
{
if ( smallScreen != value ) {
if ( value ) {
emulApp.mainFrame->setSmallScreen();
}
smallScreen = value;
}
}