Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
90 lines (75 loc) · 2.84 KB

File metadata and controls

90 lines (75 loc) · 2.84 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#pragma once
#include "Card.h"
class ParallelPrinterCard : public Card
{
public:
ParallelPrinterCard(UINT slot) :
Card(CT_GenericPrinter, slot)
{
if (m_slot == SLOT0)
ThrowErrorInvalidSlot();
m_inactivity = 0;
m_file = NULL;
ResetDefaultOptions();
}
virtual ~ParallelPrinterCard() {}
virtual void Destroy();
virtual void Reset(const bool powerCycle);
virtual void Update(const ULONG nExecutedCycles);
virtual void InitializeIO(LPBYTE pCxRomPeripheral);
static BYTE __stdcall IORead(WORD pc, WORD addr, BYTE bWrite, BYTE value, ULONG nExecutedCycles);
static BYTE __stdcall IOWrite(WORD pc, WORD addr, BYTE bWrite, BYTE value, ULONG nExecutedCycles);
static const std::string& GetSnapshotCardName();
virtual void SaveSnapshot(YamlSaveHelper& yamlSaveHelper);
virtual bool LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version);
bool operator== (const ParallelPrinterCard& other) const
{
return m_szPrintFilename == other.m_szPrintFilename &&
m_printerIdleLimit == other.m_printerIdleLimit &&
m_bDumpToPrinter == other.m_bDumpToPrinter &&
m_bConvertEncoding == other.m_bConvertEncoding &&
m_bFilterUnprintable == other.m_bFilterUnprintable &&
m_bPrinterAppend == other.m_bPrinterAppend;
}
bool operator!= (const ParallelPrinterCard& other) const
{
return !operator==(other);
}
const std::string& GetFilename();
void SetFilename(const std::string& prtFilename);
UINT GetIdleLimit() { return m_printerIdleLimit; }
void SetIdleLimit(UINT value) { m_printerIdleLimit = value; }
bool GetDumpToPrinter() { return m_bDumpToPrinter; }
void SetDumpToPrinter(bool value) { m_bDumpToPrinter = value; }
bool GetConvertEncoding() { return m_bConvertEncoding; }
void SetConvertEncoding(bool value) { m_bConvertEncoding = value; }
bool GetFilterUnprintable() { return m_bFilterUnprintable; }
void SetFilterUnprintable(bool value) { m_bFilterUnprintable = value; }
bool GetPrinterAppend() { return m_bPrinterAppend; }
void SetPrinterAppend(bool value) { m_bPrinterAppend = value; }
bool GetEnableDumpToRealPrinter() { return m_bEnableDumpToRealPrinter; }
void SetEnableDumpToRealPrinter(bool value) { m_bEnableDumpToRealPrinter = value; } // Set by cmd-line only
void ResetDefaultOptions()
{
m_printerIdleLimit = 10;
m_bDumpToPrinter = false;
m_bConvertEncoding = false;
m_bFilterUnprintable = false;
m_bPrinterAppend = false;
m_bEnableDumpToRealPrinter = false;
}
void GetRegistryConfig();
void SetRegistryConfig();
private:
bool CheckPrint();
void ClosePrint();
uint32_t m_inactivity;
FILE* m_file;
std::string m_szPrintFilename;
UINT m_printerIdleLimit;
bool m_bDumpToPrinter;
bool m_bConvertEncoding;
bool m_bFilterUnprintable;
bool m_bPrinterAppend;
bool m_bEnableDumpToRealPrinter; // Set by cmd-line: -printer-real
};
Morty Proxy This is a proxified and sanitized view of the page, visit original site.