Annotation of nono/vm/crtc.h, revision 1.1.1.3

1.1       root        1: //
                      2: // nono
1.1.1.2   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 "scheduler.h"
                     11: 
                     12: struct CRTC
                     13: {
                     14:        uint16 r[24];
                     15:        uint16 op;
                     16: 
                     17:        static const uint32 R00         = 0x00;         // $E80000
                     18:        static const uint32 R01         = 0x01;         // $E80002
                     19:        static const uint32 R02         = 0x02;         // $E80004
                     20:        static const uint32 R03         = 0x03;         // $E80006
                     21:        static const uint32 R04         = 0x04;         // $E80008
                     22:        static const uint32 R05         = 0x05;         // $E8000A
                     23:        static const uint32 R06         = 0x06;         // $E8000C
                     24:        static const uint32 R07         = 0x07;         // $E8000E
                     25:        static const uint32 R08         = 0x08;         // $E80010
                     26:        static const uint32 R09         = 0x09;         // $E80012
                     27:        static const uint32 R10         = 0x0a;         // $E80014
                     28:        static const uint32 R11         = 0x0b;         // $E80016
                     29:        static const uint32 R12         = 0x0c;         // $E80018
                     30:        static const uint32 R13         = 0x0d;         // $E8001A
                     31:        static const uint32 R14         = 0x0e;         // $E8001C
                     32:        static const uint32 R15         = 0x0f;         // $E8001E
                     33:        static const uint32 R16         = 0x10;         // $E80020
                     34:        static const uint32 R17         = 0x11;         // $E80022
                     35:        static const uint32 R18         = 0x12;         // $E80024
                     36:        static const uint32 R19         = 0x13;         // $E80026
                     37:        static const uint32 R20         = 0x14;         // $E80028
                     38:        static const uint32 R21         = 0x15;         // $E8002A
                     39:        static const uint32 R22         = 0x16;         // $E8002C
                     40:        static const uint32 R23         = 0x17;         // $E8002E
                     41:        static const uint32 REG_END     = 0x18;
                     42:        static const uint32 REG_OP      = 0x240;        // $E80480
                     43: };
                     44: 
                     45: class CRTCDevice
                     46:        : public IODevice
                     47: {
1.1.1.2   root       48:        using inherited = IODevice;
1.1       root       49:  public:
                     50:        CRTCDevice();
1.1.1.2   root       51:        ~CRTCDevice() override;
1.1       root       52: 
1.1.1.2   root       53:        void ResetHard() override;
1.1       root       54: 
1.1.1.2   root       55:  protected:
                     56:        // BusIO インタフェース
                     57:        static const uint NPORT = 0x800;
                     58:        uint64 Read(uint32 addr);
                     59:        uint64 Write(uint32 addr, uint32 data);
                     60:        uint64 Peek(uint32 addr);
1.1       root       61: 
                     62:  private:
1.1.1.2   root       63:        void SetReg(uint32 offset, uint32 data);
1.1       root       64: 
                     65:        // 垂直表示期間イベント
1.1.1.3 ! root       66:        void VDispCallback(Event& ev);
1.1       root       67: 
                     68:        struct CRTC crtc {};
                     69: 
                     70:        Event vdisp_event {};
                     71: };
1.1.1.2   root       72: 
                     73: extern std::unique_ptr<CRTCDevice> gCRTC;

unix.superglobalmegacorp.com

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