|
|
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:
7: #pragma once
8:
9: #include "device.h"
10: #include "upd7201.h"
11:
12: class SCCDevice
13: : public uPD7201Device
14: {
1.1.1.3 root 15: using inherited = uPD7201Device;
1.1 root 16: private:
17: static const int baseaddr = 0xe98000;
18:
19: public:
20: SCCDevice();
1.1.1.4 root 21: virtual ~SCCDevice() override;
1.1 root 22:
23: // XXX 親の同名メソッドと名前分けたほうがいいか
1.1.1.3 root 24: uint8 ReadCtrl(struct SIO::channel *chan) override;
25: void WriteCtrl(struct SIO::channel *chan, uint32 data) override;
1.1 root 26:
1.1.1.4 root 27: // 割り込みアクノリッジ
28: int InterruptAcknowledge();
1.1.1.2 root 29:
1.1.1.3 root 30: protected:
31: // BusIO インタフェース
32: static const uint32 NPORT = 4;
1.1.1.5 ! root 33: uint64 Read(uint32 offset);
! 34: uint64 Write(uint32 offset, uint32 data);
! 35: uint64 Peek(uint32 offset);
1.1.1.4 root 36:
37: private:
38: void Interrupt() override;
1.1 root 39: };
1.1.1.2 root 40:
41: extern std::unique_ptr<SCCDevice> gSCC;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.