|
|
1.1 root 1: //
2: // nono
1.1.1.3 root 3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
1.1 root 5: //
6:
1.1.1.8 root 7: //
8: // CRTC-II (HD6445)
9: //
10:
1.1 root 11: #pragma once
12:
13: #include "device.h"
1.1.1.8 root 14: #include "event.h"
1.1 root 15:
1.1.1.12! root 16: class LunafbDevice;
1.1.1.9 root 17: class Renderer;
18:
1.1.1.7 root 19: class CRTC2Device : public IODevice
1.1 root 20: {
1.1.1.3 root 21: using inherited = IODevice;
1.1 root 22: public:
23: CRTC2Device();
1.1.1.10 root 24: ~CRTC2Device() override;
1.1 root 25:
1.1.1.9 root 26: bool Init() override;
1.1.1.8 root 27: void ResetHard(bool poweron) override;
1.1 root 28:
1.1.1.2 root 29: protected:
30: // BusIO インタフェース
31: static const uint32 NPORT = 2;
1.1.1.11 root 32: busdata ReadPort(uint32 offset);
33: busdata WritePort(uint32 offset, uint32 data);
34: busdata PeekPort(uint32 offset);
35: bool PokePort(uint32 offset, uint32 data);
1.1 root 36:
37: private:
38: // 垂直表示期間イベント
1.1.1.4 root 39: void VDispCallback(Event& ev);
1.1 root 40:
41: // アドレスレジスタ
1.1.1.11 root 42: uint ar {};
1.1 root 43:
44: // レジスタ
45: uint8 reg[40] {};
46:
1.1.1.12! root 47: LunafbDevice *lunafb {};
1.1.1.9 root 48: Renderer *renderer {};
49:
1.1.1.7 root 50: Event vdisp_event { this };
1.1 root 51: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.