From 8ded6a1eff26bfb9276a46533fc8ebe8bda8124a Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 27 Feb 2023 22:34:14 -0500 Subject: m68000: Re-add debugger exception hook for interrupt/trap vectors; register IR for debug state --- src/devices/cpu/m68000/m68000-sdf.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000-sdfm.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000-sdp.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000-sdpm.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000-sif.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000-sifm.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000-sip.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000-sipm.cpp | 44 ++++++++++++++++++++++++++++++++++ src/devices/cpu/m68000/m68000.cpp | 1 + src/devices/cpu/m68000/m68000gen.py | 16 ++++++++++--- 10 files changed, 366 insertions(+), 3 deletions(-) diff --git a/src/devices/cpu/m68000/m68000-sdf.cpp b/src/devices/cpu/m68000/m68000-sdf.cpp index 0b405a973cb..89efe17121f 100644 --- a/src/devices/cpu/m68000/m68000-sdf.cpp +++ b/src/devices/cpu/m68000/m68000-sdf.cpp @@ -17,6 +17,7 @@ void m68000_device::state_reset_df() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -325,6 +326,7 @@ void m68000_device::state_bus_error_df() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -602,6 +604,7 @@ void m68000_device::state_address_error_df() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -828,6 +831,7 @@ void m68000_device::state_interrupt_df() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1011,6 +1015,7 @@ void m68000_device::state_trace_df() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1194,6 +1199,7 @@ void m68000_device::state_illegal_df() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1376,6 +1382,7 @@ void m68000_device::state_priviledge_df() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1560,6 +1567,7 @@ void m68000_device::state_linea_df() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1743,6 +1751,7 @@ void m68000_device::state_linef_df() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -71696,6 +71705,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -71939,6 +71949,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72186,6 +72197,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72435,6 +72447,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72700,6 +72713,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73003,6 +73017,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73267,6 +73282,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73552,6 +73568,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73816,6 +73833,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74118,6 +74136,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74360,6 +74379,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -93955,6 +93975,7 @@ void m68000_device::trap_imm4_df() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -94817,6 +94838,7 @@ trpv3: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -127075,6 +127097,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127478,6 +127501,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127885,6 +127909,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128294,6 +128319,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128719,6 +128745,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129182,6 +129209,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129606,6 +129634,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130051,6 +130080,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130475,6 +130505,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130937,6 +130968,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -131339,6 +131371,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134403,6 +134436,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134939,6 +134973,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -135479,6 +135514,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136021,6 +136057,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136579,6 +136616,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137175,6 +137213,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137732,6 +137771,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138310,6 +138350,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138867,6 +138908,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139462,6 +139504,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139997,6 +140040,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000-sdfm.cpp b/src/devices/cpu/m68000/m68000-sdfm.cpp index 6d1cb6f92f9..b05a01f1597 100644 --- a/src/devices/cpu/m68000/m68000-sdfm.cpp +++ b/src/devices/cpu/m68000/m68000-sdfm.cpp @@ -17,6 +17,7 @@ void m68000_device::state_reset_dfm() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -325,6 +326,7 @@ void m68000_device::state_bus_error_dfm() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -602,6 +604,7 @@ void m68000_device::state_address_error_dfm() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -828,6 +831,7 @@ void m68000_device::state_interrupt_dfm() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1011,6 +1015,7 @@ void m68000_device::state_trace_dfm() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1194,6 +1199,7 @@ void m68000_device::state_illegal_dfm() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1376,6 +1382,7 @@ void m68000_device::state_priviledge_dfm() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1560,6 +1567,7 @@ void m68000_device::state_linea_dfm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1743,6 +1751,7 @@ void m68000_device::state_linef_dfm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -71696,6 +71705,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -71939,6 +71949,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72186,6 +72197,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72435,6 +72447,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72700,6 +72713,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73003,6 +73017,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73267,6 +73282,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73552,6 +73568,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73816,6 +73833,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74118,6 +74136,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74360,6 +74379,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -93955,6 +93975,7 @@ void m68000_device::trap_imm4_dfm() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -94817,6 +94838,7 @@ trpv3: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -127075,6 +127097,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127478,6 +127501,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127885,6 +127909,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128294,6 +128319,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128719,6 +128745,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129182,6 +129209,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129606,6 +129634,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130051,6 +130080,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130475,6 +130505,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130937,6 +130968,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -131339,6 +131371,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134403,6 +134436,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134939,6 +134973,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -135479,6 +135514,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136021,6 +136057,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136579,6 +136616,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137175,6 +137213,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137732,6 +137771,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138310,6 +138350,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138867,6 +138908,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139462,6 +139504,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139997,6 +140040,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000-sdp.cpp b/src/devices/cpu/m68000/m68000-sdp.cpp index eadc34edef1..999bf3ea693 100644 --- a/src/devices/cpu/m68000/m68000-sdp.cpp +++ b/src/devices/cpu/m68000/m68000-sdp.cpp @@ -19,6 +19,7 @@ void m68000_device::state_reset_dp() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -367,6 +368,7 @@ void m68000_device::state_bus_error_dp() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -681,6 +683,7 @@ void m68000_device::state_address_error_dp() m_inst_substate = 0; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -938,6 +941,7 @@ void m68000_device::state_interrupt_dp() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1146,6 +1150,7 @@ void m68000_device::state_trace_dp() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1354,6 +1359,7 @@ void m68000_device::state_illegal_dp() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1561,6 +1567,7 @@ void m68000_device::state_priviledge_dp() m_inst_substate = 0; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1770,6 +1777,7 @@ void m68000_device::state_linea_dp() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1978,6 +1986,7 @@ void m68000_device::state_linef_dp() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -81656,6 +81665,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -81927,6 +81937,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82202,6 +82213,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82479,6 +82491,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82775,6 +82788,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83112,6 +83126,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83407,6 +83422,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83726,6 +83742,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84021,6 +84038,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84357,6 +84375,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84627,6 +84646,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -106971,6 +106991,7 @@ void m68000_device::trap_imm4_dp() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -107961,6 +107982,7 @@ trpv3: m_inst_substate = 0; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -144390,6 +144412,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -144829,6 +144852,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145272,6 +145296,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145717,6 +145742,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146181,6 +146207,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146686,6 +146713,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147149,6 +147177,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147636,6 +147665,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148099,6 +148129,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148603,6 +148634,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -149041,6 +149073,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -152513,6 +152546,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153085,6 +153119,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153661,6 +153696,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154239,6 +154275,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154836,6 +154873,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -155474,6 +155512,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156070,6 +156109,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156690,6 +156730,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157286,6 +157327,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157923,6 +157965,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -158494,6 +158537,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000-sdpm.cpp b/src/devices/cpu/m68000/m68000-sdpm.cpp index 95cb2d438bf..69569cff4e6 100644 --- a/src/devices/cpu/m68000/m68000-sdpm.cpp +++ b/src/devices/cpu/m68000/m68000-sdpm.cpp @@ -19,6 +19,7 @@ void m68000_device::state_reset_dpm() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -367,6 +368,7 @@ void m68000_device::state_bus_error_dpm() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -681,6 +683,7 @@ void m68000_device::state_address_error_dpm() m_inst_substate = 0; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -938,6 +941,7 @@ void m68000_device::state_interrupt_dpm() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1146,6 +1150,7 @@ void m68000_device::state_trace_dpm() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1354,6 +1359,7 @@ void m68000_device::state_illegal_dpm() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1561,6 +1567,7 @@ void m68000_device::state_priviledge_dpm() m_inst_substate = 0; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1770,6 +1777,7 @@ void m68000_device::state_linea_dpm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1978,6 +1986,7 @@ void m68000_device::state_linef_dpm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -81656,6 +81665,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -81927,6 +81937,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82202,6 +82213,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82479,6 +82491,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82775,6 +82788,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83112,6 +83126,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83407,6 +83422,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83726,6 +83742,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84021,6 +84038,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84357,6 +84375,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84627,6 +84646,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -106971,6 +106991,7 @@ void m68000_device::trap_imm4_dpm() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -107961,6 +107982,7 @@ trpv3: m_inst_substate = 0; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -144390,6 +144412,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -144829,6 +144852,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145272,6 +145296,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145717,6 +145742,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146181,6 +146207,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146686,6 +146713,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147149,6 +147177,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147636,6 +147665,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148099,6 +148129,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148603,6 +148634,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -149041,6 +149073,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -152513,6 +152546,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153085,6 +153119,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153661,6 +153696,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154239,6 +154275,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154836,6 +154873,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -155474,6 +155512,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156070,6 +156109,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156690,6 +156730,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157286,6 +157327,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157923,6 +157965,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -158494,6 +158537,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000-sif.cpp b/src/devices/cpu/m68000/m68000-sif.cpp index ebfa0f05d33..a347a8d792b 100644 --- a/src/devices/cpu/m68000/m68000-sif.cpp +++ b/src/devices/cpu/m68000/m68000-sif.cpp @@ -17,6 +17,7 @@ void m68000_device::state_reset_if() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -325,6 +326,7 @@ void m68000_device::state_bus_error_if() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -602,6 +604,7 @@ void m68000_device::state_address_error_if() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -828,6 +831,7 @@ void m68000_device::state_interrupt_if() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1011,6 +1015,7 @@ void m68000_device::state_trace_if() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1194,6 +1199,7 @@ void m68000_device::state_illegal_if() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1376,6 +1382,7 @@ void m68000_device::state_priviledge_if() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1560,6 +1567,7 @@ void m68000_device::state_linea_if() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1743,6 +1751,7 @@ void m68000_device::state_linef_if() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -71696,6 +71705,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -71939,6 +71949,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72186,6 +72197,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72435,6 +72447,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72700,6 +72713,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73003,6 +73017,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73267,6 +73282,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73552,6 +73568,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73816,6 +73833,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74118,6 +74136,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74360,6 +74379,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -93955,6 +93975,7 @@ void m68000_device::trap_imm4_if() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -94817,6 +94838,7 @@ trpv3: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -127075,6 +127097,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127478,6 +127501,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127885,6 +127909,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128294,6 +128319,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128719,6 +128745,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129182,6 +129209,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129606,6 +129634,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130051,6 +130080,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130475,6 +130505,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130937,6 +130968,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -131339,6 +131371,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134403,6 +134436,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134939,6 +134973,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -135479,6 +135514,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136021,6 +136057,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136579,6 +136616,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137175,6 +137213,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137732,6 +137771,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138310,6 +138350,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138867,6 +138908,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139462,6 +139504,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139997,6 +140040,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000-sifm.cpp b/src/devices/cpu/m68000/m68000-sifm.cpp index 08e4452345c..06d94ff7c2f 100644 --- a/src/devices/cpu/m68000/m68000-sifm.cpp +++ b/src/devices/cpu/m68000/m68000-sifm.cpp @@ -17,6 +17,7 @@ void m68000_device::state_reset_ifm() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -325,6 +326,7 @@ void m68000_device::state_bus_error_ifm() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -602,6 +604,7 @@ void m68000_device::state_address_error_ifm() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -828,6 +831,7 @@ void m68000_device::state_interrupt_ifm() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1011,6 +1015,7 @@ void m68000_device::state_trace_ifm() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1194,6 +1199,7 @@ void m68000_device::state_illegal_ifm() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1376,6 +1382,7 @@ void m68000_device::state_priviledge_ifm() m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1560,6 +1567,7 @@ void m68000_device::state_linea_ifm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1743,6 +1751,7 @@ void m68000_device::state_linef_ifm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -71696,6 +71705,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -71939,6 +71949,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72186,6 +72197,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72435,6 +72447,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -72700,6 +72713,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73003,6 +73017,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73267,6 +73282,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73552,6 +73568,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -73816,6 +73833,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74118,6 +74136,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -74360,6 +74379,7 @@ trap1: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -93955,6 +93975,7 @@ void m68000_device::trap_imm4_ifm() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -94817,6 +94838,7 @@ trpv3: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -127075,6 +127097,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127478,6 +127501,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -127885,6 +127909,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128294,6 +128319,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -128719,6 +128745,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129182,6 +129209,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -129606,6 +129634,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130051,6 +130080,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130475,6 +130505,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -130937,6 +130968,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -131339,6 +131371,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134403,6 +134436,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -134939,6 +134973,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -135479,6 +135514,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136021,6 +136057,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -136579,6 +136616,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137175,6 +137213,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -137732,6 +137771,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138310,6 +138350,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -138867,6 +138908,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139462,6 +139504,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -139997,6 +140040,7 @@ dvur2: m_inst_state = S_ADDRESS_ERROR; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000-sip.cpp b/src/devices/cpu/m68000/m68000-sip.cpp index a0894900657..5a8955e03d4 100644 --- a/src/devices/cpu/m68000/m68000-sip.cpp +++ b/src/devices/cpu/m68000/m68000-sip.cpp @@ -19,6 +19,7 @@ void m68000_device::state_reset_ip() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -367,6 +368,7 @@ void m68000_device::state_bus_error_ip() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -681,6 +683,7 @@ void m68000_device::state_address_error_ip() m_inst_substate = 0; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -938,6 +941,7 @@ void m68000_device::state_interrupt_ip() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1146,6 +1150,7 @@ void m68000_device::state_trace_ip() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1354,6 +1359,7 @@ void m68000_device::state_illegal_ip() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1561,6 +1567,7 @@ void m68000_device::state_priviledge_ip() m_inst_substate = 0; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1770,6 +1777,7 @@ void m68000_device::state_linea_ip() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1978,6 +1986,7 @@ void m68000_device::state_linef_ip() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -81656,6 +81665,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -81927,6 +81937,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82202,6 +82213,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82479,6 +82491,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82775,6 +82788,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83112,6 +83126,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83407,6 +83422,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83726,6 +83742,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84021,6 +84038,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84357,6 +84375,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84627,6 +84646,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -106971,6 +106991,7 @@ void m68000_device::trap_imm4_ip() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -107961,6 +107982,7 @@ trpv3: m_inst_substate = 0; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -144390,6 +144412,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -144829,6 +144852,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145272,6 +145296,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145717,6 +145742,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146181,6 +146207,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146686,6 +146713,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147149,6 +147177,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147636,6 +147665,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148099,6 +148129,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148603,6 +148634,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -149041,6 +149073,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -152513,6 +152546,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153085,6 +153119,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153661,6 +153696,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154239,6 +154275,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154836,6 +154873,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -155474,6 +155512,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156070,6 +156109,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156690,6 +156730,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157286,6 +157327,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157923,6 +157965,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -158494,6 +158537,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000-sipm.cpp b/src/devices/cpu/m68000/m68000-sipm.cpp index 1f4ea4f981e..0ca1e27be04 100644 --- a/src/devices/cpu/m68000/m68000-sipm.cpp +++ b/src/devices/cpu/m68000/m68000-sipm.cpp @@ -19,6 +19,7 @@ void m68000_device::state_reset_ipm() if(m_sr & SR_T) m_next_state = S_TRACE; // 27e rstp5 + debugger_exception_hook(0x00); m_ftu = 0x0000; m_icount -= 2; // 27f rstp6 @@ -367,6 +368,7 @@ void m68000_device::state_bus_error_ipm() return; } m_da[16] = m_au; + debugger_exception_hook(0x02); m_ftu = 0x0008; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -681,6 +683,7 @@ void m68000_device::state_address_error_ipm() m_inst_substate = 0; return; } + debugger_exception_hook(0x03); m_da[16] = m_au; m_ftu = 0x000c; m_au = m_au + 2; @@ -938,6 +941,7 @@ void m68000_device::state_interrupt_ipm() return; } m_da[16] = m_au; + debugger_exception_hook((m_int_vector) >> 2); m_ftu = m_int_vector; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1146,6 +1150,7 @@ void m68000_device::state_trace_ipm() return; } m_da[16] = m_au; + debugger_exception_hook(0x09); m_ftu = 0x0024; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1354,6 +1359,7 @@ void m68000_device::state_illegal_ipm() return; } m_da[16] = m_au; + debugger_exception_hook(0x04); m_ftu = 0x0010; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1561,6 +1567,7 @@ void m68000_device::state_priviledge_ipm() m_inst_substate = 0; return; } + debugger_exception_hook(0x08); m_da[16] = m_au; m_ftu = 0x0020; m_au = m_au + 2; @@ -1770,6 +1777,7 @@ void m68000_device::state_linea_ipm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0a); m_ftu = 0x0028; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -1978,6 +1986,7 @@ void m68000_device::state_linef_ipm() return; } m_da[16] = m_au; + debugger_exception_hook(0x0b); m_ftu = 0x002c; m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -81656,6 +81665,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -81927,6 +81937,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82202,6 +82213,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82479,6 +82491,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -82775,6 +82788,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83112,6 +83126,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83407,6 +83422,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -83726,6 +83742,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84021,6 +84038,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84357,6 +84375,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -84627,6 +84646,7 @@ trap1: m_inst_substate = 0; return; } + debugger_exception_hook(0x06); m_da[16] = m_au; m_ftu = 0x0018; m_au = m_au + 2; @@ -106971,6 +106991,7 @@ void m68000_device::trap_imm4_ipm() // 4e40 fff0 return; } m_da[16] = m_au; + debugger_exception_hook((0x80 | ((m_ird & 0xf) << 2)) >> 2); m_ftu = 0x80 | ((m_ird & 0xf) << 2); m_au = m_au + 2; // alu r=0 c=1 m=..... i=....... ALU.and_ a=R.pch:m_pc d=-1 @@ -107961,6 +107982,7 @@ trpv3: m_inst_substate = 0; return; } + debugger_exception_hook(0x07); m_da[16] = m_au; m_ftu = 0x001c; m_au = m_au + 2; @@ -144390,6 +144412,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -144829,6 +144852,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145272,6 +145296,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -145717,6 +145742,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146181,6 +146207,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -146686,6 +146713,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147149,6 +147177,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -147636,6 +147665,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148099,6 +148129,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -148603,6 +148634,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -149041,6 +149073,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -152513,6 +152546,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153085,6 +153119,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -153661,6 +153696,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154239,6 +154275,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -154836,6 +154873,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -155474,6 +155512,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156070,6 +156109,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -156690,6 +156730,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157286,6 +157327,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -157923,6 +157965,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; @@ -158494,6 +158537,7 @@ dvur2: m_inst_substate = 0; return; } + debugger_exception_hook(0x05); m_da[16] = m_au; m_ftu = 0x0014; m_au = m_au + 2; diff --git a/src/devices/cpu/m68000/m68000.cpp b/src/devices/cpu/m68000/m68000.cpp index e102321f7aa..ef2d7a5ab29 100644 --- a/src/devices/cpu/m68000/m68000.cpp +++ b/src/devices/cpu/m68000/m68000.cpp @@ -266,6 +266,7 @@ void m68000_device::device_start() state_add(STATE_GENPCBASE, "PC", m_ipc).callimport(); state_add(STATE_GENPC, "rPC", m_pc); + state_add(M68K_IR, "IR", m_ir); state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).noshow().callexport().formatstr("%16s"); state_add(M68K_SR, "SR", m_sr).callimport(); for(int r = 0; r != 8; r++) diff --git a/src/devices/cpu/m68000/m68000gen.py b/src/devices/cpu/m68000/m68000gen.py index 7d407ba60bd..15d42c5fbcd 100755 --- a/src/devices/cpu/m68000/m68000gen.py +++ b/src/devices/cpu/m68000/m68000gen.py @@ -921,6 +921,8 @@ def code_find_deps(ci): return [DEP.aluo, expr_deps(ci[4])] else: return [DEP.aluo, expr_deps(ci[4]) | expr_deps(ci[5])] + elif ci[0] == "trap": + return [0, expr_deps(ci[1:])] print(ci) sys.exit(1) @@ -1603,14 +1605,17 @@ def generate_base_code_for_microcode(ir, irmask, madr, tvn, group01): if tvn_to_ftu: if tvn != None: + code_to_sort.append(["trap", tvn]) if type(tvn) == str: code_to_sort.append(["=", R.ftu, tvn]) else: code_to_sort.append(["=", R.ftu, "c", tvn << 2]) - elif type(macro_tvn) == str: - code_to_sort.append(["=", R.ftu, macro_tvn]) else: - code_to_sort.append(["=", R.ftu, "c", macro_tvn << 2]) + code_to_sort.append(["trap", macro_tvn]) + if type(macro_tvn) == str: + code_to_sort.append(["=", R.ftu, macro_tvn]) + else: + code_to_sort.append(["=", R.ftu, "c", macro_tvn << 2]) if ird_to_ftu: code_to_sort.append(["=", R.ftu, R.ird]) @@ -2267,6 +2272,11 @@ def generate_source_from_code(code, gen_mode): source.append("\t\tgoto %s;" % ci[1][2]) source.append("\telse") source.append("\t\tgoto %s;" % ci[1][3]) + elif ci[0] == "trap": + if type(ci[1]) == str: + source.append("\tdebugger_exception_hook((%s) >> 2);" % make_expression(ci[1])) + else: + source.append("\tdebugger_exception_hook(0x%02x);" % ci[1]) else: source.append("\t%s" % ci) -- cgit v1.2.3