--- nono/vm/vm_luna.h 2026/04/29 17:04:50 1.1.1.5 +++ nono/vm/vm_luna.h 2026/04/29 17:05:11 1.1.1.9 @@ -4,6 +4,10 @@ // Licensed under nono-license.txt // +// +// VM (LUNA) +// + #pragma once #include "vm.h" @@ -21,10 +25,32 @@ class VM_LUNA : public VM void PowerButton() override; protected: + // ブートページを切り替える。 + void SwitchBootPage(Device *parent, bool isrom) override; + // デバイスマップから devtable を作成 void MakeDevtable(const uint8 *maptable); - std::unique_ptr prom {}; + // ブートページ切り替え用 (unique_ptr ではない) + IODevice *ram0 {}; + + std::unique_ptr pBT454 {}; + std::unique_ptr pCRTC2 {}; + std::unique_ptr pEthernet {}; + std::unique_ptr pLCD {}; + std::unique_ptr pNopIO {}; + std::unique_ptr pPartialRAM {}; + std::unique_ptr pPlaneVRAM {}; + std::unique_ptr pPROM {}; + std::unique_ptr pPROM0 {}; + std::unique_ptr pPIO0 {}; + std::unique_ptr pPIO1 {}; + std::unique_ptr pRTC {}; + std::unique_ptr pSIO {}; + std::unique_ptr pSPC {}; + std::unique_ptr pSysClk {}; + std::unique_ptr pTAS {}; + std::unique_ptr pZRAM {}; }; class VM_LUNA1 final : public VM_LUNA @@ -32,7 +58,7 @@ class VM_LUNA1 final : public VM_LUNA using inherited = VM_LUNA; public: VM_LUNA1(); - virtual ~VM_LUNA1() override; + ~VM_LUNA1() override; private: static const uint8 maptable[256]; @@ -43,8 +69,11 @@ class VM_LUNA88K final : public VM_LUNA using inherited = VM_LUNA; public: VM_LUNA88K(); - virtual ~VM_LUNA88K() override; + ~VM_LUNA88K() override; private: + std::unique_ptr pCMMU {}; + std::unique_ptr pFuseROM {}; + static const uint8 maptable[256]; };