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

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: 
1.1.1.6   root        7: //
                      8: // エリアセット
                      9: //
                     10: 
1.1       root       11: #include "areaset.h"
1.1.1.12  root       12: #include "event.h"
1.1.1.13! root       13: #include "mainbus.h"
1.1.1.9   root       14: #include "x68kio.h"
1.1       root       15: 
1.1.1.6   root       16: // コンストラクタ
1.1       root       17: AreaSetDevice::AreaSetDevice()
1.1.1.8   root       18:        : inherited(OBJ_AREASET)
1.1       root       19: {
                     20: }
                     21: 
1.1.1.6   root       22: // デストラクタ
1.1       root       23: AreaSetDevice::~AreaSetDevice()
                     24: {
                     25: }
                     26: 
1.1.1.9   root       27: // 初期化
                     28: bool
                     29: AreaSetDevice::Init()
                     30: {
                     31:        x68kio = GetX68kIODevice();
                     32: 
                     33:        return true;
                     34: }
                     35: 
1.1.1.6   root       36: // リセット
1.1.1.3   root       37: void
1.1.1.6   root       38: AreaSetDevice::ResetHard(bool poweron)
1.1.1.3   root       39: {
1.1.1.9   root       40:        // リセットでどうなるかは分からないけど、
                     41:        // さすがに不定ではないだろう。
                     42:        x68kio->SetAreaset(0);
1.1.1.3   root       43: }
                     44: 
1.1.1.9   root       45: busdata
1.1.1.10  root       46: AreaSetDevice::ReadPort(uint32 offset)
1.1       root       47: {
1.1.1.13! root       48:        putlog(2, "Read $%06x (BusErr)", GetMainbusDevice()->GetPaddr());
1.1.1.10  root       49:        return BusData::BusErr;
1.1       root       50: }
                     51: 
                     52: 
1.1.1.9   root       53: busdata
1.1.1.10  root       54: AreaSetDevice::WritePort(uint32 offset, uint32 data)
1.1       root       55: {
1.1.1.13! root       56:        putlog(1, "Write $%06x <- $%02x", GetMainbusDevice()->GetPaddr(), data);
1.1.1.10  root       57:        x68kio->SetAreaset(data);
1.1.1.9   root       58: 
                     59:        const busdata wait = busdata::Wait(7 * 40_nsec);
1.1.1.10  root       60:        busdata r = wait;
                     61:        r |= BusData::Size1;
1.1.1.9   root       62:        return r;
1.1       root       63: }
                     64: 
1.1.1.9   root       65: busdata
1.1.1.10  root       66: AreaSetDevice::PeekPort(uint32 offset)
1.1       root       67: {
1.1.1.10  root       68:        return BusData::BusErr;
1.1       root       69: }
                     70: 
1.1.1.10  root       71: bool
                     72: AreaSetDevice::PokePort(uint32 offset, uint32 data)
1.1       root       73: {
1.1.1.10  root       74:        // とりあえず
                     75:        return false;
1.1       root       76: }

unix.superglobalmegacorp.com

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