|
|
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"
14:
1.1.1.12 root 15: class LunafbDevice;
1.1.1.14! root 16: class VideoRenderer;
1.1.1.9 root 17:
1.1.1.7 root 18: class CRTC2Device : public IODevice
1.1 root 19: {
1.1.1.3 root 20: using inherited = IODevice;
1.1 root 21: public:
22: CRTC2Device();
1.1.1.10 root 23: ~CRTC2Device() override;
1.1 root 24:
1.1.1.9 root 25: bool Init() override;
1.1.1.8 root 26: void ResetHard(bool poweron) override;
1.1 root 27:
1.1.1.2 root 28: protected:
29: // BusIO インタフェース
30: static const uint32 NPORT = 2;
1.1.1.11 root 31: busdata ReadPort(uint32 offset);
32: busdata WritePort(uint32 offset, uint32 data);
33: busdata PeekPort(uint32 offset);
34: bool PokePort(uint32 offset, uint32 data);
1.1 root 35:
36: private:
37: // 垂直表示期間イベント
1.1.1.13 root 38: void VDispCallback(Event *);
1.1 root 39:
40: // アドレスレジスタ
1.1.1.11 root 41: uint ar {};
1.1 root 42:
43: // レジスタ
44: uint8 reg[40] {};
45:
1.1.1.13 root 46: uint vdisp_state {};
47:
1.1.1.12 root 48: LunafbDevice *lunafb {};
1.1.1.14! root 49: VideoRenderer *renderer {};
1.1.1.9 root 50:
1.1.1.13 root 51: Event *vdisp_event {};
1.1 root 52: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.