--- nono/vm/ram.cpp 2026/04/29 17:04:55 1.1.1.9 +++ nono/vm/ram.cpp 2026/04/29 17:04:59 1.1.1.10 @@ -359,18 +359,21 @@ RAMDevice::Load_aout(const char *name, c aout.datarelsize = be32toh(((const aout_header *)file)->datarelsize); // マジックをチェック - uint32 target_mid; + uint32 mid = AOUT_MID(aout.magic); + bool mid_mismatch = false; if (gMainApp.HasVMFeature(VMF_M68K)) { - target_mid = AOUT_MID_M68K; + if (mid != AOUT_MID_BSD_M68K8K && mid != AOUT_MID_BSD_M68K4K) { + mid_mismatch = true; + } } else if (gMainApp.HasVMFeature(VMF_M88K)) { - target_mid = AOUT_MID_M88K; + if (mid != AOUT_MID_BSD_M88K && mid != AOUT_MID_MACH_M88K) { + mid_mismatch = true; + } } else { PANIC("Unknown CPU?"); } - uint32 mid = AOUT_MID(aout.magic); - if (mid != target_mid) { - warnx("%s \"%s\" machine id mismatch (%03x expected but %03x)", - __func__, name, target_mid, mid); + if (mid_mismatch) { + warnx("%s \"%s\" machine id $%03x mismatch", __func__, name, mid); return 0; }