|
|
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:
11: struct SYSPORT
12: {
13: static const int CONTRAST = 0; // $E8E001
14: static const int SCOPE3D = 1; // $E8E003
15: static const int IMAGEUNIT = 2; // $E8E005
16: static const int KEY = 3; // $E8E007
17: static const int WAIT = 4; // $E8E009
18: static const int MPU = 5; // $E8E00B
19: static const int SRAMWP = 6; // $E8E00D
20: static const int POWEROFF = 7; // $E8E00F
21:
22: int contrast;
23: int rom_wait; // 設定値。ウェイトにする時には +2 する
24: int ram_wait;
25: };
26:
27: class SysportDevice
28: : public IODevice
29: {
1.1.1.3 ! root 30: using inherited = IODevice;
1.1 root 31: private:
32: static const uint32 baseaddr = 0xe8e000;
33:
34: public:
35: SysportDevice();
1.1.1.3 ! root 36: ~SysportDevice() override;
1.1 root 37:
1.1.1.3 ! root 38: protected:
! 39: // BusIO インタフェース
! 40: static const uint32 NPORT = 8;
! 41: uint64 Read(uint32 addr);
! 42: uint64 Write(uint32 addr, uint32 data);
! 43: uint64 Peek(uint32 addr);
1.1 root 44:
45: private:
46: struct SYSPORT sysport {};
47: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.