--- nono/vm/vm.h 2026/04/29 17:04:50 1.1.1.6 +++ nono/vm/vm.h 2026/04/29 17:04:53 1.1.1.7 @@ -49,39 +49,18 @@ class VM // 設定の適用 bool Apply(); - // 電源ボタンを押す。 - // XXX この辺はもうちょっと検討したほうがいい + // 電源ボタンを押す。(UI スレッドから呼ばれる) virtual void PowerButton() = 0; // 電源ボタンの状態を取得する。 // モーメンタリスイッチの場合は常に false。 virtual bool IsPowerButton() const { return false; } - // VM の全デバイスの電源をオフ - bool DevicePowerOff(); + // ブートページを切り替える。 + virtual void SwitchBootPage(Device *parent, bool isrom); - // VM 電源オフ時のコールバックを設定する。(GUI から呼ばれる) - void SetPowerOffCallback(void (*callback)()); - - // 外部リセットボタンを押す。 - void ResetButton() { ResetHard(); } - - // ハードウェアリセット - void ResetHard(); - - // MPU の RESET 命令によるリセット + // MPU の RESET 命令によるリセット (機種ごとに異なるため) virtual void ResetByMPU() { } - - // BusErr デバイスを取得する - BusErrDevice *GetBusErrDevice() const { return buserr.get(); } - - protected: - // VM の全デバイスの電源をオン - bool DevicePowerOn(); - - std::unique_ptr buserr {}; - - void (*poweroff_callback)() {}; }; extern std::unique_ptr gVM;