|
|
1.1 ! root 1: // ! 2: // nono ! 3: // Copyright (C) 2017 [email protected] ! 4: // ! 5: ! 6: #pragma once ! 7: ! 8: #include "device.h" ! 9: #include <atomic> ! 10: ! 11: class TVRAMDevice ! 12: : public IODevice ! 13: { ! 14: typedef IODevice inherited; ! 15: private: ! 16: static const int baseaddr = 0xe00000; ! 17: ! 18: struct tvram { ! 19: bool sa; // 同時アクセス ! 20: bool ap[4]; // 同時アクセスプレーン ! 21: }; ! 22: ! 23: public: ! 24: TVRAMDevice(); ! 25: virtual ~TVRAMDevice(); ! 26: ! 27: virtual void ResetHard(); ! 28: ! 29: virtual uint64 Read8(uint32 addr); ! 30: virtual uint64 Read16(uint32 addr); ! 31: virtual uint64 Write8(uint32 addr, uint32 data); ! 32: virtual uint64 Write16(uint32 addr, uint32 data); ! 33: virtual uint64 Peek8(uint32 addr); ! 34: ! 35: void set_crtc_21(uint16 data); ! 36: ! 37: bool Render(uint8 *); ! 38: ! 39: private: ! 40: void Invalidate(); ! 41: ! 42: uint8 *mem = NULL; ! 43: // XXX 実際には縦がこれ以上になる可能性はある ! 44: std::atomic<uint8> atomic_dirty[1024] {}; ! 45: struct tvram tvram {}; ! 46: }; ! 47: ! 48: extern TVRAMDevice *gTVRAM;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.