Annotation of nono/vm/kbc.cpp, revision 1.1

1.1     ! root        1: //
        !             2: // nono
        !             3: // Copyright (C) 2022 nono project
        !             4: // Licensed under nono-license.txt
        !             5: //
        !             6: 
        !             7: //
        !             8: // NWS-1750 のキーボードコントローラ(予定地)
        !             9: //
        !            10: 
        !            11: // デバイスが存在しないことをバスエラーで検出できないので、
        !            12: // とりあえず用意して生返事だけさせておく。
        !            13: 
        !            14: #include "kbc.h"
        !            15: 
        !            16: // コンストラクタ
        !            17: KBCDevice::KBCDevice()
        !            18:        : inherited(OBJ_KBC)
        !            19: {
        !            20: }
        !            21: 
        !            22: // デストラクタ
        !            23: KBCDevice::~KBCDevice()
        !            24: {
        !            25: }
        !            26: 
        !            27: uint64
        !            28: KBCDevice::Read8(uint32 addr)
        !            29: {
        !            30:        // XXX 折り返しは不明
        !            31:        switch (addr & 7) {
        !            32:         case KEYDATA:
        !            33:                return 0;
        !            34: 
        !            35:         case KEYSTAT:
        !            36:                return 0xc0;    // KBRDY, MSRDY
        !            37: 
        !            38:         case KEYINTE:
        !            39:                return 0;               // ?
        !            40: 
        !            41:         case KEYRESET:
        !            42:                return 0xff;    // ?
        !            43: 
        !            44:         case KEYBUZZ:
        !            45:                return 0xff;    // ?
        !            46: 
        !            47:         case MSDATA:
        !            48:                return 0;
        !            49: 
        !            50:         case MSINTE:           // ?
        !            51:                return 0;
        !            52: 
        !            53:         case MSRESET:          // ?
        !            54:                return 0xff;
        !            55: 
        !            56:         default:
        !            57:                return 0xff;
        !            58:        }
        !            59: }
        !            60: 
        !            61: uint64
        !            62: KBCDevice::Write8(uint32 addr, uint32 data)
        !            63: {
        !            64:        // とりあえず全無視
        !            65:        return 0;
        !            66: }
        !            67: 
        !            68: uint64
        !            69: KBCDevice::Peek8(uint32 addr)
        !            70: {
        !            71:        // XXX 未実装
        !            72:        return 0xff;
        !            73: }

unix.superglobalmegacorp.com

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