--- nono/vm/spc.h 2026/04/29 17:04:59 1.1.1.11 +++ nono/vm/spc.h 2026/04/29 17:05:17 1.1.1.14 @@ -4,14 +4,19 @@ // Licensed under nono-license.txt // +// +// SPC (MB89352) +// + #pragma once #include "device.h" +#include "event.h" #include "fixedqueue.h" #include "monitor.h" -#include "scheduler.h" #include "scsidev.h" -#include "vm.h" + +class InterruptDevice; struct SPC { @@ -154,7 +159,7 @@ class SPCDevice : public SCSIHostDevice virtual ~SPCDevice() override; bool Init() override; - void ResetHard() override; + void ResetHard(bool poweron) override; // SCSIBus コールバック @@ -257,7 +262,7 @@ class SPCDevice : public SCSIHostDevice struct SPC spc {}; // VM 種別 - vmtype_t vmtype {}; + VMType vmtype {}; // SPC に入力されるクロック周期 [nsec] int t_CLF {}; @@ -276,4 +281,6 @@ class SPCDevice : public SCSIHostDevice Monitor monitor { this }; }; -extern std::unique_ptr gSPC; +static inline SPCDevice *GetSPCDevice() { + return Object::GetObject(OBJ_SPC); +}