|
|
1.1 ! root 1: // ! 2: // nono ! 3: // Copyright (C) 2017 [email protected] ! 4: // ! 5: ! 6: #include "areaset.h" ! 7: ! 8: AreaSetDevice::AreaSetDevice() ! 9: { ! 10: logname = "area"; ! 11: devname = "AreaSet"; ! 12: devaddr = baseaddr; ! 13: devlen = 0x2000; ! 14: } ! 15: ! 16: AreaSetDevice::~AreaSetDevice() ! 17: { ! 18: } ! 19: ! 20: uint64 ! 21: AreaSetDevice::Read8(uint32 addr) ! 22: { ! 23: switch (addr) { ! 24: case 0xe86001: ! 25: return limit; ! 26: } ! 27: return (uint64)-1; ! 28: } ! 29: ! 30: uint64 ! 31: AreaSetDevice::Read16(uint32 addr) ! 32: { ! 33: return 0xff00 | Read8(addr + 1); ! 34: } ! 35: ! 36: uint64 ! 37: AreaSetDevice::Write8(uint32 addr, uint32 data) ! 38: { ! 39: switch (addr) { ! 40: case 0xe86001: ! 41: putlog(0, "未実装エリアセット書き込み $%02x", data); ! 42: limit = data; ! 43: return 0; ! 44: default: ! 45: break; ! 46: } ! 47: return (uint64)-1; ! 48: } ! 49: ! 50: uint64 ! 51: AreaSetDevice::Write16(uint32 addr, uint32 data) ! 52: { ! 53: return Write8(addr + 1, data); ! 54: } ! 55: ! 56: uint64 ! 57: AreaSetDevice::Peek8(uint32 addr) ! 58: { ! 59: switch (addr) { ! 60: case 0xe86001: ! 61: return limit; ! 62: default: ! 63: return 0xff; ! 64: } ! 65: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.