--- nono/vm/ram.h 2026/04/29 17:04:50 1.1.1.6 +++ nono/vm/ram.h 2026/04/29 17:04:55 1.1.1.8 @@ -8,8 +8,7 @@ #include "device.h" -class RAMDevice - : public IODevice +class RAMDevice : public IODevice { using inherited = IODevice; public: @@ -17,6 +16,7 @@ class RAMDevice virtual ~RAMDevice() override; bool Init() override; + bool PowerOn() override; void ResetHard() override; uint64 Read8(uint32 addr) override; @@ -43,6 +43,8 @@ class RAMDevice uint32 LoadGzFile(const char *filepath, const uint8 *file, size_t filesize); uint32 Load_aout(const char *name, const uint8 *file, size_t filesize); uint32 Load_elf32(const char *name, const uint8 *file, size_t filesize); + bool Load_elf32_exec(const char *name, const uint8 *file, size_t filesize); + uint32 Load_elf32_rel(const char *name, const uint8 *file, size_t filesize); // RAM 容量(バイト単位)。ram[] の確保したバイト数 int ram_size {}; @@ -51,5 +53,5 @@ class RAMDevice uint32 write_wait {}; }; -extern std::unique_ptr ram; +extern std::unique_ptr mainram; extern std::unique_ptr gRAM;