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

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.3 ! root       25: // XXX: RMW サイクルが発行される前提のレジスタだが
        !            26: // まだ CPU から RMW サイクルを示す信号線が出ていない。
1.1       root       27: 
                     28: uint64
1.1.1.3 ! root       29: TASDevice::Read(uint32 offset)
1.1       root       30: {
1.1.1.2   root       31:        putlog(2, "読み込み 0x%02x", (uint8)tas);
1.1       root       32:        return tas;
                     33: }
                     34: 
                     35: uint64
1.1.1.3 ! root       36: TASDevice::Write(uint32 offset, uint32 data)
1.1       root       37: {
1.1.1.3 ! root       38:        // data は bit7 のみ有効。data の bit7 は
        !            39:        // LUNA-I では B 接続なので、各バイトの bit7 に相当、
1.1       root       40:        // LUNA88K では BFFF 接続なので bit31 に相当。
                     41:        // 最上位ビット以外のビットは「不定」。
                     42:        tas = data;
1.1.1.2   root       43:        putlog(1, "書き込み 0x%02x", data);
1.1       root       44:        return 0;
                     45: }
                     46: 
                     47: uint64
1.1.1.3 ! root       48: TASDevice::Peek(uint32 offset)
1.1       root       49: {
                     50:        return tas;
                     51: }

unix.superglobalmegacorp.com

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