Annotation of nono/vm/tas.cpp, revision 1.1.1.4

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2020 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
                      7: // TAS ポート
                      8: 
                      9: #include "tas.h"
                     10: 
                     11: std::unique_ptr<TASDevice> gTAS;
                     12: 
                     13: // コンストラクタ
                     14: TASDevice::TASDevice()
                     15: {
                     16:        logname = "tas";
                     17:        devname = "TAS";
                     18: }
                     19: 
                     20: // デストラクタ
                     21: TASDevice::~TASDevice()
                     22: {
                     23: }
                     24: 
1.1.1.4 ! root       25: // リセット
        !            26: void
        !            27: TASDevice::ResetHard()
        !            28: {
        !            29:        // 初期値は 0 らしい (LUNA88K PROM 1.20 がそう期待している)。
        !            30:        // いつリセットされるかは分からないけど、さすがにリセットされるだろう。
        !            31:        tas = 0;
        !            32: }
        !            33: 
1.1.1.3   root       34: // XXX: RMW サイクルが発行される前提のレジスタだが
                     35: // まだ CPU から RMW サイクルを示す信号線が出ていない。
1.1       root       36: 
                     37: uint64
1.1.1.3   root       38: TASDevice::Read(uint32 offset)
1.1       root       39: {
1.1.1.2   root       40:        putlog(2, "読み込み 0x%02x", (uint8)tas);
1.1       root       41:        return tas;
                     42: }
                     43: 
                     44: uint64
1.1.1.3   root       45: TASDevice::Write(uint32 offset, uint32 data)
1.1       root       46: {
1.1.1.3   root       47:        // data は bit7 のみ有効。data の bit7 は
                     48:        // LUNA-I では B 接続なので、各バイトの bit7 に相当、
1.1       root       49:        // LUNA88K では BFFF 接続なので bit31 に相当。
                     50:        // 最上位ビット以外のビットは「不定」。
                     51:        tas = data;
1.1.1.2   root       52:        putlog(1, "書き込み 0x%02x", data);
1.1       root       53:        return 0;
                     54: }
                     55: 
                     56: uint64
1.1.1.3   root       57: TASDevice::Peek(uint32 offset)
1.1       root       58: {
                     59:        return tas;
                     60: }

unix.superglobalmegacorp.com

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