|
|
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.6 root 7: //
8: // GVRAM
9: //
10:
1.1 root 11: #pragma once
12:
13: #include "device.h"
14:
1.1.1.5 root 15: class GVRAMDevice : public IODevice
1.1 root 16: {
1.1.1.3 root 17: using inherited = IODevice;
1.1.1.9 ! root 18: static const uint32 baseaddr = 0xc0'0000;
1.1 root 19: public:
20: GVRAMDevice();
1.1.1.8 root 21: ~GVRAMDevice() override;
1.1 root 22:
1.1.1.9 ! root 23: busdata Read(busaddr addr) override;
! 24: busdata Write(busaddr addr, uint32 data) override;
! 25: busdata Peek1(uint32 addr) override;
1.1 root 26:
27: private:
1.1.1.9 ! root 28: inline uint32 Decoder(uint32 addr) const;
! 29:
1.1.1.2 root 30: std::unique_ptr<uint8[]> mem {};
1.1 root 31: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.