--- nono/vm/romemu_virt68k.cpp 2026/04/29 17:05:41 1.1.1.5 +++ nono/vm/romemu_virt68k.cpp 2026/04/29 17:05:59 1.1.1.6 @@ -38,6 +38,7 @@ #include "mainram.h" #include "memorystream.h" #include "mpu680x0.h" +#include "power.h" #include #include #include @@ -60,6 +61,7 @@ Virt68kROMEmuDevice::Init() { // ROM 領域を用意。サイズは適当。 if (AllocROM(2048, 0) == false) { + // エラーメッセージは表示済み。 return false; } @@ -126,7 +128,9 @@ Virt68kROMEmuDevice::ROM_Init() info.loadsym = false; if (BootLoader::LoadExec(mainram, &info) == false) { - warnx("** Couldn't load specified host program."); + // エラーメッセージは表示済み。 + auto power = GetPowerDevice(); + power->PushPowerButton(); return -1; } @@ -328,24 +332,24 @@ Virt68kROMEmuDevice::MakeBootInfo(LoadIn fd = open(cpath, O_RDONLY); if (fd == -1) { - warn("%s \"%s\" open failed", __func__, cpath); + warn("%s \"%s\" open failed", __method__, cpath); return false; } if (fstat(fd, &st) == -1) { - warn("%s \"%s\" fstat failed", __func__, cpath); + warn("%s \"%s\" fstat failed", __method__, cpath); return false; } if (S_ISDIR(st.st_mode)) { - warnx("%s \"%s\" is a directory", __func__, cpath); + warnx("%s \"%s\" is a directory", __method__, cpath); return false; } rdsize = st.st_size; mdata = (uint8 *)mmap(NULL, rdsize, PROT_READ, MAP_PRIVATE, fd, 0); if (mdata == MAP_FAILED) { - warnx("%s \"%s\" mmap failed", __func__, cpath); + warnx("%s \"%s\" mmap failed", __method__, cpath); return false; }