Annotation of nono/vm/areaset.cpp, revision 1.1.1.2

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

unix.superglobalmegacorp.com

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