|
|
1.1 ! root 1: // ! 2: // nono ! 3: // Copyright (C) 2020 nono project ! 4: // Licensed under nono-license.txt ! 5: // ! 6: ! 7: // ! 8: // バスエラー(デバイス) ! 9: // ! 10: ! 11: #include "buserr.h" ! 12: ! 13: // コンストラクタ ! 14: BusErrDevice::BusErrDevice() ! 15: : inherited(OBJ_BUSERR) ! 16: { ! 17: ClearAlias(); ! 18: AddAlias("BusErr"); ! 19: } ! 20: ! 21: // デストラクタ ! 22: BusErrDevice::~BusErrDevice() ! 23: { ! 24: } ! 25: ! 26: busdata ! 27: BusErrDevice::Read(busaddr addr) ! 28: { ! 29: uint32 datasize = addr.GetSize(); ! 30: ! 31: putlog(1, "$%08x.%u", addr.Addr(), datasize); ! 32: busdata data = BusData::BusErr; ! 33: data |= busdata::Size(datasize); ! 34: return data; ! 35: } ! 36: ! 37: busdata ! 38: BusErrDevice::Write(busaddr addr, uint32 data) ! 39: { ! 40: uint32 datasize = addr.GetSize(); ! 41: ! 42: putlog(1, "$%08x.%u <- %0*X", addr.Addr(), datasize, datasize * 2, data); ! 43: busdata r = BusData::BusErr; ! 44: r |= busdata::Size(datasize); ! 45: return r; ! 46: } ! 47: ! 48: busdata ! 49: BusErrDevice::Peek1(uint32 addr) ! 50: { ! 51: return BusData::BusErr; ! 52: } ! 53:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.