-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathIoCardPrinter.h
48 lines (37 loc) · 1.49 KB
/
IoCardPrinter.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
#ifndef _INCLUDE_IOCARD_PRINTER_H_
#define _INCLUDE_IOCARD_PRINTER_H_
#include "IoCard.h"
#include "Ui.h"
class Cpu2200;
class IoCardPrinter : public IoCard
{
public:
// see the base class for the definition of the public functions
CANT_ASSIGN_OR_COPY_CLASS(IoCardPrinter);
// ----- common IoCard functions -----
IoCardPrinter(std::shared_ptr<Cpu2200> cpu,
int base_addr, int card_slot);
~IoCardPrinter() override;
std::vector<int> getAddresses() const override;
void reset(bool hard_reset) noexcept override;
void select() override;
void deselect() override;
void strobeOBS(int val) override;
void strobeCBS(int val) override;
void setCpuBusy(bool busy) override;
// give access to associated gui window
PrinterFrame *getGuiPtr() const noexcept;
private:
// ---- card properties ----
std::string getDescription() const override;
std::string getName() const override;
std::vector<int> getBaseAddresses() const override;
std::shared_ptr<Cpu2200> m_cpu; // associated CPU
std::shared_ptr<PrinterFrame> m_wndhnd; // opaque handle to UI window
const int m_base_addr; // the address the card is mapped to
const int m_slot; // which slot the card is plugged into
bool m_selected = false; // the card is currently selected
bool m_cpb = true; // the cpu is busy
};
#endif // _INCLUDE_IOCARD_PRINTER_H_
// vim: ts=8:et:sw=4:smarttab