--- nono/vm/device.h 2026/04/29 17:04:52 1.1.1.9 +++ nono/vm/device.h 2026/04/29 17:04:55 1.1.1.10 @@ -23,7 +23,7 @@ class Device : public Object { using inherited = Object; protected: - Device(); + Device(const std::string& objname_); public: virtual ~Device() override; @@ -47,6 +47,13 @@ class Device : public Object // またここで --show-config も行うため、この時点で gConfig の内容は確定し // 以降 gConfig の変更は出来ない。 // + // 3.1. InitDriver() ... NetDriver を選択 + // NetDriver の選択はログが準備出来た後で行いたいが、スレッドの動く + // Init() よりは前で行いたいのでここで特別扱いしている。 + // + // 3.2. ParseMonitors() ... -M オプションの処理 + // (GUI 版のみ) この時点で Monitor がすべて登録されている必要がある。 + // // 4. Init() ... 初期化 // ここでは ROM などのファイルの読み込み、またスレッドの起動などを行う。 // Object 由来のオブジェクトはすべて揃っているため、相互にアクセス可能。 @@ -96,7 +103,7 @@ class IODevice : public Device { using inherited = Device; protected: - IODevice(); + IODevice(const std::string& objname_); public: virtual ~IODevice() override; @@ -142,12 +149,12 @@ class BusErrDevice : public IODevice // 何もしないデバイス。 // 読み込むと全域で 0xff が読めて、書き込んでも何も起きない。 -class NullDevice : public IODevice +class NopIODevice : public IODevice { using inherited = IODevice; public: - NullDevice(); - virtual ~NullDevice() override; + NopIODevice(); + virtual ~NopIODevice() override; public: uint64 Read8(uint32 addr) override; @@ -160,11 +167,11 @@ class NullDevice : public IODevice }; // 前方参照 -class BitmapDevice; class DMACDevice; class Human68k; class InterruptDevice; class IODevice; +class LunafbDevice; class MK48T02Device; class MPUDevice; class SCSIDevice; @@ -173,4 +180,4 @@ class SCSITarget; extern std::vector gDevices; extern std::unique_ptr gBusErr; -extern std::unique_ptr gNull; +extern std::unique_ptr gNopIO;