--- nono/vm/vm_luna.h 2026/04/29 17:04:32 1.1 +++ nono/vm/vm_luna.h 2026/04/29 17:04:50 1.1.1.5 @@ -1,6 +1,7 @@ // // nono -// Copyright (C) 2020 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // #pragma once @@ -9,37 +10,41 @@ class VM_LUNA : public VM { - typedef VM inherited; + using inherited = VM; public: VM_LUNA(); - virtual ~VM_LUNA(); + virtual ~VM_LUNA() override; + + bool Init() override; // 電源ボタンを押す。 - virtual void PowerButton(); + void PowerButton() override; - private: - std::unique_ptr crtc2; - std::unique_ptr sysclk; - std::unique_ptr nulldev; + protected: + // デバイスマップから devtable を作成 + void MakeDevtable(const uint8 *maptable); + + std::unique_ptr prom {}; +}; +class VM_LUNA1 final : public VM_LUNA +{ + using inherited = VM_LUNA; + public: + VM_LUNA1(); + virtual ~VM_LUNA1() override; + + private: static const uint8 maptable[256]; }; -class VM_LUNA88K : public VM +class VM_LUNA88K final : public VM_LUNA { - typedef VM inherited; + using inherited = VM_LUNA; public: VM_LUNA88K(); - virtual ~VM_LUNA88K(); - - // 電源ボタンを押す。 - virtual void PowerButton(); + virtual ~VM_LUNA88K() override; private: - std::unique_ptr crtc2; - std::unique_ptr fuserom; - std::unique_ptr sysclk; - std::unique_ptr nulldev; - static const uint8 maptable[256]; };