|
|
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:
1.1.1.3 root 23: void ResetHard() override;
1.1 root 24:
25: // XXX 親の同名メソッドと名前分けたほうがいいか
1.1.1.3 root 26: uint8 ReadCtrl(struct SIO::channel *chan) override;
27: void WriteCtrl(struct SIO::channel *chan, uint32 data) override;
1.1 root 28:
1.1.1.4 ! root 29: // 割り込みアクノリッジ
! 30: int InterruptAcknowledge();
1.1.1.2 root 31:
1.1.1.3 root 32: protected:
33: // BusIO インタフェース
34: static const uint32 NPORT = 4;
35: uint64 Read(uint32 addr);
36: uint64 Write(uint32 addr, uint32 data);
37: uint64 Peek(uint32 addr);
1.1.1.4 ! root 38:
! 39: private:
! 40: void Interrupt() override;
1.1 root 41: };
1.1.1.2 root 42:
43: 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.