Annotation of nono/vm/sysport.h, revision 1.1.1.8

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 する
1.1.1.4   root       24:        int ram_wait;   // 設定値。
1.1.1.7   root       25:        bool key_ctrl;
1.1       root       26: };
                     27: 
1.1.1.8 ! root       28: class SysportDevice : public IODevice
1.1       root       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.5   root       36:        virtual ~SysportDevice() override;
1.1       root       37: 
1.1.1.4   root       38:        void ResetHard() override;
                     39: 
1.1.1.7   root       40:        // KEYCTRL の状態を取得する
                     41:        bool GetKeyCtrl() const {
                     42:                return sysport.key_ctrl;
                     43:        }
                     44: 
1.1.1.3   root       45:  protected:
                     46:        // BusIO インタフェース
                     47:        static const uint32 NPORT = 8;
1.1.1.6   root       48:        uint64 Read(uint32 offset);
                     49:        uint64 Write(uint32 offset, uint32 data);
                     50:        uint64 Peek(uint32 offset);
1.1       root       51: 
                     52:  private:
                     53:        struct SYSPORT sysport {};
                     54: };
1.1.1.6   root       55: 
                     56: extern std::unique_ptr<SysportDevice> gSysport;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.