--- nono/hd64180/hd64180core.cpp 2026/04/29 17:05:30 1.1.1.2 +++ nono/hd64180/hd64180core.cpp 2026/04/29 17:05:34 1.1.1.3 @@ -91,7 +91,14 @@ MPU64180Device::op_illegal(int pos) // PC は未定義命令の先頭番地ではなく、未定義 opcode だった位置? // nono の実装ではフェッチと同時にインクリメントしているので、 // 1つ前でいい? HD64180.pdf p38-39 - Push2(reg.pc - 1); + if (pos == 2) { + Push2(reg.pc - 1); + } else { + // DD CB d OP xx + // ^ PC + // d の位置をスタックに積む + Push2(reg.pc - 2); + } ExceptionDirect(HD647180::IntmapTRAP, 0x0000); }