--- nono/vm/ram.h 2026/04/29 17:04:55 1.1.1.8 +++ nono/vm/ram.h 2026/04/29 17:05:09 1.1.1.9 @@ -4,6 +4,10 @@ // Licensed under nono-license.txt // +// +// メインメモリ +// + #pragma once #include "device.h" @@ -16,8 +20,7 @@ class RAMDevice : public IODevice virtual ~RAMDevice() override; bool Init() override; - bool PowerOn() override; - void ResetHard() override; + void ResetHard(bool poweron) override; uint64 Read8(uint32 addr) override; uint64 Read16(uint32 addr) override; @@ -39,6 +42,7 @@ class RAMDevice : public IODevice uint32 LoadFile(const char *filepath); // file, filesize で示されるバッファをロードする uint32 LoadFile(const char *name, const uint8 *file, size_t filesize); + private: uint32 LoadGzFile(const char *filepath, const uint8 *file, size_t filesize); uint32 Load_aout(const char *name, const uint8 *file, size_t filesize); @@ -54,4 +58,4 @@ class RAMDevice : public IODevice }; extern std::unique_ptr mainram; -extern std::unique_ptr gRAM; +extern RAMDevice *gRAM;