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

1.1     ! root        1: //
        !             2: // nono
        !             3: // Copyright (C) 2017 [email protected]
        !             4: //
        !             5: 
        !             6: #pragma once
        !             7: 
        !             8: #include "device.h"
        !             9: #include "scheduler.h"
        !            10: 
        !            11: struct CRTC
        !            12: {
        !            13:        uint16 r[24];
        !            14:        uint16 op;
        !            15: 
        !            16:        static const uint32 R00         = 0x00;         // $E80000
        !            17:        static const uint32 R01         = 0x01;         // $E80002
        !            18:        static const uint32 R02         = 0x02;         // $E80004
        !            19:        static const uint32 R03         = 0x03;         // $E80006
        !            20:        static const uint32 R04         = 0x04;         // $E80008
        !            21:        static const uint32 R05         = 0x05;         // $E8000A
        !            22:        static const uint32 R06         = 0x06;         // $E8000C
        !            23:        static const uint32 R07         = 0x07;         // $E8000E
        !            24:        static const uint32 R08         = 0x08;         // $E80010
        !            25:        static const uint32 R09         = 0x09;         // $E80012
        !            26:        static const uint32 R10         = 0x0a;         // $E80014
        !            27:        static const uint32 R11         = 0x0b;         // $E80016
        !            28:        static const uint32 R12         = 0x0c;         // $E80018
        !            29:        static const uint32 R13         = 0x0d;         // $E8001A
        !            30:        static const uint32 R14         = 0x0e;         // $E8001C
        !            31:        static const uint32 R15         = 0x0f;         // $E8001E
        !            32:        static const uint32 R16         = 0x10;         // $E80020
        !            33:        static const uint32 R17         = 0x11;         // $E80022
        !            34:        static const uint32 R18         = 0x12;         // $E80024
        !            35:        static const uint32 R19         = 0x13;         // $E80026
        !            36:        static const uint32 R20         = 0x14;         // $E80028
        !            37:        static const uint32 R21         = 0x15;         // $E8002A
        !            38:        static const uint32 R22         = 0x16;         // $E8002C
        !            39:        static const uint32 R23         = 0x17;         // $E8002E
        !            40:        static const uint32 REG_END     = 0x18;
        !            41:        static const uint32 REG_OP      = 0x240;        // $E80480
        !            42: };
        !            43: 
        !            44: class CRTCDevice
        !            45:        : public IODevice
        !            46: {
        !            47:        typedef IODevice inherited;
        !            48:  public:
        !            49:        CRTCDevice();
        !            50:        virtual ~CRTCDevice();
        !            51: 
        !            52:        virtual void ResetHard();
        !            53: 
        !            54:        virtual uint64 Read8(uint32 addr);
        !            55:        virtual uint64 Read16(uint32 addr);
        !            56:        virtual uint64 Write8(uint32 addr, uint32 data);
        !            57:        virtual uint64 Write16(uint32 addr, uint32 data);
        !            58:        virtual uint64 Peek8(uint32 addr);
        !            59: 
        !            60:  private:
        !            61:        void WriteReg(uint32 offset, uint32 data);
        !            62: 
        !            63:        // 垂直表示期間イベント
        !            64:        void VDispCallback(int arg);
        !            65: 
        !            66:        struct CRTC crtc {};
        !            67: 
        !            68:        Event vdisp_event {};
        !            69: };

unix.superglobalmegacorp.com

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