--- nono/debugger/vectortable.cpp 2026/04/29 17:05:32 1.1.1.6 +++ nono/debugger/vectortable.cpp 2026/04/29 17:05:45 1.1.1.7 @@ -126,26 +126,12 @@ VectorTable::~VectorTable() bool VectorTable::Init() { - if (inherited::Init() == false) { - return false; - } - mainbus = GetMainbusDevice(); mpu = GetMPUDevice(); return true; } -// 例外名を返す (ベクタテーブル用)。 -// 名前がなければ "" を返す。 -const char * -VectorTable::GetTableName(int vector) const -{ - assertmsg(0 <= vector && vector < nametable.size(), "vector=%d", vector); - - return nametable[vector] ?: ""; -} - // 例外名を返す (例外履歴用)。 // 名前がなければ NULL を返す。 const char * @@ -166,11 +152,7 @@ VectorTable::GetExceptionName(int vector } } - if (__predict_true(nametable[vector] != NULL)) { - return nametable[vector]; - } else { - return NULL; - } + return nametable[vector]; } // モニタ更新 @@ -203,7 +185,7 @@ VectorTable::MonitorUpdate(Monitor *, Te } else { screen.Print(16, y, "$%08x", addr.Data()); } - screen.Print(26, y, "%-23s", GetTableName(v)); + screen.Print(26, y, "%-23s", nametable[v] ?: ""); screen.Print(49, y, "%26s", format_number(mpu->excep_counter[v]).c_str()); } @@ -212,23 +194,23 @@ VectorTable::MonitorUpdate(Monitor *, Te // ベクタ名 (MC680x0)。 // とりあえず CPU の区別はないことにする。 /*static*/ std::array VectorTable::name_m680x0 = { - // 0123456789012345678 <- 例外履歴欄の横幅 + // 01234567890123456789012 /* 0 */ "Reset (SP)", /* 1 */ "Reset (PC)", /* 2 */ "Bus Error", /* 3 */ "Address Error", /* 4 */ "Illegal Instruction", /* 5 */ "Zero Divide", - /* 6 */ "CHK/CHK2 Insn", - /* 7 */ "TRAPV/*TRAPcc Insn", + /* 6 */ "CHK/CHK2 Instruction", + /* 7 */ "TRAP* Instruction", /* 8 */ "Privilege Violation", /* 9 */ "Trace", /* 10 */ "Line A emulator", /* 11 */ "Line F emulator", /* 12 */ NULL, - /* 13 */ "CoproProtoViolation", // 68030 only + /* 13 */ "Copro Proto Violation", // 68030 only /* 14 */ "Format Error", - /* 15 */ "Uninitialized Intr", + /* 15 */ "Uninitialized Interrupt", /* 16 */ NULL, NULL, NULL, NULL, /* 20 */ NULL, NULL, NULL, NULL, /* 24 */ "Spurious Interrupt", @@ -255,16 +237,16 @@ VectorTable::MonitorUpdate(Monitor *, Te /* 45 */ "Trap #13", /* 46 */ "Trap #14", /* 47 */ "Trap #15", - // 0123456789012345678 + // 01234567890123456789012 /* 48 */ "FPCP Branch", - /* 49 */ "FPCP InexcactResult", + /* 49 */ "FPCP Inexcact Result", /* 50 */ "FPCP Divide by Zero", /* 51 */ "FPCP UnderFlow", /* 52 */ "FPCP Operand Error", /* 53 */ "FPCP OverFlow", /* 54 */ "FPCP Signaling NAN", - /* 55 */ "FPCP UnsuppDataType", // 68040 only - /* 56 */ "MMU Config Error", // 68030 only + /* 55 */ "FPCP Unsupp Data Type", // 68040 only + /* 56 */ "MMU Configuration Error", // 68030 only /* 57 */ NULL, /* 58 */ NULL, /* 59 */ NULL, @@ -276,7 +258,7 @@ VectorTable::MonitorUpdate(Monitor *, Te // ベクタ名 (X68030) /*static*/ std::map VectorTable::name_x68030 = { - // 0123456789012345678 + // 01234567890123456789012 { 0x40, "MFP Alarm" }, { 0x41, "MFP EXPON" }, { 0x42, "MFP POWSW" }, @@ -297,17 +279,17 @@ VectorTable::MonitorUpdate(Monitor *, Te { 0x50, "SCC#B TX Empty" }, { 0x52, "SCC#B E/S" }, { 0x54, "SCC#B RX Intr" }, - { 0x56, "SCC#B SpCond" }, + { 0x56, "SCC#B Special Condition" }, { 0x58, "SCC#A TX Empty" }, { 0x5a, "SCC#A E/S" }, { 0x5c, "SCC#A RX Intr" }, - { 0x5e, "SCC#A SpCond" }, + { 0x5e, "SCC#A Special Condition" }, - // 0123456789012345678 - { 0x60, "I/O FDC Intr" }, - { 0x61, "I/O FDD Intr" }, - { 0x62, "I/O HDC Intr" }, - { 0x63, "I/O PRN Intr" }, + // 01234567890123456789012 + { 0x60, "I/O FDC Interrupt" }, + { 0x61, "I/O FDD Interrupt" }, + { 0x62, "I/O HDC Interrupt" }, + { 0x63, "I/O PRN Interrupt" }, { 0x64, "DMAC#0 Complete" }, { 0x65, "DMAC#0 Error" }, { 0x66, "DMAC#1 Complete" }, @@ -318,7 +300,7 @@ VectorTable::MonitorUpdate(Monitor *, Te { 0x6b, "DMAC#3 Error" }, { 0x6c, "SPC Interrupt" }, - // 0123456789012345678 + // 01234567890123456789012 { 0xf0, "PSX16x50 Interrupt" }, { 0xf6, "ExSPC Interrupt" }, //0xf7, TS-6BSI @@ -330,25 +312,25 @@ VectorTable::MonitorUpdate(Monitor *, Te // LUNA-I /*static*/ std::map VectorTable::name_luna1 = { - // 0123456789012345678 <- 例外履歴欄の横幅 + // 01234567890123456789012 { 0x19, "Lv1 Intr (XP Low)" }, { 0x1a, "Lv2 Intr (SPC)" }, { 0x1b, "Lv3 Intr (Lance)" }, { 0x1c, "Lv4 Intr (XP High)" }, - { 0x1d, "Lv5 Intr (SysClk)" }, + { 0x1d, "Lv5 Intr (System Clock)" }, { 0x1e, "Lv6 Intr (SIO)" }, { 0x1f, "Lv7 Intr (NMI)" }, }; // NEWS はレベル割り込みと、一部が vectored */ /*static*/ std::map VectorTable::name_news = { - // 0123456789012345678 <- 例外履歴欄の横幅 + // 01234567890123456789012 { 0x19, "Lv1 Intr (AST)" }, { 0x1a, "Lv2 Intr" }, { 0x1b, "Lv3 Intr" }, { 0x1c, "Lv4 Intr (SIC/LAN)" }, { 0x1d, "Lv5 Intr (SCC)" }, - { 0x1e, "Lv6 Intr (SysTimer)" }, + { 0x1e, "Lv6 Intr (System Timer)" }, { 0x1f, "Lv7 Intr" }, { 0x40, "SCC" }, @@ -356,7 +338,7 @@ VectorTable::MonitorUpdate(Monitor *, Te // virt-m68k /*static*/ std::map VectorTable::name_virt68k = { - // 0123456789012345678 <- 例外履歴欄の横幅 + // 01234567890123456789012 { 0x19, "Lv1 Intr (GFPIC1)" }, { 0x1a, "Lv2 Intr (GFPIC2)" }, { 0x1b, "Lv3 Intr (GFPIC3)" },