diff --git a/.gitattributes b/.gitattributes index ba92bdc30bc..c0536d290ce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2310,7 +2310,7 @@ src/mame/includes/wwfwfest.h svneol=native#text/plain src/mame/includes/xybots.h svneol=native#text/plain src/mame/includes/zaxxon.h svneol=native#text/plain src/mame/layout/abaseb.lay svneol=native#text/plain -src/mame/layout/ampoker.lay svneol=native#text/plain +src/mame/layout/ampoker2.lay svneol=native#text/plain src/mame/layout/atarifb.lay svneol=native#text/plain src/mame/layout/atarifb4.lay svneol=native#text/plain src/mame/layout/avalnche.lay svneol=native#text/plain diff --git a/makefile b/makefile index aaea6213ee5..2672ebb2e51 100644 --- a/makefile +++ b/makefile @@ -93,7 +93,10 @@ endif # for details #------------------------------------------------- -# uncomment next line to include the debugger +# uncomment next line to enable the debugger +# DEBUGGER = 1 + +# uncomment next line to build a debug version # DEBUG = 1 # uncomment next line to include the internal profiler @@ -197,8 +200,8 @@ RM = @rm -f # form the name of the executable #------------------------------------------------- -# debug builds just get the 'd' suffix and nothing more -ifdef DEBUG +# debugger builds just get the 'd' suffix and nothing more +ifdef DEBUGGER DEBUGSUFFIX = d endif @@ -257,6 +260,11 @@ ifdef PTR64 DEFS += -DPTR64 endif +# define ENABLE_DEBUGGER if we are a debugger-enabled build +ifdef DEBUGGER +DEFS += -DENABLE_DEBUGGER +endif + # define MAME_DEBUG if we are a debugging build ifdef DEBUG DEFS += -DMAME_DEBUG diff --git a/src/emu/cpu/adsp2100/adsp2100.c b/src/emu/cpu/adsp2100/adsp2100.c index 9177c3ee835..fa9cc4f6739 100644 --- a/src/emu/cpu/adsp2100/adsp2100.c +++ b/src/emu/cpu/adsp2100/adsp2100.c @@ -951,7 +951,7 @@ static int adsp2100_execute(int cycles) /* debugging */ adsp2100.ppc = adsp2100.pc; /* copy PC to previous PC */ - CALL_MAME_DEBUG; + CALL_DEBUGGER(adsp2100.pc); #if TRACK_HOTSPOTS pcbucket[adsp2100.pc & 0x3fff]++; @@ -1691,9 +1691,9 @@ static int adsp2100_execute(int cycles) DEBUGGER DEFINITIONS ***************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t adsp2100_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -1948,9 +1948,9 @@ static void adsp21xx_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = adsp2100_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = adsp2100_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = adsp2100_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &adsp2100_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/alph8201/alph8201.c b/src/emu/cpu/alph8201/alph8201.c index ae154bc398b..536c5bc7003 100644 --- a/src/emu/cpu/alph8201/alph8201.c +++ b/src/emu/cpu/alph8201/alph8201.c @@ -785,7 +785,7 @@ mame_printf_debug("ALPHA8201 START ENTRY=%02X PC=%03X\n",pcptr,PC); /* run */ R.PREVPC = PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); opcode =M_RDOP(PC); #if TRACE_PC mame_printf_debug("ALPHA8201: PC = %03x, opcode = %02x\n", PC, opcode); @@ -949,9 +949,9 @@ static void alpha8xxx_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = ALPHA8201_reset; break; case CPUINFO_PTR_EXIT: info->exit = ALPHA8201_exit; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ALPHA8201_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ALPHA8201_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/alph8201/alph8201.h b/src/emu/cpu/alph8201/alph8201.h index 015d3848f88..9b99e8eb86b 100644 --- a/src/emu/cpu/alph8201/alph8201.h +++ b/src/emu/cpu/alph8201/alph8201.h @@ -65,7 +65,7 @@ extern void ALPHA8301_get_info(UINT32 state, cpuinfo *info); */ #define ALPHA8201_RDOP_ARG(A) ((unsigned)cpu_readop_arg(A)) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t ALPHA8201_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/apexc/apexc.c b/src/emu/cpu/apexc/apexc.c index 3c335c9206d..c4912b270bf 100644 --- a/src/emu/cpu/apexc/apexc.c +++ b/src/emu/cpu/apexc/apexc.c @@ -803,7 +803,7 @@ static int apexc_execute(int cycles) do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(effective_address(apexc.ml)); if (apexc.running) execute(); @@ -900,9 +900,9 @@ void apexc_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXECUTE: info->execute = apexc_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = apexc_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &apexc_ICount; break; case CPUINFO_STR_NAME: strcpy(info->s = cpuintrf_temp_str(), "APEXC"); break; diff --git a/src/emu/cpu/apexc/apexc.h b/src/emu/cpu/apexc/apexc.h index 165452b6c6b..54a8326c194 100644 --- a/src/emu/cpu/apexc/apexc.h +++ b/src/emu/cpu/apexc/apexc.h @@ -28,9 +28,9 @@ without danger */ #define apexc_writemem_masked(address, data, mask) cpu_writemem13_32masked((address), (data), (mask)) #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned apexc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #define apexc_readop(address) apexc_readmem(address) diff --git a/src/emu/cpu/arm/arm.c b/src/emu/cpu/arm/arm.c index 050467b1326..c51c6523bac 100644 --- a/src/emu/cpu/arm/arm.c +++ b/src/emu/cpu/arm/arm.c @@ -324,7 +324,7 @@ static int arm_execute( int cycles ) arm_icount = cycles; do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(R15); /* load instruction */ pc = R15; @@ -503,13 +503,13 @@ static void set_irq_line(int irqline, int state) arm_check_irq_state(); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t arm_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { UINT32 opcode = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24); return 4 | arm_disasm(buffer, pc, opcode); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void arm_init(int index, int clock, const void *config, int (*irqcallback)(int)) { @@ -1532,9 +1532,9 @@ void arm_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = arm_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = arm_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = arm_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &arm_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/arm/arm.h b/src/emu/cpu/arm/arm.h index a7331cebf5a..2f752720264 100644 --- a/src/emu/cpu/arm/arm.h +++ b/src/emu/cpu/arm/arm.h @@ -16,7 +16,7 @@ extern void arm_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern UINT32 arm_disasm( char *pBuf, UINT32 pc, UINT32 opcode ); #endif diff --git a/src/emu/cpu/arm7/arm7.c b/src/emu/cpu/arm7/arm7.c index 97ba6223d1d..1963543f3c4 100644 --- a/src/emu/cpu/arm7/arm7.c +++ b/src/emu/cpu/arm7/arm7.c @@ -49,7 +49,7 @@ static READ32_HANDLER(test_rt_r_callback); static WRITE32_HANDLER(test_rt_w_callback); static void test_dt_r_callback (UINT32 insn, UINT32* prn, UINT32 (*read32)(int addr)); static void test_dt_w_callback (UINT32 insn, UINT32* prn, void (*write32)(int addr, UINT32 data)); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static char *Spec_RT( char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); static char *Spec_DT( char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); static char *Spec_DO( char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0); @@ -102,7 +102,7 @@ static void arm7_init(int index, int clock, const void *config, int (*irqcallbac arm7_coproc_rt_w_callback = test_rt_w_callback; arm7_coproc_dt_r_callback = test_dt_r_callback; arm7_coproc_dt_w_callback = test_dt_w_callback; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER //setup dasm callbacks - direct method example arm7_dasm_cop_dt_callback = Spec_DT; arm7_dasm_cop_rt_callback = Spec_RT; @@ -153,7 +153,7 @@ static void arm7_set_context(void *src) } } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t arm7_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { if( T_IS_SET(GET_CPSR) ) @@ -165,7 +165,7 @@ static offs_t arm7_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 return arm7_disasm( buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)) | 4; } } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /************************************************************************** @@ -343,9 +343,9 @@ void arm7_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = arm7_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = arm7_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = arm7_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ARM7_ICOUNT; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -445,7 +445,7 @@ static void test_dt_w_callback (UINT32 insn, UINT32* prn, void (*write32)(int ad } /* Custom Co-proc DASM handlers */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static char *Spec_RT( char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0) { pBuf += sprintf( pBuf, "SPECRT"); diff --git a/src/emu/cpu/arm7/arm7core.c b/src/emu/cpu/arm7/arm7core.c index cfcce75dd50..71c881fd4b8 100644 --- a/src/emu/cpu/arm7/arm7core.c +++ b/src/emu/cpu/arm7/arm7core.c @@ -125,7 +125,7 @@ WRITE32_HANDLER((*arm7_coproc_rt_w_callback)); //holder for the co processor Re void (*arm7_coproc_dt_r_callback)(UINT32 insn, UINT32* prn, UINT32 (*read32)(int addr)); void (*arm7_coproc_dt_w_callback)(UINT32 insn, UINT32* prn, void (*write32)(int addr, UINT32 data)); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER //custom dasm callback handlers for co-processor instructions char *(*arm7_dasm_cop_dt_callback)( char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0 ); char *(*arm7_dasm_cop_rt_callback)( char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0 ); diff --git a/src/emu/cpu/arm7/arm7core.h b/src/emu/cpu/arm7/arm7core.h index e0904921386..c74005c8367 100644 --- a/src/emu/cpu/arm7/arm7core.h +++ b/src/emu/cpu/arm7/arm7core.h @@ -399,7 +399,7 @@ extern WRITE32_HANDLER((*arm7_coproc_rt_w_callback)); extern void (*arm7_coproc_dt_r_callback)(UINT32 insn, UINT32* prn, UINT32 (*read32)(int addr)); extern void (*arm7_coproc_dt_w_callback)(UINT32 insn, UINT32* prn, void (*write32)(int addr, UINT32 data)); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern UINT32 arm7_disasm( char *pBuf, UINT32 pc, UINT32 opcode ); extern UINT32 thumb_disasm( char *pBuf, UINT32 pc, UINT16 opcode ); diff --git a/src/emu/cpu/arm7/arm7exec.c b/src/emu/cpu/arm7/arm7exec.c index e4845f33503..66aa0977d81 100644 --- a/src/emu/cpu/arm7/arm7exec.c +++ b/src/emu/cpu/arm7/arm7exec.c @@ -47,7 +47,7 @@ ARM7_ICOUNT = cycles; do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(R15); /* handle Thumb instructions if active */ if( T_IS_SET(GET_CPSR) ) diff --git a/src/emu/cpu/asap/asap.c b/src/emu/cpu/asap/asap.c index acbd2da787b..bd3d57267e6 100644 --- a/src/emu/cpu/asap/asap.c +++ b/src/emu/cpu/asap/asap.c @@ -509,7 +509,7 @@ INLINE void fetch_instruction(void) { /* debugging */ asap.ppc = asap.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(asap.pc); /* instruction fetch */ asap.op.d = ROPCODE(asap.pc); @@ -565,9 +565,9 @@ static int asap_execute(int cycles) DISASSEMBLY HOOK ***************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t asap_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -1807,9 +1807,9 @@ void asap_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = asap_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = asap_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = asap_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &asap_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/ccpu/ccpu.c b/src/emu/cpu/ccpu/ccpu.c index ed710c0f753..d10de2d90d1 100644 --- a/src/emu/cpu/ccpu/ccpu.c +++ b/src/emu/cpu/ccpu/ccpu.c @@ -187,7 +187,7 @@ static int ccpu_execute(int cycles) ccpu.nextmiflag = ccpu.nextnextmiflag; /* fetch the opcode */ - CALL_MAME_DEBUG; + CALL_DEBUGGER(ccpu.PC); opcode = READOP(ccpu.PC++); switch (opcode) @@ -766,9 +766,9 @@ void ccpu_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = NULL; break; case CPUINFO_PTR_EXECUTE: info->execute = ccpu_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ccpu_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ccpu_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/ccpu/ccpu.h b/src/emu/cpu/ccpu/ccpu.h index 6b53f3e7545..24b5962c153 100644 --- a/src/emu/cpu/ccpu/ccpu.h +++ b/src/emu/cpu/ccpu/ccpu.h @@ -50,7 +50,7 @@ struct CCPUConfig void ccpu_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t ccpu_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/cdp1802/cdp1802.c b/src/emu/cpu/cdp1802/cdp1802.c index 883d2cfd484..9a23a2f853b 100644 --- a/src/emu/cpu/cdp1802/cdp1802.c +++ b/src/emu/cpu/cdp1802/cdp1802.c @@ -211,7 +211,7 @@ static void cdp1802_run(void) cdp1802_ICount -= CDP1802_CYCLES_RESET; - CALL_MAME_DEBUG; + CALL_DEBUGGER(cdp1802.r[cdp1802.p]); break; @@ -236,7 +236,7 @@ static void cdp1802_run(void) cdp1802.state = CDP1802_STATE_0_FETCH; } - CALL_MAME_DEBUG; + CALL_DEBUGGER(cdp1802.r[cdp1802.p]); break; @@ -713,7 +713,7 @@ static void cdp1802_run(void) cdp1802.state = CDP1802_STATE_0_FETCH; } - CALL_MAME_DEBUG; + CALL_DEBUGGER(cdp1802.r[cdp1802.p]); break; @@ -801,7 +801,7 @@ static void cdp1802_run(void) cdp1802.state = CDP1802_STATE_0_FETCH; } - CALL_MAME_DEBUG; + CALL_DEBUGGER(cdp1802.r[cdp1802.p]); break; } @@ -1002,9 +1002,9 @@ void cdp1802_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = cdp1802_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = cdp1802_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cdp1802_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cdp1802_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/cdp1802/cdp1802.h b/src/emu/cpu/cdp1802/cdp1802.h index e53c0ba26f9..813f3ced927 100644 --- a/src/emu/cpu/cdp1802/cdp1802.h +++ b/src/emu/cpu/cdp1802/cdp1802.h @@ -83,7 +83,7 @@ enum { void cdp1802_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t cdp1802_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/cop400/cop400.h b/src/emu/cpu/cop400/cop400.h index 3b6b718ac68..1d5eca904f8 100644 --- a/src/emu/cpu/cop400/cop400.h +++ b/src/emu/cpu/cop400/cop400.h @@ -42,9 +42,9 @@ extern void cop410_get_info(UINT32 state, cpuinfo *info); extern void cop411_get_info(UINT32 state, cpuinfo *info); extern void cop420_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t cop410_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); offs_t cop420_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif /* _COP400_H */ diff --git a/src/emu/cpu/cop400/cop410.c b/src/emu/cpu/cop400/cop410.c index 3135a0cf2ea..415d7b1bf5d 100644 --- a/src/emu/cpu/cop400/cop410.c +++ b/src/emu/cpu/cop400/cop410.c @@ -215,7 +215,7 @@ static int cop410_execute(int cycles) { prevPC = PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); opcode = ROM(PC); @@ -351,9 +351,9 @@ void cop410_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = cop410_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = cop410_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cop410_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cop410_ICount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map = construct_map_cop410_RAM; break; diff --git a/src/emu/cpu/cop400/cop420.c b/src/emu/cpu/cop400/cop420.c index e012748d688..648a165f8fd 100644 --- a/src/emu/cpu/cop400/cop420.c +++ b/src/emu/cpu/cop400/cop420.c @@ -223,7 +223,7 @@ static int cop420_execute(int cycles) { prevPC = PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); opcode = ROM(PC); @@ -380,9 +380,9 @@ void cop420_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = cop420_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = cop420_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cop420_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cop420_ICount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map = construct_map_cop420_RAM; break; diff --git a/src/emu/cpu/cp1610/cp1610.c b/src/emu/cpu/cp1610/cp1610.c index c185fcd93c4..085f0832200 100644 --- a/src/emu/cpu/cp1610/cp1610.c +++ b/src/emu/cpu/cp1610/cp1610.c @@ -2166,7 +2166,7 @@ static int cp1610_execute(int cycles) do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(cp1610.r[7]); cp1610.mask_interrupts = 0; @@ -3491,9 +3491,9 @@ void cp1610_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXECUTE: info->execute = cp1610_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cp1610_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cp1610_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/cp1610/cp1610.h b/src/emu/cpu/cp1610/cp1610.h index 4fdcb0d933b..2bee8945c7a 100644 --- a/src/emu/cpu/cp1610/cp1610.h +++ b/src/emu/cpu/cp1610/cp1610.h @@ -35,9 +35,9 @@ enum { void cp1610_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned cp1610_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ // Temporary #define cp1610_readop(A) program_read_word_16be((A)<<1) diff --git a/src/emu/cpu/cpu.mak b/src/emu/cpu/cpu.mak index 00db798e9d4..1e1e60a7b4b 100644 --- a/src/emu/cpu/cpu.mak +++ b/src/emu/cpu/cpu.mak @@ -1235,6 +1235,28 @@ $(CPUOBJ)/upd7810/upd7810.o: $(CPUSRC)/upd7810/upd7810.c \ +#------------------------------------------------- +# Nintendo Minx +#------------------------------------------------- + +CPUDEFS += -DHAS_MINX=$(if $(filter MINX,$(CPUS)),1,0) + +ifneq ($(filter MINX,$(CPUS)),) +OBJDIRS += $(CPUOBJ)/minx +CPUOBJS += $(CPUOBJ)/minx/minx.o +DBGOBJS += $(CPUOBJ)/minx/minxd.o +endif + +$(CPUOBJ)/minx/minx.o: $(CPUSRC)/minx/minx.c \ + $(CPUSRC)/minx/minx.h \ + $(CPUSRC)/minx/minxd.c \ + $(CPUSRC)/minx/minxopce.h \ + $(CPUSRC)/minx/minxopcf.h \ + $(CPUSRC)/minx/minxops.h \ + $(CPUSRC)/minx/minxfunc.h + + + #------------------------------------------------- # Nintendo/SGI RSP (R3000-based + vector processing) #------------------------------------------------- @@ -1610,6 +1632,25 @@ $(CPUOBJ)/z80/z80.o: $(CPUSRC)/z80/z80.c \ +#------------------------------------------------- +# Game Boy Z-80 +#------------------------------------------------- + +CPUDEFS += -DHAS_Z80GB=$(if $(filter Z80GB,$(CPUS)),1,0) + +ifneq ($(filter Z80GB,$(CPUS)),) +OBJDIRS += $(CPUOBJ)/z80gb +CPUOBJS += $(CPUOBJ)/z80gb/z80gb.o +DBGOBJS += $(CPUOBJ)/z80gb/z80gbd.o +endif + +$(CPUOBJ)/z80gb/z80gb.o: $(CPUSRC)/z80gb/z80gb.c \ + $(CPUSRC)/z80gb/z80gb.h \ + $(CPUSRC)/z80gb/opc_cb.h \ + $(CPUSRC)/z80gb/opc_main.h + + + #------------------------------------------------- # Zilog Z180 #------------------------------------------------- @@ -1654,44 +1695,3 @@ $(CPUOBJ)/z8000/z8000.o: $(CPUSRC)/z8000/z8000.c \ $(CPUSRC)/z8000/z8000dab.h \ $(CPUSRC)/z8000/z8000ops.c \ $(CPUSRC)/z8000/z8000tbl.c - - - -#------------------------------------------------- -# Game Boy Z-80 -#------------------------------------------------- - -CPUDEFS += -DHAS_Z80GB=$(if $(filter Z80GB,$(CPUS)),1,0) - -ifneq ($(filter Z80GB,$(CPUS)),) -OBJDIRS += $(CPUOBJ)/z80gb -CPUOBJS += $(CPUOBJ)/z80gb/z80gb.o -DBGOBJS += $(CPUOBJ)/z80gb/z80gbd.o -endif - -$(CPUOBJ)/z80gb/z80gb.o: $(CPUSRC)/z80gb/z80gb.c \ - $(CPUSRC)/z80gb/z80gb.h \ - $(CPUSRC)/z80gb/opc_cb.h \ - $(CPUSRC)/z80gb/opc_main.h - -#------------------------------------------------- -# Nintendo Minx -#------------------------------------------------- - -CPUDEFS += -DHAS_MINX=$(if $(filter MINX,$(CPUS)),1,0) - -ifneq ($(filter MINX,$(CPUS)),) -OBJDIRS += $(CPUOBJ)/minx -CPUOBJS += $(CPUOBJ)/minx/minx.o -DBGOBJS += $(CPUOBJ)/minx/minxd.o -endif - -$(CPUOBJ)/minx/minx.o: $(CPUSRC)/minx/minx.c \ - $(CPUSRC)/minx/minx.h \ - $(CPUSRC)/minx/minxd.c \ - $(CPUSRC)/minx/minxopce.h \ - $(CPUSRC)/minx/minxopcf.h \ - $(CPUSRC)/minx/minxops.h \ - $(CPUSRC)/minx/minxfunc.h - - diff --git a/src/emu/cpu/dsp32/dsp32.c b/src/emu/cpu/dsp32/dsp32.c index 30724d0e4ef..6270355dc4c 100644 --- a/src/emu/cpu/dsp32/dsp32.c +++ b/src/emu/cpu/dsp32/dsp32.c @@ -435,13 +435,13 @@ static int dsp32c_execute(int cycles) DISASSEMBLY HOOK ***************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t dsp32c_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { extern unsigned dasm_dsp32(char *, unsigned, UINT32); return dasm_dsp32(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -873,9 +873,9 @@ void dsp32c_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = dsp32c_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = dsp32c_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = dsp32c_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &dsp32_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/dsp32/dsp32ops.c b/src/emu/cpu/dsp32/dsp32ops.c index 6c0ddde8e79..e23b453eab4 100644 --- a/src/emu/cpu/dsp32/dsp32ops.c +++ b/src/emu/cpu/dsp32/dsp32ops.c @@ -130,7 +130,7 @@ static void unimplemented(void) INLINE void execute_one(void) { PROCESS_DEFERRED_MEMORY(); - CALL_MAME_DEBUG; + CALL_DEBUGGER(dsp32.PC); OP = ROPCODE(dsp32.PC); dsp32_icount -= 4; /* 4 clocks per cycle */ dsp32.PC += 4; diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c index e40523907e6..60fca10b430 100644 --- a/src/emu/cpu/dsp56k/dsp56k.c +++ b/src/emu/cpu/dsp56k/dsp56k.c @@ -1234,9 +1234,9 @@ void dsp56k_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = dsp56k_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = dsp56k_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = dsp56k_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &dsp56k_icount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map = construct_map_dsp56156_x_data_memory; break; diff --git a/src/emu/cpu/dsp56k/dsp56ops.c b/src/emu/cpu/dsp56k/dsp56ops.c index a6907f20b58..85d34a8568e 100644 --- a/src/emu/cpu/dsp56k/dsp56ops.c +++ b/src/emu/cpu/dsp56k/dsp56ops.c @@ -117,7 +117,7 @@ static void execute_one(void) { unsigned size = 666 ; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); OP = ROPCODE(PC<<1); if (BITS(OP,0x8000)) // First, the parallel data move instructions diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c index 3aae28b34e2..47418764342 100644 --- a/src/emu/cpu/e132xs/e132xs.c +++ b/src/emu/cpu/e132xs/e132xs.c @@ -1747,12 +1747,12 @@ static void hyperstone_set_context(void *regs) hyperstone = *(hyperstone_regs *)regs; } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t hyperstone_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return dasm_hyperstone( buffer, pc, oprom, GET_H, GET_FP ); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* Opcodes */ @@ -4735,7 +4735,7 @@ static int hyperstone_execute(int cycles) UINT16 opcode; PPC = PC; /* copy PC to previous PC */ - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); opcode = READ_OP(PC); PC += 2; @@ -5057,9 +5057,9 @@ static void hyperstone_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = hyperstone_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = hyperstone_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hyperstone_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &hyperstone_ICount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map = 0; break; diff --git a/src/emu/cpu/e132xs/e132xs.h b/src/emu/cpu/e132xs/e132xs.h index 6494bcbed68..cde2b0f55ce 100644 --- a/src/emu/cpu/e132xs/e132xs.h +++ b/src/emu/cpu/e132xs/e132xs.h @@ -77,7 +77,7 @@ void gms30c2216_get_info(UINT32 state, cpuinfo *info); void gms30c2232_get_info(UINT32 state, cpuinfo *info); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned dasm_hyperstone(char *buffer, unsigned pc, const UINT8 *oprom, unsigned h_flag, int private_fp); #endif diff --git a/src/emu/cpu/f8/f8.c b/src/emu/cpu/f8/f8.c index 06345509432..e946a289718 100644 --- a/src/emu/cpu/f8/f8.c +++ b/src/emu/cpu/f8/f8.c @@ -1576,7 +1576,7 @@ static int f8_execute(int cycles) do { UINT8 op=f8.dbus; - CALL_MAME_DEBUG; + CALL_DEBUGGER((f8.pc0 - 1) & 0xffff); switch( op ) { @@ -1891,9 +1891,9 @@ static void f8_set_context (void *src) f8 = *(f8_Regs *) src; } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned f8_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void f8_init (int index, int clock, const void *config, int (*irqcallback)(int)) { @@ -2116,9 +2116,9 @@ void f8_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXECUTE: info->execute = f8_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = f8_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &f8_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/g65816/g65816.c b/src/emu/cpu/g65816/g65816.c index 5a1e165d1ce..46a5673f3dc 100644 --- a/src/emu/cpu/g65816/g65816.c +++ b/src/emu/cpu/g65816/g65816.c @@ -310,14 +310,14 @@ static void g65816_set_irq_callback(int (*callback)(int)) /* Disassemble an instruction */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "g65816ds.h" static offs_t g65816_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return g65816_disassemble(buffer, (pc & 0x00ffff), (pc & 0xff0000) >> 16, oprom, FLAG_M, FLAG_X); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -430,9 +430,9 @@ void g65816_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = g65816_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = g65816_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = g65816_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &g65816_ICount; break; case CPUINFO_PTR_G65816_READVECTOR_CALLBACK: info->f = (genf *) READ_VECTOR; break; diff --git a/src/emu/cpu/g65816/g65816.h b/src/emu/cpu/g65816/g65816.h index c21ff9f0951..2c76f18d781 100644 --- a/src/emu/cpu/g65816/g65816.h +++ b/src/emu/cpu/g65816/g65816.h @@ -89,7 +89,7 @@ enum void g65816_get_info(UINT32 state, cpuinfo *info); #undef G65816_CALL_DEBUGGER -#define G65816_CALL_DEBUGGER CALL_MAME_DEBUG +#define G65816_CALL_DEBUGGER CALL_DEBUGGER #define g65816_read_8(addr) program_read_byte_8(addr) #define g65816_write_8(addr,data) program_write_byte_8(addr,data) diff --git a/src/emu/cpu/g65816/g65816op.h b/src/emu/cpu/g65816/g65816op.h index dc4b1bfcad8..28ce94667eb 100644 --- a/src/emu/cpu/g65816/g65816op.h +++ b/src/emu/cpu/g65816/g65816op.h @@ -2435,7 +2435,7 @@ TABLE_FUNCTION(int, execute, (int clocks)) g65816i_check_maskable_interrupt(); REGISTER_PPC = REGISTER_PC; - G65816_CALL_DEBUGGER; + G65816_CALL_DEBUGGER(REGISTER_PC); REGISTER_PC++; REGISTER_IR = read_8_IMM(REGISTER_PB | REGISTER_PPC); diff --git a/src/emu/cpu/h6280/h6280.c b/src/emu/cpu/h6280/h6280.c index 5272473675f..c8dbf77e55d 100644 --- a/src/emu/cpu/h6280/h6280.c +++ b/src/emu/cpu/h6280/h6280.c @@ -245,7 +245,7 @@ static int h6280_execute(int cycles) CHANGE_PC; h6280.ppc = h6280.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCW); /* Execute 1 instruction */ in=RDOP(); @@ -427,7 +427,7 @@ static void h6280_set_info(UINT32 state, cpuinfo *info) case CPUINFO_INT_REGISTER + H6280_IRQ1_STATE: set_irq_line( 0, info->i ); break; case CPUINFO_INT_REGISTER + H6280_IRQ2_STATE: set_irq_line( 1, info->i ); break; case CPUINFO_INT_REGISTER + H6280_IRQT_STATE: set_irq_line( 2, info->i ); break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_INT_REGISTER + H6280_M1: h6280.mmr[0] = info->i; break; case CPUINFO_INT_REGISTER + H6280_M2: h6280.mmr[1] = info->i; break; case CPUINFO_INT_REGISTER + H6280_M3: h6280.mmr[2] = info->i; break; @@ -494,7 +494,7 @@ void h6280_get_info(UINT32 state, cpuinfo *info) case CPUINFO_INT_REGISTER + H6280_IRQ1_STATE: info->i = h6280.irq_state[0]; break; case CPUINFO_INT_REGISTER + H6280_IRQ2_STATE: info->i = h6280.irq_state[1]; break; case CPUINFO_INT_REGISTER + H6280_IRQT_STATE: info->i = h6280.irq_state[2]; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_INT_REGISTER + H6280_M1: info->i = h6280.mmr[0]; break; case CPUINFO_INT_REGISTER + H6280_M2: info->i = h6280.mmr[1]; break; case CPUINFO_INT_REGISTER + H6280_M3: info->i = h6280.mmr[2]; break; @@ -514,9 +514,9 @@ void h6280_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = h6280_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = h6280_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = h6280_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &h6280_ICount; break; case CPUINFO_PTR_TRANSLATE: info->translate = h6280_translate; break; @@ -551,7 +551,7 @@ void h6280_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_REGISTER + H6280_IRQ1_STATE: sprintf(info->s, "IRQ1:%X", h6280.irq_state[0]); break; case CPUINFO_STR_REGISTER + H6280_IRQ2_STATE: sprintf(info->s, "IRQ2:%X", h6280.irq_state[1]); break; case CPUINFO_STR_REGISTER + H6280_IRQT_STATE: sprintf(info->s, "IRQT:%X", h6280.irq_state[2]); break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_STR_REGISTER + H6280_M1: sprintf(info->s, "M1:%02X", h6280.mmr[0]); break; case CPUINFO_STR_REGISTER + H6280_M2: sprintf(info->s, "M2:%02X", h6280.mmr[1]); break; case CPUINFO_STR_REGISTER + H6280_M3: sprintf(info->s, "M3:%02X", h6280.mmr[2]); break; diff --git a/src/emu/cpu/h6280/h6280.h b/src/emu/cpu/h6280/h6280.h index 5647e630582..84839562b1b 100644 --- a/src/emu/cpu/h6280/h6280.h +++ b/src/emu/cpu/h6280/h6280.h @@ -19,7 +19,7 @@ enum { H6280_PC=1, H6280_S, H6280_P, H6280_A, H6280_X, H6280_Y, H6280_IRQ_MASK, H6280_TIMER_STATE, H6280_NMI_STATE, H6280_IRQ1_STATE, H6280_IRQ2_STATE, H6280_IRQT_STATE -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER , H6280_M1, H6280_M2, H6280_M3, H6280_M4, H6280_M5, H6280_M6, H6280_M7, H6280_M8 @@ -47,7 +47,7 @@ WRITE8_HANDLER( H6280_timer_w ); UINT8 h6280io_get_buffer(void); void h6280io_set_buffer(UINT8); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t h6280_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/h83002/h83002.c b/src/emu/cpu/h83002/h83002.c index 22829735253..61ec815de5d 100644 --- a/src/emu/cpu/h83002/h83002.c +++ b/src/emu/cpu/h83002/h83002.c @@ -176,9 +176,9 @@ static UINT32 h8_divxs16(INT16 src, INT32 dst); /* implementation */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t h8_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ void h8_3002_InterruptRequest(UINT8 source) { @@ -466,9 +466,8 @@ static int h8_execute(int cycles) { h8.ppc = h8.pc; -#ifdef MAME_DEBUG - CALL_MAME_DEBUG; -#endif + CALL_DEBUGGER(h8.pc); + opcode = cpu_readop16(h8.pc); // mame_printf_debug("[%06x]: %04x => %x\n", h8.pc, opcode, (opcode>>12)&0xf); h8.pc += 2; @@ -3800,9 +3799,9 @@ void h8_3002_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = 0; break; case CPUINFO_PTR_EXECUTE: info->execute = h8_execute; break; case CPUINFO_PTR_BURN: info->burn = 0; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = h8_disasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &h8_cyccnt; break; case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(h83002_state); break; case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 2; break; diff --git a/src/emu/cpu/hd6309/hd6309.c b/src/emu/cpu/hd6309/hd6309.c index 4bb1a39d27f..73b73f5038f 100644 --- a/src/emu/cpu/hd6309/hd6309.c +++ b/src/emu/cpu/hd6309/hd6309.c @@ -118,7 +118,7 @@ #define false 0 #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t hd6309_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif @@ -625,7 +625,7 @@ static int hd6309_execute(int cycles) /* NS 970908 */ if (hd6309.int_state & (HD6309_CWAI | HD6309_SYNC)) { - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); hd6309_ICount = 0; } else @@ -634,7 +634,7 @@ static int hd6309_execute(int cycles) /* NS 970908 */ { pPPC = pPC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); hd6309.ireg = ROP(PCD); PC++; @@ -1292,9 +1292,9 @@ void hd6309_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = hd6309_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = hd6309_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hd6309_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &hd6309_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/i386/i386.c b/src/emu/cpu/i386/i386.c index f1a364decbf..fa78c1fbd44 100644 --- a/src/emu/cpu/i386/i386.c +++ b/src/emu/cpu/i386/i386.c @@ -15,7 +15,7 @@ #include "i386.h" #include "i386intf.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "debug/debugcpu.h" #endif @@ -443,7 +443,7 @@ static void I386OP(decode_two_byte)(void) /*************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static UINT64 i386_debug_segbase(UINT32 ref, UINT32 params, UINT64 *param) { @@ -485,7 +485,7 @@ static void i386_debug_setup(void) symtable_add_function(global_symtable, "seglimit", 0, 1, 1, i386_debug_seglimit); } -#endif /* defined(MAME_DEBUG) */ +#endif /* defined(ENABLE_DEBUGGER) */ /*************************************************************************/ @@ -717,7 +717,7 @@ static int i386_execute(int num_cycles) I.segment_prefix = 0; I.prev_eip = I.eip; - CALL_MAME_DEBUG; + CALL_DEBUGGER(I.pc); i386_check_irq_line(); I386OP(decode_opcode)(); @@ -741,12 +741,12 @@ static int translate_address_cb(int space, offs_t *addr) return result; } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t i386_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return i386_dasm_one(buffer, pc, oprom, I.sreg[CS].d ? 32 : 16); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void i386_set_info(UINT32 state, cpuinfo *info) { @@ -969,7 +969,7 @@ void i386_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_BURN: info->burn = NULL; break; case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &I.cycles; break; case CPUINFO_PTR_TRANSLATE: info->translate = translate_address_cb; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i386_dasm; break; case CPUINFO_PTR_DEBUG_SETUP_COMMANDS: info->setup_commands = i386_debug_setup; break; #endif diff --git a/src/emu/cpu/i386/i386.h b/src/emu/cpu/i386/i386.h index 0c4efc670a3..3f977385369 100644 --- a/src/emu/cpu/i386/i386.h +++ b/src/emu/cpu/i386/i386.h @@ -10,7 +10,7 @@ #define INPUT_LINE_A20 1 -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern int i386_dasm_one(char *buffer, UINT32 pc, const UINT8 *oprom, int mode); #endif diff --git a/src/emu/cpu/i8039/i8039.c b/src/emu/cpu/i8039/i8039.c index 9ef604e31b4..03eef5203f7 100644 --- a/src/emu/cpu/i8039/i8039.c +++ b/src/emu/cpu/i8039/i8039.c @@ -748,7 +748,7 @@ static int i8039_execute(int cycles) { R.PREVPC = R.PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(R.PC.w.l); opcode=M_RDOP(R.PC.w.l); @@ -943,9 +943,9 @@ void i8039_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = i8039_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = i8039_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8039_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8039_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/i8039/i8039.h b/src/emu/cpu/i8039/i8039.h index fe927542e95..ca79bf6e7a8 100644 --- a/src/emu/cpu/i8039/i8039.h +++ b/src/emu/cpu/i8039/i8039.h @@ -216,7 +216,7 @@ extern void m58715_get_info(UINT32 state, cpuinfo *info); */ #define I8039_RDOP_ARG(A) ((unsigned)cpu_readop_arg(A)) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t i8039_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/i8051/i8051.c b/src/emu/cpu/i8051/i8051.c index 0d4fb7b262c..13e47a15630 100644 --- a/src/emu/cpu/i8051/i8051.c +++ b/src/emu/cpu/i8051/i8051.c @@ -600,7 +600,7 @@ int i8051_execute(int cycles) PPC = PC; //Call Debugger - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); //remove after testing if(PC != PPC) op = cpu_readop(PC); @@ -1949,7 +1949,7 @@ INLINE void do_add_flags(UINT8 a, UINT8 data, UINT8 c) SET_AC(ac); SET_OV(ov); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER // mame_printf_debug("add: result=%x, c=%x, ac=%x, ov=%x\n",a+data+c,cy,ac,ov); #endif } @@ -1967,7 +1967,7 @@ INLINE void do_sub_flags(UINT8 a, UINT8 data, UINT8 c) SET_AC(ac); SET_OV(ov); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER // mame_printf_debug("sub: a=%x, d=%x, c=%x, result=%x, cy=%x, ac=%x, ov=%x\n",a,data,c,a-data-c,cy,ac,ov); #endif } @@ -2480,9 +2480,9 @@ void i8051_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = i8051_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = i8051_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8051_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8051_icount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map = 0; break; diff --git a/src/emu/cpu/i8051/i8051.h b/src/emu/cpu/i8051/i8051.h index d9277fbe996..a386306abc8 100644 --- a/src/emu/cpu/i8051/i8051.h +++ b/src/emu/cpu/i8051/i8051.h @@ -114,9 +114,9 @@ extern void i8051_set_serial_tx_callback(void (*callback)(int data)); extern void i8051_set_serial_rx_callback(int (*callback)(void)); extern void i8051_set_eram_iaddr_callback(READ32_HANDLER((*callback))); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t i8051_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /**************************************************************************** * 8752 Section diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c index 5b605b2f2bf..ef6fef0efcc 100644 --- a/src/emu/cpu/i8085/i8085.c +++ b/src/emu/cpu/i8085/i8085.c @@ -1267,7 +1267,7 @@ static int i8085_execute(int cycles) i8085_ICount = cycles; do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(I.PC.d); /* interrupts enabled or TRAP pending ? */ if ( (I.IM & IM_IEN) || (I.IREQ & IM_TRAP) ) { @@ -1689,9 +1689,9 @@ void i8085_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = i8085_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = i8085_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8085_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8085_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/i8085/i8085.h b/src/emu/cpu/i8085/i8085.h index aa3497cc872..4e94cfef638 100644 --- a/src/emu/cpu/i8085/i8085.h +++ b/src/emu/cpu/i8085/i8085.h @@ -51,7 +51,7 @@ void i8085_get_info(UINT32 state, cpuinfo *info); void i8080_get_info(UINT32 state, cpuinfo *info); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t i8085_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c index ab51df8cb9a..35477340d25 100644 --- a/src/emu/cpu/i86/i286.c +++ b/src/emu/cpu/i86/i286.c @@ -224,7 +224,7 @@ static int i80286_execute(int num_cycles) while(i80286_ICount>0) { LOG(("[%04x:%04x]=%02x\tF:%04x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x %d%d%d%d%d%d%d%d%d\n",I.sregs[CS],I.pc - I.base[CS],ReadByte(I.pc),I.flags,I.regs.w[AX],I.regs.w[BX],I.regs.w[CX],I.regs.w[DX], I.AuxVal?1:0, I.OverVal?1:0, I.SignVal?1:0, I.ZeroVal?1:0, I.CarryVal?1:0, I.ParityVal?1:0,I.TF, I.IF, I.DirVal<0?1:0)); - CALL_MAME_DEBUG; + CALL_DEBUGGER(I.pc); seg_prefix=FALSE; I.prevpc = I.pc; @@ -241,12 +241,12 @@ static int i80286_execute(int num_cycles) extern int i386_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, int mode); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t i80286_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return i386_dasm_one(buffer, pc, oprom, 16); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void i80286_init(int index, int clock, const void *config, int (*irqcallback)(int)) { @@ -444,9 +444,9 @@ void i80286_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = NULL; break; case CPUINFO_PTR_EXECUTE: info->execute = i80286_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i80286_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i80286_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index dfa07c698f3..c7213ecb0fd 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -244,7 +244,7 @@ static int i8086_execute(int num_cycles) LOG(("[%04x:%04x]=%02x\tF:%04x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x %d%d%d%d%d%d%d%d%d\n", I.sregs[CS], I.pc - I.base[CS], ReadByte(I.pc), I.flags, I.regs.w[AX], I.regs.w[BX], I.regs.w[CX], I.regs.w[DX], I.AuxVal ? 1 : 0, I.OverVal ? 1 : 0, I.SignVal ? 1 : 0, I.ZeroVal ? 1 : 0, I.CarryVal ? 1 : 0, I.ParityVal ? 1 : 0, I.TF, I.IF, I.DirVal < 0 ? 1 : 0)); - CALL_MAME_DEBUG; + CALL_DEBUGGER(I.pc); seg_prefix = FALSE; I.prevpc = I.pc; @@ -259,12 +259,12 @@ static int i8086_execute(int num_cycles) } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t i8086_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return i386_dasm_one(buffer, pc, oprom, 16); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #if (HAS_I80186 || HAS_I80188) @@ -299,7 +299,7 @@ static int i80186_execute(int num_cycles) { LOG(("[%04x:%04x]=%02x\tAX=%04x\tBX=%04x\tCX=%04x\tDX=%04x\n", I.sregs[CS], I.pc, ReadByte(I.pc), I.regs.w[AX], I.regs.w[BX], I.regs.w[CX], I.regs.w[DX])); - CALL_MAME_DEBUG; + CALL_DEBUGGER(I.pc); seg_prefix = FALSE; I.prevpc = I.pc; @@ -436,9 +436,9 @@ void i8086_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = i8086_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = i8086_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8086_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8086_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/i8x41/i8x41.c b/src/emu/cpu/i8x41/i8x41.c index 2ed90721304..25794b207b6 100644 --- a/src/emu/cpu/i8x41/i8x41.c +++ b/src/emu/cpu/i8x41/i8x41.c @@ -1377,7 +1377,7 @@ static int i8x41_execute(int cycles) PPC = PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); PC += 1; i8x41_ICount -= i8x41_cycles[op]; @@ -2270,9 +2270,9 @@ void i8x41_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = i8x41_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = i8x41_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8x41_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8x41_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/i8x41/i8x41.h b/src/emu/cpu/i8x41/i8x41.h index e37187f2cd7..2a3293f405a 100644 --- a/src/emu/cpu/i8x41/i8x41.h +++ b/src/emu/cpu/i8x41/i8x41.h @@ -81,7 +81,7 @@ enum { extern void i8x41_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t i8x41_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c index ac95e6e4b72..ee9b8f7ec1d 100644 --- a/src/emu/cpu/i960/i960.c +++ b/src/emu/cpu/i960/i960.c @@ -619,7 +619,7 @@ static int i960_execute(int cycles) check_irqs(); while(i960_icount >= 0) { i960.PIP = i960.IP; - CALL_MAME_DEBUG; + CALL_DEBUGGER(i960.IP); i960.bursting = 0; @@ -2068,7 +2068,7 @@ static void i960_init(int index, int clock, const void *config, int (*irqcallbac state_save_register_item_array("i960", index, i960.rcache_frame_addr); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t i960_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { disassemble_t dis; @@ -2081,7 +2081,7 @@ static offs_t i960_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UIN return dis.IPinc | dis.disflags | DASMFLAG_SUPPORTED; } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void i960_reset(void) { @@ -2119,9 +2119,9 @@ void i960_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = 0; break; case CPUINFO_PTR_EXECUTE: info->execute = i960_execute; break; case CPUINFO_PTR_BURN: info->burn = 0; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i960_disasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i960_icount; break; case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(i960_state); break; case CPUINFO_INT_MIN_INSTRUCTION_BYTES: info->i = 4; break; diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c index 0ce5f23eed2..badf0ff9f71 100644 --- a/src/emu/cpu/jaguar/jaguar.c +++ b/src/emu/cpu/jaguar/jaguar.c @@ -517,7 +517,7 @@ static int jaguargpu_execute(int cycles) /* debugging */ //if (jaguar.PC < 0xf03000 || jaguar.PC > 0xf04000) { fatalerror("GPU: jaguar.PC = %06X (ppc = %06X)", jaguar.PC, jaguar.ppc); } jaguar.ppc = jaguar.PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(jaguar.PC); /* instruction fetch */ jaguar.op = ROPCODE(jaguar.PC); @@ -563,7 +563,7 @@ static int jaguardsp_execute(int cycles) /* debugging */ //if (jaguar.PC < 0xf1b000 || jaguar.PC > 0xf1d000) { fatalerror(stderr, "DSP: jaguar.PC = %06X", jaguar.PC); } jaguar.ppc = jaguar.PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(jaguar.PC); /* instruction fetch */ jaguar.op = ROPCODE(jaguar.PC); @@ -590,7 +590,7 @@ static int jaguardsp_execute(int cycles) DISASSEMBLY HOOK ***************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t jaguargpu_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { extern unsigned dasmjag(int, char *, unsigned, const UINT8 *); @@ -602,7 +602,7 @@ static offs_t jaguardsp_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const extern unsigned dasmjag(int, char *, unsigned, const UINT8 *); return dasmjag(JAGUAR_VARIANT_DSP, buffer, pc, oprom); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -801,7 +801,7 @@ void jr_cc_n(void) { INT32 r1 = (INT8)((jaguar.op >> 2) & 0xf8) >> 2; UINT32 newpc = jaguar.PC + r1; - CALL_MAME_DEBUG; + CALL_DEBUGGER(jaguar.PC); jaguar.op = ROPCODE(jaguar.PC); jaguar.PC = newpc; (*jaguar.table[jaguar.op >> 10])(); @@ -818,7 +818,7 @@ void jump_cc_rn(void) /* special kludge for risky code in the cojag DSP interrupt handlers */ UINT32 newpc = (jaguar_icount == bankswitch_icount) ? jaguar.a[reg] : jaguar.r[reg]; - CALL_MAME_DEBUG; + CALL_DEBUGGER(jaguar.PC); jaguar.op = ROPCODE(jaguar.PC); jaguar.PC = newpc; (*jaguar.table[jaguar.op >> 10])(); @@ -1654,9 +1654,9 @@ void jaguargpu_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = jaguar_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = jaguargpu_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguargpu_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &jaguar_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -1749,9 +1749,9 @@ void jaguardsp_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_INIT: info->init = jaguardsp_init; break; case CPUINFO_PTR_RESET: info->reset = jaguardsp_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = jaguardsp_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguardsp_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "Jaguar DSP"); break; diff --git a/src/emu/cpu/konami/konami.c b/src/emu/cpu/konami/konami.c index 209e815b458..d2fd7c87e4f 100644 --- a/src/emu/cpu/konami/konami.c +++ b/src/emu/cpu/konami/konami.c @@ -502,7 +502,7 @@ static int konami_execute(int cycles) { pPPC = pPC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); konami.ireg = ROP(PCD); PC++; @@ -610,9 +610,9 @@ void konami_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = konami_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = konami_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = konami_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &konami_ICount; break; case CPUINFO_PTR_KONAMI_SETLINES_CALLBACK: info->f = (genf *)konami.setlines_callback; break; diff --git a/src/emu/cpu/konami/konami.h b/src/emu/cpu/konami/konami.h index c76821663bc..211cd4809f9 100644 --- a/src/emu/cpu/konami/konami.h +++ b/src/emu/cpu/konami/konami.h @@ -51,7 +51,7 @@ void konami_get_info(UINT32 state, cpuinfo *info); # define TRUE (!FALSE) #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t konami_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/lh5801/lh5801.c b/src/emu/cpu/lh5801/lh5801.c index fdb33dbf97d..5bd66429da9 100644 --- a/src/emu/cpu/lh5801/lh5801.c +++ b/src/emu/cpu/lh5801/lh5801.c @@ -132,7 +132,7 @@ static int lh5801_execute(int cycles) { lh5801.oldpc = P; - CALL_MAME_DEBUG; + CALL_DEBUGGER(P); lh5801_instruction(); } while (lh5801_icount > 0); @@ -235,9 +235,9 @@ void lh5801_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = NULL; break; case CPUINFO_PTR_EXECUTE: info->execute = lh5801_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = lh5801_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &lh5801_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c index d88ded72b78..8fa68ef7d0a 100644 --- a/src/emu/cpu/m37710/m37710.c +++ b/src/emu/cpu/m37710/m37710.c @@ -1032,14 +1032,14 @@ void m37710_set_irq_callback(int (*callback)(int)) #endif /* Disassemble an instruction */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "m7700ds.h" static offs_t m37710_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return m7700_disassemble(buffer, (pc&0xffff), pc>>16, oprom, FLAG_M, FLAG_X); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void m37710_restore_state(void) { @@ -1224,9 +1224,9 @@ void m37710_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m37710_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m37710_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m37710_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m37710_ICount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map = construct_map_m37710_internal_map; break; diff --git a/src/emu/cpu/m37710/m37710.h b/src/emu/cpu/m37710/m37710.h index d8ccc1dc518..b513e07b70d 100644 --- a/src/emu/cpu/m37710/m37710.h +++ b/src/emu/cpu/m37710/m37710.h @@ -104,13 +104,13 @@ void m37710_state_load(void *file); #undef M37710_CALL_DEBUGGER -#define M37710_CALL_DEBUGGER CALL_MAME_DEBUG +#define M37710_CALL_DEBUGGER CALL_DEBUGGER #define m37710_read_8(addr) program_read_byte_16le(addr) #define m37710_write_8(addr,data) program_write_byte_16le(addr,data) #define m37710_read_8_immediate(A) program_read_byte_16le(A) #define m37710_read_16(addr) program_read_word_16le(addr) #define m37710_write_16(addr,data) program_write_word_16le(addr,data) -#define m37710_jumping(A) change_pc(A) +#define m37710_jumping(A) change_pc(A) #define m37710_branching(A) diff --git a/src/emu/cpu/m37710/m37710op.h b/src/emu/cpu/m37710/m37710op.h index 83e0c9a8198..5cf46c0af29 100644 --- a/src/emu/cpu/m37710/m37710op.h +++ b/src/emu/cpu/m37710/m37710op.h @@ -2943,7 +2943,7 @@ TABLE_FUNCTION(int, execute, (int clocks)) do { REG_PPC = REG_PC; - M37710_CALL_DEBUGGER; + M37710_CALL_DEBUGGER(REG_PC); REG_PC++; REG_IR = read_8_IMM(REG_PB | REG_PPC); FTABLE_OPCODES[REG_IR](); diff --git a/src/emu/cpu/m6502/m4510.c b/src/emu/cpu/m6502/m4510.c index c1c1f77c0d3..9f8f0fc6c90 100644 --- a/src/emu/cpu/m6502/m4510.c +++ b/src/emu/cpu/m6502/m4510.c @@ -261,7 +261,7 @@ static int m4510_execute(int cycles) UINT8 op; PPC = PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); /* if an irq is pending, take it now */ if( m4510.pending_irq ) @@ -491,7 +491,7 @@ void m4510_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m4510_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m4510_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m4510_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m4510_ICount; break; diff --git a/src/emu/cpu/m6502/m4510.h b/src/emu/cpu/m6502/m4510.h index b5be77e2992..aa3c2a8e1b7 100644 --- a/src/emu/cpu/m6502/m4510.h +++ b/src/emu/cpu/m6502/m4510.h @@ -39,9 +39,9 @@ enum { void m4510_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned m4510_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c index 24c3325fef4..71205b5e3a7 100644 --- a/src/emu/cpu/m6502/m6502.c +++ b/src/emu/cpu/m6502/m6502.c @@ -227,7 +227,7 @@ static int m6502_execute(int cycles) UINT8 op; PPC = PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); /* if an irq is pending, take it now */ if( m6502.pending_irq ) @@ -446,7 +446,7 @@ static int m65c02_execute(int cycles) UINT8 op; PPC = PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); op = RDOP(); (*m6502.insn[op])(); @@ -617,7 +617,7 @@ static int deco16_execute(int cycles) UINT8 op; PPC = PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); op = RDOP(); (*m6502.insn[op])(); @@ -744,7 +744,7 @@ void m6502_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m6502_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m6502_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6502_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6502_ICount; break; @@ -828,7 +828,7 @@ void m6510_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_SET_INFO: info->setinfo = m6510_set_info; break; case CPUINFO_PTR_INIT: info->init = m6510_init; break; case CPUINFO_PTR_RESET: info->reset = m6510_reset; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6510_dasm; break; #endif case CPUINFO_PTR_INTERNAL_MEMORY_MAP: info->internal_map = construct_map_m6510_mem; break; @@ -926,7 +926,7 @@ void m65c02_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_INIT: info->init = m65c02_init; break; case CPUINFO_PTR_RESET: info->reset = m65c02_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = m65c02_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m65c02_dasm; break; #endif @@ -950,7 +950,7 @@ void m65sc02_get_info(UINT32 state, cpuinfo *info) { /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m65sc02_init; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m65sc02_dasm; break; #endif @@ -998,7 +998,7 @@ void deco16_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_INIT: info->init = deco16_init; break; case CPUINFO_PTR_RESET: info->reset = deco16_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = deco16_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = deco16_dasm; break; #endif diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h index c348176ab42..262c8c29ac1 100644 --- a/src/emu/cpu/m6502/m6502.h +++ b/src/emu/cpu/m6502/m6502.h @@ -71,7 +71,7 @@ enum extern void m6502_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned m6502_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif @@ -94,7 +94,7 @@ extern unsigned m6502_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UI extern void m6510_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned m6510_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif @@ -201,7 +201,7 @@ extern void n2a03_irq(void); extern void m65c02_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned m65c02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif @@ -226,7 +226,7 @@ extern unsigned m65c02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const U extern void m65sc02_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned m65sc02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif #endif @@ -251,7 +251,7 @@ extern unsigned m65sc02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const extern void deco16_get_info(UINT32 state, cpuinfo *info); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned deco16_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/m6502/m6509.c b/src/emu/cpu/m6502/m6509.c index 49ee319c120..2a0b91c98c6 100644 --- a/src/emu/cpu/m6502/m6509.c +++ b/src/emu/cpu/m6502/m6509.c @@ -201,7 +201,7 @@ static int m6509_execute(int cycles) UINT8 op; PPC = PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); /* if an irq is pending, take it now */ if( m6509.pending_irq ) @@ -369,7 +369,7 @@ void m6509_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m6509_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m6509_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6502_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6502_ICount; break; diff --git a/src/emu/cpu/m6502/m65ce02.c b/src/emu/cpu/m6502/m65ce02.c index a03b004f4d6..cb19af7c073 100644 --- a/src/emu/cpu/m6502/m65ce02.c +++ b/src/emu/cpu/m6502/m65ce02.c @@ -215,7 +215,7 @@ int m65ce02_execute(int cycles) UINT8 op; PPC = PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); /* if an irq is pending, take it now */ if( m65ce02.pending_irq ) @@ -373,7 +373,7 @@ const char *m65ce02_info(void *context, int regnum) unsigned int m65ce02_dasm(char *buffer, unsigned pc) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER return Dasm65ce02( buffer, pc ); #else sprintf( buffer, "$%02X", cpu_readop(pc) ); diff --git a/src/emu/cpu/m6502/m65ce02.h b/src/emu/cpu/m6502/m65ce02.h index eddbdffaffa..da2e451a131 100644 --- a/src/emu/cpu/m6502/m65ce02.h +++ b/src/emu/cpu/m6502/m65ce02.h @@ -48,7 +48,7 @@ extern void m65ce02_state_load(void *file); extern const char *m65ce02_info(void *context, int regnum); extern unsigned m65ce02_dasm(char *buffer, unsigned pc); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned int Dasm65ce02( char *dst, unsigned pc ); #endif diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c index a7271c14081..230dd338e14 100644 --- a/src/emu/cpu/m6800/m6800.c +++ b/src/emu/cpu/m6800/m6800.c @@ -265,7 +265,7 @@ enum #define ONE_MORE_INSN() { \ UINT8 ireg; \ pPPC = pPC; \ - CALL_MAME_DEBUG; \ + CALL_DEBUGGER(PCD); \ ireg=M_RDOP(PCD); \ PC++; \ (*m6800.insn[ireg])(); \ @@ -988,7 +988,7 @@ static int m6800_execute(int cycles) else { pPPC = pPC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); ireg=M_RDOP(PCD); PC++; @@ -1335,7 +1335,7 @@ static int m6803_execute(int cycles) else { pPPC = pPC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); ireg=M_RDOP(PCD); PC++; @@ -1675,7 +1675,7 @@ static int hd63701_execute(int cycles) else { pPPC = pPC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); ireg=M_RDOP(PCD); PC++; @@ -2007,7 +2007,7 @@ static int nsc8105_execute(int cycles) else { pPPC = pPC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); ireg=M_RDOP(PCD); PC++; @@ -2653,9 +2653,9 @@ void m6800_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m6800_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m6800_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6800_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6800_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -2705,9 +2705,9 @@ void m6801_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6801_init; break; case CPUINFO_PTR_EXECUTE: info->execute = m6803_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6801_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "M6801"); break; @@ -2732,9 +2732,9 @@ void m6802_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6802_init; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6802_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "M6802"); break; @@ -2762,9 +2762,9 @@ void m6803_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6803_init; break; case CPUINFO_PTR_EXECUTE: info->execute = m6803_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6803_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map = construct_map_m6803_mem; break; @@ -2791,9 +2791,9 @@ void m6808_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = m6808_init; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6808_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "M6808"); break; @@ -2821,9 +2821,9 @@ void hd63701_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = hd63701_init; break; case CPUINFO_PTR_EXECUTE: info->execute = hd63701_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hd63701_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "HD63701"); break; @@ -2849,9 +2849,9 @@ void nsc8105_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = nsc8105_init; break; case CPUINFO_PTR_EXECUTE: info->execute = nsc8105_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = nsc8105_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "NSC8105"); break; diff --git a/src/emu/cpu/m6800/m6800.h b/src/emu/cpu/m6800/m6800.h index c487777c9b8..f98fb47ded0 100644 --- a/src/emu/cpu/m6800/m6800.h +++ b/src/emu/cpu/m6800/m6800.h @@ -210,7 +210,7 @@ extern void nsc8105_get_info(UINT32 state, cpuinfo *info); # define TRUE (!FALSE) #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t m6800_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); offs_t m6801_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); offs_t m6802_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); diff --git a/src/emu/cpu/m68000/m68k.h b/src/emu/cpu/m68000/m68k.h index 7c021ce5410..bf1d5957f6b 100644 --- a/src/emu/cpu/m68000/m68k.h +++ b/src/emu/cpu/m68000/m68k.h @@ -274,7 +274,7 @@ void m68k_set_fc_callback(void (*callback)(unsigned int new_fc)); * instruction cycle. * Default behavior: do nothing. */ -void m68k_set_instr_hook_callback(void (*callback)(void)); +void m68k_set_instr_hook_callback(void (*callback)(unsigned int pc)); diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c index f937d4b89da..e6cb6039930 100644 --- a/src/emu/cpu/m68000/m68kcpu.c +++ b/src/emu/cpu/m68000/m68kcpu.c @@ -500,7 +500,7 @@ static void default_set_fc_callback(unsigned int new_fc) } /* Called every instruction cycle prior to execution */ -static void default_instr_hook_callback(void) +static void default_instr_hook_callback(unsigned int pc) { } @@ -670,7 +670,7 @@ void m68k_set_fc_callback(void (*callback)(unsigned int new_fc)) CALLBACK_SET_FC = callback ? callback : default_set_fc_callback; } -void m68k_set_instr_hook_callback(void (*callback)(void)) +void m68k_set_instr_hook_callback(void (*callback)(unsigned int pc)) { CALLBACK_INSTR_HOOK = callback ? callback : default_instr_hook_callback; } @@ -808,7 +808,7 @@ int m68k_execute(int num_cycles) m68ki_use_data_space(); /* auto-disable (see m68kcpu.h) */ /* Call external hook to peek at CPU */ - m68ki_instr_hook(); /* auto-disable (see m68kcpu.h) */ + m68ki_instr_hook(REG_PC); /* auto-disable (see m68kcpu.h) */ /* Record previous program counter */ REG_PPC = REG_PC; diff --git a/src/emu/cpu/m68000/m68kcpu.h b/src/emu/cpu/m68000/m68kcpu.h index a7cd089c103..bc8ce7dea01 100644 --- a/src/emu/cpu/m68000/m68kcpu.h +++ b/src/emu/cpu/m68000/m68kcpu.h @@ -494,9 +494,9 @@ #if M68K_INSTRUCTION_HOOK #if M68K_INSTRUCTION_HOOK == OPT_SPECIFY_HANDLER - #define m68ki_instr_hook() M68K_INSTRUCTION_CALLBACK() + #define m68ki_instr_hook(pc) M68K_INSTRUCTION_CALLBACK(pc) #else - #define m68ki_instr_hook() CALLBACK_INSTR_HOOK() + #define m68ki_instr_hook(pc) CALLBACK_INSTR_HOOK(pc) #endif #else #define m68ki_instr_hook() @@ -905,7 +905,7 @@ typedef struct int (*tas_instr_callback)(void); /* Called when a TAS instruction is encountered, allows / disallows writeback */ void (*pc_changed_callback)(unsigned int new_pc); /* Called when the PC changes by a large amount */ void (*set_fc_callback)(unsigned int new_fc); /* Called when the CPU function code changes */ - void (*instr_hook_callback)(void); /* Called every instruction cycle prior to execution */ + void (*instr_hook_callback)(unsigned int pc); /* Called every instruction cycle prior to execution */ } m68ki_cpu_core; diff --git a/src/emu/cpu/m68000/m68kmame.c b/src/emu/cpu/m68000/m68kmame.c index 756ecd2ce33..6c17345e828 100644 --- a/src/emu/cpu/m68000/m68kmame.c +++ b/src/emu/cpu/m68000/m68kmame.c @@ -237,13 +237,13 @@ static void m68000_set_context(void *src) m68k_set_context(src); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t m68000_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { M68K_SET_PC_CALLBACK(pc); return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68000); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /**************************************************************************** * M68008 section @@ -286,13 +286,13 @@ static void m68008_set_context(void *src) m68k_set_context(src); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t m68008_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { M68K_SET_PC_CALLBACK(pc); return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68008); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif /* HAS_M68008 */ @@ -310,13 +310,13 @@ static void m68010_init(int index, int clock, const void *config, int (*irqcallb m68k_set_int_ack_callback(irqcallback); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t m68010_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { M68K_SET_PC_CALLBACK(pc); return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68010); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif /* HAS_M68010 */ @@ -360,13 +360,13 @@ static void m68020_set_context(void *src) m68k_set_context(src); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t m68020_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { M68K_SET_PC_CALLBACK(pc); return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68020); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /**************************************************************************** @@ -383,13 +383,13 @@ static void m68ec020_init(int index, int clock, const void *config, int (*irqcal m68k_set_int_ack_callback(irqcallback); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t m68ec020_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { M68K_SET_PC_CALLBACK(pc); return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68EC020); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif /* HAS_M68EC020 */ @@ -434,13 +434,13 @@ static void m68040_set_context(void *src) m68k_set_context(src); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t m68040_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { M68K_SET_PC_CALLBACK(pc); return m68k_disassemble_raw(buffer, pc, oprom, opram, M68K_CPU_TYPE_68040); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif /* HAS_M68040 */ @@ -573,9 +573,9 @@ void m68000_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m68000_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m68000_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68000_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -753,9 +753,9 @@ void m68008_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m68008_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m68008_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68008_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -844,9 +844,9 @@ void m68010_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_SET_INFO: info->setinfo = m68010_set_info; break; case CPUINFO_PTR_INIT: info->init = m68010_init; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68010_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "68010"); break; case CPUINFO_STR_REGISTER + M68K_SFC: sprintf(info->s, "SFC:%X", m68k_get_reg(NULL, M68K_REG_SFC)); break; @@ -994,9 +994,9 @@ void m68020_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m68020_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m68020_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68020_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -1087,9 +1087,9 @@ void m68ec020_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_SET_INFO: info->setinfo = m68ec020_set_info; break; case CPUINFO_PTR_INIT: info->init = m68ec020_init; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68ec020_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "68EC020"); break; @@ -1236,9 +1236,9 @@ void m68040_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m68040_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m68040_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68040_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/m68000/m68kmame.h b/src/emu/cpu/m68000/m68kmame.h index 7273a345d24..b752d5129fc 100644 --- a/src/emu/cpu/m68000/m68kmame.h +++ b/src/emu/cpu/m68000/m68kmame.h @@ -41,7 +41,7 @@ #define M68K_SET_PC_CALLBACK(A) change_pc(A) #define M68K_INSTRUCTION_HOOK OPT_SPECIFY_HANDLER -#define M68K_INSTRUCTION_CALLBACK() CALL_MAME_DEBUG +#define M68K_INSTRUCTION_CALLBACK(A) CALL_DEBUGGER(A) #define M68K_EMULATE_PREFETCH OPT_ON diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index 948cdb867f4..c81c65619f1 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -521,7 +521,7 @@ static int m6805_execute(int cycles) } } - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); ireg=M_RDOP(PC++); @@ -938,9 +938,9 @@ void m6805_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m6805_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m6805_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6805_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6805_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/m6805/m6805.h b/src/emu/cpu/m6805/m6805.h index 30db96fbe71..91ff2c8d083 100644 --- a/src/emu/cpu/m6805/m6805.h +++ b/src/emu/cpu/m6805/m6805.h @@ -82,7 +82,7 @@ extern void hd63705_get_info(UINT32 state, cpuinfo *info); /****************************************************************************/ #define M6805_RDOP_ARG(Addr) ((unsigned)cpu_readop_arg(Addr)) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t m6805_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c index ded25158c21..1c4bf8ed75d 100644 --- a/src/emu/cpu/m6809/m6809.c +++ b/src/emu/cpu/m6809/m6809.c @@ -83,7 +83,7 @@ #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t m6809_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif @@ -518,7 +518,7 @@ static int m6809_execute(int cycles) /* NS 970908 */ if (m6809.int_state & (M6809_CWAI | M6809_SYNC)) { - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); m6809_ICount = 0; } else @@ -527,7 +527,7 @@ static int m6809_execute(int cycles) /* NS 970908 */ { pPPC = pPC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); m6809.ireg = ROP(PCD); PC++; @@ -1174,9 +1174,9 @@ void m6809_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = m6809_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = m6809_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6809_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6809_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index 0067d5da1ea..c6e9dba84ff 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -907,7 +907,7 @@ static int mb86233_execute(int cycles) UINT32 val; UINT32 opcode; - CALL_MAME_DEBUG; + CALL_DEBUGGER(GETPC()); opcode = ROPCODE(GETPC()); @@ -1523,7 +1523,7 @@ static int mb86233_execute(int cycles) DISASSEMBLY HOOK ***************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t mb86233_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { extern UINT32 dasm_mb86233(char *, UINT32); @@ -1532,7 +1532,7 @@ static offs_t mb86233_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UI op = LITTLE_ENDIANIZE_INT32(op); return dasm_mb86233(buffer, op); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /*************************************************************************** Information Setters @@ -1643,9 +1643,9 @@ void mb86233_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = NULL; break; case CPUINFO_PTR_EXECUTE: info->execute = mb86233_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mb86233_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &mb86233_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/mb88xx/mb88xx.c b/src/emu/cpu/mb88xx/mb88xx.c index 27b14df3177..b055445432a 100644 --- a/src/emu/cpu/mb88xx/mb88xx.c +++ b/src/emu/cpu/mb88xx/mb88xx.c @@ -237,7 +237,7 @@ static int mb88_execute(int cycles) UINT8 opcode, arg, oc; /* fetch the opcode */ - CALL_MAME_DEBUG; + CALL_DEBUGGER(GETPC()); opcode = READOP(GETPC()); /* increment the PC */ @@ -851,9 +851,9 @@ void mb88_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = NULL; break; case CPUINFO_PTR_EXECUTE: info->execute = mb88_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mb88_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &mb88_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/mb88xx/mb88xx.h b/src/emu/cpu/mb88xx/mb88xx.h index 3b8033d23f5..6052926739e 100644 --- a/src/emu/cpu/mb88xx/mb88xx.h +++ b/src/emu/cpu/mb88xx/mb88xx.h @@ -71,7 +71,7 @@ void mb8842_get_info(UINT32 state, cpuinfo *info); void mb8843_get_info(UINT32 state, cpuinfo *info); void mb8844_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t mb88_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/mc68hc11/mc68hc11.c b/src/emu/cpu/mc68hc11/mc68hc11.c index 1757d7922c6..c6ebf51a9ce 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.c +++ b/src/emu/cpu/mc68hc11/mc68hc11.c @@ -389,7 +389,7 @@ static int hc11_execute(int cycles) UINT8 op; hc11.ppc = hc11.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(hc11.pc); op = FETCH(); hc11_optable[op](); @@ -462,9 +462,9 @@ void mc68hc11_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = hc11_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = hc11_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hc11_disasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &hc11.icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/mc68hc11/mc68hc11.h b/src/emu/cpu/mc68hc11/mc68hc11.h index 1921f65ba77..25bacc941f2 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.h +++ b/src/emu/cpu/mc68hc11/mc68hc11.h @@ -3,7 +3,7 @@ #include "cpuintrf.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t hc11_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/minx/minx.c b/src/emu/cpu/minx/minx.c index 160076443a4..c7fbf6149f4 100644 --- a/src/emu/cpu/minx/minx.c +++ b/src/emu/cpu/minx/minx.c @@ -141,7 +141,7 @@ static int minx_execute( int cycles ) { minx_icount = cycles; do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(minx_PC); oldpc = minx_PC; op = rdop(); insnminx[op](); @@ -279,7 +279,7 @@ void minx_get_info( UINT32 state, cpuinfo *info ) { case CPUINFO_PTR_EXIT: info->exit = minx_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = minx_execute; break; case CPUINFO_PTR_BURN: info->burn = minx_burn; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = minx_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &minx_icount; break; diff --git a/src/emu/cpu/minx/minx.h b/src/emu/cpu/minx/minx.h index e0a661293fb..3b719bf37d5 100644 --- a/src/emu/cpu/minx/minx.h +++ b/src/emu/cpu/minx/minx.h @@ -10,7 +10,7 @@ enum { MINX_XI, MINX_YI, }; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned minx_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram ); #endif diff --git a/src/emu/cpu/mips/mdrcold.c b/src/emu/cpu/mips/mdrcold.c index 2b70d7f86be..69c842af28b 100644 --- a/src/emu/cpu/mips/mdrcold.c +++ b/src/emu/cpu/mips/mdrcold.c @@ -1001,7 +1001,7 @@ static int recompile_delay_slot(drc_core *drc, UINT32 pc) UINT32 result; UINT32 physpc; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER if (Machine->debug_mode) { /* emit debugging */ @@ -3571,7 +3571,7 @@ static UINT32 recompile_set_cop0_reg(drc_core *drc, UINT8 reg) emit_mov_m32_r32(DRCTOP, CPR0ADDR(COP0_Status), REG_EAX); // mov [COP0_Status],eax emit_xor_r32_r32(DRCTOP, REG_EBX, REG_EAX); // xor ebx,eax /* -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER _test_r32_imm(REG_EAX, 0xe0); // test eax,0xe0 _jcc_short_link(COND_Z, &link1); // jz skip _sub_r32_imm(REG_ESP, 4); // sub esp,4 diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c index cf978c63e7f..8fdd5028ee5 100644 --- a/src/emu/cpu/mips/mips3.c +++ b/src/emu/cpu/mips/mips3.c @@ -298,13 +298,13 @@ static int mips3_translate(int space, offs_t *address) } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t mips3_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { /* common disassemble */ return mips3com_dasm(&mips3.core, buffer, pc, oprom, opram); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -1681,7 +1681,7 @@ int mips3_execute(int cycles) /* debugging */ mips3.ppc = mips3.core.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(mips3.core.pc); /* instruction fetch */ op = ROPCODE(mips3.pcbase | (mips3.core.pc & 0xfff)); @@ -2138,7 +2138,7 @@ void mips3_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_INIT: /* provided per-CPU */ break; case CPUINFO_PTR_RESET: info->reset = mips3_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = mips3_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips3_dasm; break; #endif case CPUINFO_PTR_TRANSLATE: info->translate = mips3_translate; break; diff --git a/src/emu/cpu/mips/mips3com.c b/src/emu/cpu/mips/mips3com.c index 49a74e2056a..79330a288d3 100644 --- a/src/emu/cpu/mips/mips3com.c +++ b/src/emu/cpu/mips/mips3com.c @@ -156,7 +156,7 @@ void mips3com_reset(mips3_state *mips) CPU -------------------------------------------------*/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t mips3com_dasm(mips3_state *mips, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { extern unsigned dasmmips3(char *, unsigned, UINT32); @@ -167,7 +167,7 @@ offs_t mips3com_dasm(mips3_state *mips, char *buffer, offs_t pc, const UINT8 *op op = LITTLE_ENDIANIZE_INT32(op); return dasmmips3(buffer, pc, op); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ diff --git a/src/emu/cpu/mips/mips3com.h b/src/emu/cpu/mips/mips3com.h index ba86ad33c32..a2186abd47e 100644 --- a/src/emu/cpu/mips/mips3com.h +++ b/src/emu/cpu/mips/mips3com.h @@ -218,7 +218,7 @@ struct _mips3_state size_t mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, int index, int clock, const struct mips3_config *config, int (*irqcallback)(int), void *memory); void mips3com_reset(mips3_state *mips); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t mips3com_dasm(mips3_state *mips, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif void mips3com_update_cycle_counting(mips3_state *mips); diff --git a/src/emu/cpu/mips/mips3drc.c b/src/emu/cpu/mips/mips3drc.c index 1f4422ca878..50dadefb448 100644 --- a/src/emu/cpu/mips/mips3drc.c +++ b/src/emu/cpu/mips/mips3drc.c @@ -31,7 +31,7 @@ extern unsigned dasmmips3(char *buffer, unsigned pc, UINT32 op); #define LOG_CODE (0) #define SINGLE_INSTRUCTION_MODE (0) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #define COMPARE_AGAINST_C (0) #else #define COMPARE_AGAINST_C (0) @@ -303,12 +303,12 @@ static int mips3_translate(int space, offs_t *address) mips3_dasm - disassemble an instruction -------------------------------------------------*/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t mips3_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return mips3com_dasm(mips3.core, buffer, pc, oprom, opram); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -569,9 +569,9 @@ static void mips3_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = mips3_reset; break; case CPUINFO_PTR_EXIT: info->exit = mips3_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = mips3_execute; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips3_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_TRANSLATE: info->translate = mips3_translate; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -913,7 +913,7 @@ void rm7000le_get_info(UINT32 state, cpuinfo *info) DISASSEMBLERS ***************************************************************************/ -#if !defined(MAME_DEBUG) && (LOG_CODE) +#if !defined(ENABLE_DEBUGGER) && (LOG_CODE) #include "mips3dsm.c" #endif diff --git a/src/emu/cpu/mips/psx.c b/src/emu/cpu/mips/psx.c index 713e690924d..bb1d2ae7f22 100644 --- a/src/emu/cpu/mips/psx.c +++ b/src/emu/cpu/mips/psx.c @@ -152,7 +152,7 @@ static void mips_exception( int exception ); static void mips_stop( void ) { DEBUGGER_BREAK; - CALL_MAME_DEBUG; + CALL_DEBUGGER(mipscpu.pc); } #if LOG_BIOSCALL @@ -987,7 +987,7 @@ static int mips_execute( int cycles ) log_bioscall(); #endif - CALL_MAME_DEBUG; + CALL_DEBUGGER(mipscpu.pc); mipscpu.op = cpu_readop32( mipscpu.pc ); switch( INS_OP( mipscpu.op ) ) @@ -2261,12 +2261,12 @@ static void set_irq_line( int irqline, int state ) * Return a formatted string for a register ****************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t mips_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return DasmMIPS( buffer, pc, opram ); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* preliminary gte code */ @@ -3475,9 +3475,9 @@ static void mips_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = mips_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = mips_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &mips_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/mips/psx.h b/src/emu/cpu/mips/psx.h index e341480a3aa..88daf0ba201 100644 --- a/src/emu/cpu/mips/psx.h +++ b/src/emu/cpu/mips/psx.h @@ -195,7 +195,7 @@ enum /* OP_COP0 */ #define CF_RFE ( 16 ) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned DasmMIPS( char *buffer, UINT32 pc, const UINT8 *opram ); #endif diff --git a/src/emu/cpu/mips/r3000.c b/src/emu/cpu/mips/r3000.c index 32c9e61ff0f..4933fd4e719 100644 --- a/src/emu/cpu/mips/r3000.c +++ b/src/emu/cpu/mips/r3000.c @@ -751,7 +751,7 @@ static int r3000_execute(int cycles) /* debugging */ r3000.ppc = r3000.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(r3000.pc); /* instruction fetch */ op = ROPCODE(r3000.pc); @@ -933,7 +933,7 @@ static int r3000_execute(int cycles) DISASSEMBLY HOOK ***************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t r3000_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { extern unsigned dasmr3k(char *, unsigned, UINT32); @@ -945,7 +945,7 @@ static offs_t r3000_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT return dasmr3k(buffer, pc, op); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -1288,9 +1288,9 @@ static void r3000_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = r3000_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = r3000_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = r3000_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &r3000_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c index 5a9a89ec70a..dd3461fa36e 100644 --- a/src/emu/cpu/nec/nec.c +++ b/src/emu/cpu/nec/nec.c @@ -1006,12 +1006,12 @@ static void set_poll_line(int state) I.poll_state = state; } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t nec_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return necv_dasm_one(buffer, pc, oprom); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void nec_init(int index, int clock, const void *config, int (*irqcallback)(int), int type) { @@ -1179,7 +1179,7 @@ static int v20_execute(int cycles) if (I.no_interrupt) I.no_interrupt--; - CALL_MAME_DEBUG; + CALL_DEBUGGER((I.sregs[PS]<<4) + I.ip); nec_instruction[FETCHOP](); } return cycles - nec_ICount; @@ -1210,7 +1210,7 @@ static int v30_execute(int cycles) { if (I.no_interrupt) I.no_interrupt--; - CALL_MAME_DEBUG; + CALL_DEBUGGER((I.sregs[PS]<<4) + I.ip); nec_instruction[FETCHOP](); } return cycles - nec_ICount; @@ -1242,7 +1242,7 @@ static int v33_execute(int cycles) if (I.no_interrupt) I.no_interrupt--; - CALL_MAME_DEBUG; + CALL_DEBUGGER((I.sregs[PS]<<4) + I.ip); nec_instruction[FETCHOP](); } @@ -1375,9 +1375,9 @@ static void nec_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = nec_exit; break; case CPUINFO_PTR_EXECUTE: /* set per-CPU */ break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = nec_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &nec_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index 5b21b51513f..d5188f474d7 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -627,7 +627,7 @@ static int pdp1_execute(int cycles) do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); /* ioh should be cleared at the end of the instruction cycle, and ios at the @@ -1026,9 +1026,9 @@ void pdp1_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXECUTE: info->execute = pdp1_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = pdp1_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &pdp1_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/pdp1/pdp1.h b/src/emu/cpu/pdp1/pdp1.h index e4cf7d12afb..ea14ef2e18a 100644 --- a/src/emu/cpu/pdp1/pdp1.h +++ b/src/emu/cpu/pdp1/pdp1.h @@ -74,8 +74,8 @@ void pdp1_get_info(UINT32 state, cpuinfo *info); #define IOT 035 #define OPR 037 -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned pdp1_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif /* _PDP1_H */ diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c index 43ab5b2c9a8..7977b3c7d6a 100644 --- a/src/emu/cpu/pdp1/tx0.c +++ b/src/emu/cpu/pdp1/tx0.c @@ -182,7 +182,7 @@ static int tx0_execute_64kw(int cycles) do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); if (tx0.ioh && tx0.ios) @@ -290,7 +290,7 @@ static int tx0_execute_8kw(int cycles) do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); if (tx0.ioh && tx0.ios) @@ -517,9 +517,9 @@ void tx0_64kw_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXECUTE: info->execute = tx0_execute_64kw; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tx0_dasm_64kw; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tx0_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -646,9 +646,9 @@ void tx0_8kw_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXECUTE: info->execute = tx0_execute_8kw; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tx0_dasm_8kw; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tx0_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/pdp1/tx0.h b/src/emu/cpu/pdp1/tx0.h index e1b7acdcdca..2854e8605e0 100644 --- a/src/emu/cpu/pdp1/tx0.h +++ b/src/emu/cpu/pdp1/tx0.h @@ -44,7 +44,7 @@ void tx0_8kw_get_info(UINT32 state, cpuinfo *info); #define READ_TX0_18BIT(A) ((signed)program_read_dword_32be((A)<<2)) #define WRITE_TX0_18BIT(A,V) (program_write_dword_32be((A)<<2,(V))) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned tx0_dasm_64kw(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); unsigned tx0_dasm_8kw(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ diff --git a/src/emu/cpu/pic16c5x/16c5xdsm.c b/src/emu/cpu/pic16c5x/16c5xdsm.c index 065e1a97651..a0246d31c11 100644 --- a/src/emu/cpu/pic16c5x/16c5xdsm.c +++ b/src/emu/cpu/pic16c5x/16c5xdsm.c @@ -26,7 +26,7 @@ #include #include -#ifdef MAME_DEBUG /* Compile interface to MAME */ +#ifdef ENABLE_DEBUGGER /* Compile interface to MAME */ #include "cpuintrf.h" static const UINT8 *rombase; static const UINT8 *rambase; diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index c8e0b30ed95..d9cafe4b198 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -841,7 +841,7 @@ static int pic16C5x_execute(int cycles) if (PD == 0) /* Sleep Mode */ { inst_cycles = (1*CLK); - CALL_MAME_DEBUG; + CALL_DEBUGGER(R.PC); if (WDTE) { pic16C5x_update_watchdog(1*CLK); } @@ -850,7 +850,7 @@ static int pic16C5x_execute(int cycles) { R.PREVPC = R.PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(R.PC); R.opcode.d = M_RDOP(R.PC); R.PC++; @@ -1013,9 +1013,9 @@ static void pic16C5x_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = pic16C5x_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = pic16C5x_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = pic16C5x_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &pic16C5x_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/pic16c5x/pic16c5x.h b/src/emu/cpu/pic16c5x/pic16c5x.h index 121d54347fd..25cddde1998 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.h +++ b/src/emu/cpu/pic16c5x/pic16c5x.h @@ -126,7 +126,7 @@ void pic16C58_get_info(UINT32 state, cpuinfo *info); #if (HAS_PIC16C54) || (HAS_PIC16C55) || (HAS_PIC16C56) || (HAS_PIC16C57) || (HAS_PIC16C58) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t pic16C5x_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif #endif diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c index 3911c878e5b..8c5df36b02f 100644 --- a/src/emu/cpu/powerpc/ppc.c +++ b/src/emu/cpu/powerpc/ppc.c @@ -1811,9 +1811,9 @@ void ppc_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_GET_CONTEXT: info->getcontext = ppc_get_context; break; case CPUINFO_PTR_SET_CONTEXT: info->setcontext = ppc_set_context; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ppc_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ppc_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h index 70982008008..ac00204fd2f 100644 --- a/src/emu/cpu/powerpc/ppc.h +++ b/src/emu/cpu/powerpc/ppc.h @@ -364,7 +364,7 @@ void ppc601_get_info(UINT32 state, cpuinfo *info); void ppc604_get_info(UINT32 state, cpuinfo *info); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t ppc_dasm_one(char *buffer, offs_t pc, UINT32 op); #endif diff --git a/src/emu/cpu/powerpc/ppc403.c b/src/emu/cpu/powerpc/ppc403.c index 6bebc01cb1f..3dedb4f7c7f 100644 --- a/src/emu/cpu/powerpc/ppc403.c +++ b/src/emu/cpu/powerpc/ppc403.c @@ -177,7 +177,7 @@ static int ppc403_execute(int cycles) { UINT32 opcode; - CALL_MAME_DEBUG; + CALL_DEBUGGER(ppc.pc); ppc.pc = ppc.npc; ppc.npc += 4; opcode = ROPCODE(ppc.pc); diff --git a/src/emu/cpu/powerpc/ppc602.c b/src/emu/cpu/powerpc/ppc602.c index 6bfee3a756a..444161668af 100644 --- a/src/emu/cpu/powerpc/ppc602.c +++ b/src/emu/cpu/powerpc/ppc602.c @@ -254,7 +254,7 @@ static int ppc602_execute(int cycles) while( ppc_icount > 0 ) { ppc.pc = ppc.npc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(ppc.pc); if (MSR & MSR_IR) opcode = ppc_readop_translated(ppc.pc); diff --git a/src/emu/cpu/powerpc/ppc603.c b/src/emu/cpu/powerpc/ppc603.c index 8d27831028e..ae2482820b0 100644 --- a/src/emu/cpu/powerpc/ppc603.c +++ b/src/emu/cpu/powerpc/ppc603.c @@ -262,7 +262,7 @@ static int ppc603_execute(int cycles) while( ppc_icount > 0 ) { ppc.pc = ppc.npc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(ppc.pc); if (MSR & MSR_IR) opcode = ppc_readop_translated(ppc.pc); diff --git a/src/emu/cpu/powerpc/ppc_mem.c b/src/emu/cpu/powerpc/ppc_mem.c index c4ed0fe4b16..f2b55e6deb0 100644 --- a/src/emu/cpu/powerpc/ppc_mem.c +++ b/src/emu/cpu/powerpc/ppc_mem.c @@ -361,14 +361,14 @@ static UINT32 ppc_readop_translated(offs_t address) /***********************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t ppc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { UINT32 op; op = BIG_ENDIANIZE_INT32(*((UINT32 *) oprom)); return ppc_dasm_one(buffer, pc, op); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /***********************************************************************/ diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c index 9deb156f0a2..1ddd1f39ac7 100644 --- a/src/emu/cpu/powerpc/ppcdrc.c +++ b/src/emu/cpu/powerpc/ppcdrc.c @@ -2154,9 +2154,9 @@ static void ppc_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_GET_CONTEXT: info->getcontext = ppc_get_context; break; case CPUINFO_PTR_SET_CONTEXT: info->setcontext = ppc_set_context; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ppc_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ppc_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/rsp/rsp.c b/src/emu/cpu/rsp/rsp.c index 739a65fd884..7d391527aee 100644 --- a/src/emu/cpu/rsp/rsp.c +++ b/src/emu/cpu/rsp/rsp.c @@ -262,7 +262,7 @@ static void set_cop0_reg(int reg, UINT32 data) static void unimplemented_opcode(UINT32 op) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER char string[200]; rsp_dasm_one(string, rsp.ppc, op); mame_printf_debug("%08X: %s\n", rsp.ppc, string); @@ -2596,7 +2596,7 @@ static int rsp_execute(int cycles) while (rsp_icount > 0) { rsp.ppc = rsp.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(rsp.pc); op = ROPCODE(rsp.pc); if (rsp.nextpc != ~0) @@ -2875,13 +2875,13 @@ static void rsp_set_context(void *src) /*****************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t rsp_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { UINT32 op = LITTLE_ENDIANIZE_INT32(*(UINT32 *)opram); return rsp_dasm_one(buffer, pc, op); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /*****************************************************************************/ @@ -3010,9 +3010,9 @@ void rsp_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = rsp_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = rsp_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = rsp_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &rsp_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h index 3bbea02d907..f6f2360725c 100644 --- a/src/emu/cpu/rsp/rsp.h +++ b/src/emu/cpu/rsp/rsp.h @@ -69,7 +69,7 @@ enum void rsp_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t rsp_dasm_one(char *buffer, offs_t pc, UINT32 op); #endif diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c index 3dbf86c8664..699374ac6a1 100644 --- a/src/emu/cpu/s2650/s2650.c +++ b/src/emu/cpu/s2650/s2650.c @@ -865,7 +865,7 @@ static int s2650_execute(int cycles) { S.ppc = S.page + S.iar; - CALL_MAME_DEBUG; + CALL_DEBUGGER(S.page + S.iar); S.ir = ROP(); S.r = S.ir & 3; /* register / value */ @@ -1569,9 +1569,9 @@ void s2650_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = s2650_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = s2650_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = s2650_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &s2650_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/s2650/s2650.h b/src/emu/cpu/s2650/s2650.h index 36fcfd6dd3e..e477ada8a69 100644 --- a/src/emu/cpu/s2650/s2650.h +++ b/src/emu/cpu/s2650/s2650.h @@ -23,7 +23,7 @@ enum { extern void s2650_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern offs_t s2650_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/saturn/saturn.c b/src/emu/cpu/saturn/saturn.c index a0184b494a3..5a386e873e1 100644 --- a/src/emu/cpu/saturn/saturn.c +++ b/src/emu/cpu/saturn/saturn.c @@ -159,7 +159,7 @@ static int saturn_execute(int cycles) { saturn.oldpc = saturn.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(saturn.pc); /* if an irq is pending, take it now */ if( saturn.pending_irq ) @@ -377,9 +377,9 @@ void saturn_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = saturn_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = saturn_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = saturn_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &saturn_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/saturn/saturn.h b/src/emu/cpu/saturn/saturn.h index fc53b32ef1b..6bf164a1533 100644 --- a/src/emu/cpu/saturn/saturn.h +++ b/src/emu/cpu/saturn/saturn.h @@ -58,9 +58,9 @@ typedef struct void (*crc)(int addr, int data); } SATURN_CONFIG; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned saturn_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ void saturn_get_info(UINT32 state, cpuinfo *info); diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c index 86619ce601c..986a19c9ca2 100644 --- a/src/emu/cpu/sc61860/sc61860.c +++ b/src/emu/cpu/sc61860/sc61860.c @@ -117,7 +117,7 @@ static int sc61860_execute(int cycles) { sc61860.oldpc = sc61860.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(sc61860.pc); sc61860_instruction(); @@ -214,9 +214,9 @@ void sc61860_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = sc61860_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = sc61860_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sc61860_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sc61860_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/sc61860/sc61860.h b/src/emu/cpu/sc61860/sc61860.h index 57daf299833..c6ff7973adc 100644 --- a/src/emu/cpu/sc61860/sc61860.h +++ b/src/emu/cpu/sc61860/sc61860.h @@ -46,9 +46,9 @@ typedef struct { void (*outc)(int); } SC61860_CONFIG; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned sc61860_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* this is though for power on/off of the sharps */ UINT8 *sc61860_internal_ram(void); diff --git a/src/emu/cpu/se3208/se3208.c b/src/emu/cpu/se3208/se3208.c index aa19b74ee04..aa16b2ecb66 100644 --- a/src/emu/cpu/se3208/se3208.c +++ b/src/emu/cpu/se3208/se3208.c @@ -1770,7 +1770,7 @@ static int SE3208_Run(int cycles) { UINT16 Opcode=cpu_readop16(WORD_XOR_LE(Context.PC)); - CALL_MAME_DEBUG; + CALL_DEBUGGER(Context.PC); OpTable[Opcode](Opcode); Context.PPC=Context.PC; @@ -1907,9 +1907,9 @@ void SE3208_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = SE3208_Exit; break; case CPUINFO_PTR_EXECUTE: info->execute = SE3208_Run; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = SE3208_Dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &SE3208_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/se3208/se3208.h b/src/emu/cpu/se3208/se3208.h index 90f6dfdad1f..f25d563be20 100644 --- a/src/emu/cpu/se3208/se3208.h +++ b/src/emu/cpu/se3208/se3208.h @@ -9,6 +9,6 @@ enum { extern void SE3208_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t SE3208_Dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c index 84930bcc68f..30595704fb7 100644 --- a/src/emu/cpu/sh2/sh2.c +++ b/src/emu/cpu/sh2/sh2.c @@ -2342,7 +2342,7 @@ static int sh2_execute(int cycles) else opcode = cpu_readop16(WORD_XOR_BE((UINT32)(sh2.pc & AM))); - CALL_MAME_DEBUG; + CALL_DEBUGGER(sh2.pc); sh2.delay = 0; sh2.pc += 2; @@ -2921,12 +2921,12 @@ static void set_irq_line(int irqline, int state) } } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t sh2_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return DasmSH2( buffer, pc, (oprom[0] << 8) | oprom[1] ); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void sh2_init(int index, int clock, const void *config, int (*irqcallback)(int)) { @@ -3129,9 +3129,9 @@ void sh2_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = sh2_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = sh2_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sh2_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sh2_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/sh2/sh2.h b/src/emu/cpu/sh2/sh2.h index 44c0d6b8e39..6f52dcaea52 100644 --- a/src/emu/cpu/sh2/sh2.h +++ b/src/emu/cpu/sh2/sh2.h @@ -75,7 +75,7 @@ extern void sh2_get_info(UINT32 state, cpuinfo *info); WRITE32_HANDLER( sh2_internal_w ); READ32_HANDLER( sh2_internal_r ); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned DasmSH2( char *dst, unsigned pc, UINT16 opcode ); #endif diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c index 308e01d7247..80b3fd26e91 100644 --- a/src/emu/cpu/sh4/sh4.c +++ b/src/emu/cpu/sh4/sh4.c @@ -314,7 +314,7 @@ UINT32 z; } #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static void sh4_syncronize_register_bank(int to) { int s; @@ -426,7 +426,7 @@ INLINE void sh4_exception(const char *message, int exception) // handle exceptio sh4.sgr = sh4.r[15]; sh4.sr |= MD; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER sh4_syncronize_register_bank((sh4.sr & sRB) >> 29); #endif if (!(sh4.sr & sRB)) @@ -1093,7 +1093,7 @@ INLINE void JSR(UINT32 m) /* LDC Rm,SR */ INLINE void LDCSR(UINT32 m) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER sh4_syncronize_register_bank((sh4.sr & sRB) >> 29); #endif if ((sh4.r[m] & sRB) != (sh4.sr & sRB)) @@ -1122,7 +1122,7 @@ UINT32 old; old = sh4.sr; sh4.ea = sh4.r[m]; sh4.sr = RL( sh4.ea ) & FLAGS; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER sh4_syncronize_register_bank((old & sRB) >> 29); #endif if ((old & sRB) != (sh4.sr & sRB)) @@ -1709,7 +1709,7 @@ INLINE void RTE(void) { sh4.delay = sh4.pc; sh4.pc = sh4.ea = sh4.spc; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER sh4_syncronize_register_bank((sh4.sr & sRB) >> 29); #endif if ((sh4.ssr & sRB) != (sh4.sr & sRB)) @@ -3561,7 +3561,7 @@ static int sh4_execute(int cycles) else opcode = cpu_readop16(WORD2_XOR_LE((UINT32)(sh4.pc & AM))); - CALL_MAME_DEBUG; + CALL_DEBUGGER(sh4.pc); sh4.delay = 0; sh4.pc += 2; @@ -4527,12 +4527,12 @@ static void sh4_parse_configuration(const struct sh4_config *conf) } } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t sh4_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return DasmSH4( buffer, pc, (oprom[1] << 8) | oprom[0] ); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void sh4_init(int index, int clock, const void *config, int (*irqcallback)(int)) { @@ -4981,9 +4981,9 @@ void sh4_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = sh4_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = sh4_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sh4_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sh4_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/sh4/sh4.h b/src/emu/cpu/sh4/sh4.h index f209e206db7..71ceacfdd43 100644 --- a/src/emu/cpu/sh4/sh4.h +++ b/src/emu/cpu/sh4/sh4.h @@ -85,7 +85,7 @@ extern void sh4_get_info(UINT32 state, cpuinfo *info); WRITE32_HANDLER( sh4_internal_w ); READ32_HANDLER( sh4_internal_r ); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned DasmSH4( char *dst, unsigned pc, UINT16 opcode ); #endif diff --git a/src/emu/cpu/sharc/sharc.c b/src/emu/cpu/sharc/sharc.c index e9041116132..d61d55d9782 100644 --- a/src/emu/cpu/sharc/sharc.c +++ b/src/emu/cpu/sharc/sharc.c @@ -7,9 +7,9 @@ #include "deprecat.h" #include "debugger.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t sharc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void sharc_dma_exec(int channel); static void check_interrupts(void); @@ -407,7 +407,7 @@ void sharc_external_dma_write(UINT32 address, UINT64 data) } } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t sharc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { UINT64 op = 0; @@ -420,7 +420,7 @@ static offs_t sharc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT flags = sharc_dasm_one(buffer, pc, op); return 1 | flags | DASMFLAG_SUPPORTED; } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void sharc_init(int index, int clock, const void *config, int (*irqcallback)(int)) @@ -593,7 +593,7 @@ static int sharc_execute(int cycles) } sharc_icount = 0; - CALL_MAME_DEBUG; + CALL_DEBUGGER(sharc.daddr); return cycles; } @@ -628,7 +628,7 @@ static int sharc_execute(int cycles) // fetch next instruction sharc.fetch_opcode = ROPCODE(sharc.faddr); - CALL_MAME_DEBUG; + CALL_DEBUGGER(sharc.pc); // handle looping if (sharc.pc == (sharc.laddr & 0xffffff)) @@ -1096,9 +1096,9 @@ static void sharc_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = sharc_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = sharc_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sharc_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sharc_icount; break; case CPUINFO_PTR_READ: info->read = sharc_debug_read; break; case CPUINFO_PTR_READOP: info->readop = sharc_debug_readop; break; diff --git a/src/emu/cpu/sharc/sharc.h b/src/emu/cpu/sharc/sharc.h index d07aebc0d09..f9e9f7ca566 100644 --- a/src/emu/cpu/sharc/sharc.h +++ b/src/emu/cpu/sharc/sharc.h @@ -28,7 +28,7 @@ extern void sharc_external_dma_write(UINT32 address, UINT64 data); void adsp21062_get_info(UINT32 state, cpuinfo *info); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern UINT32 sharc_dasm_one(char *buffer, offs_t pc, UINT64 opcode); #endif diff --git a/src/emu/cpu/sharc/sharcops.c b/src/emu/cpu/sharc/sharcops.c index 1d1c7879866..7809c0873a4 100644 --- a/src/emu/cpu/sharc/sharcops.c +++ b/src/emu/cpu/sharc/sharcops.c @@ -2747,7 +2747,7 @@ static void sharcop_idle(void) static void sharcop_unimplemented(void) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER char dasm[1000]; sharc_dasm(dasm, sharc.pc, NULL, NULL); mame_printf_debug("SHARC: %08X: %s\n", sharc.pc, dasm); diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c index 3a92c5ea023..9586e278c9d 100644 --- a/src/emu/cpu/sm8500/sm8500.c +++ b/src/emu/cpu/sm8500/sm8500.c @@ -216,7 +216,7 @@ static int sm8500_execute( int cycles ) UINT32 d1,d2; UINT32 res; - CALL_MAME_DEBUG; + CALL_DEBUGGER(regs.PC); oldpc = regs.PC; mycycles = 0; sm8500_process_interrupts(); @@ -497,7 +497,7 @@ void sm8500_get_info( UINT32 state, cpuinfo *info ) case CPUINFO_PTR_EXIT: info->exit = sm8500_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = sm8500_execute; break; case CPUINFO_PTR_BURN: info->burn = sm8500_burn; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sm8500_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sm8500_icount; break; diff --git a/src/emu/cpu/sm8500/sm8500.h b/src/emu/cpu/sm8500/sm8500.h index 89aaab5f4d6..16744cbff44 100644 --- a/src/emu/cpu/sm8500/sm8500.h +++ b/src/emu/cpu/sm8500/sm8500.h @@ -49,9 +49,9 @@ INLINE void sm85cpu_mem_writeword( UINT32 address, UINT16 value ) sm85cpu_mem_writebyte( ( address + 1 ) & 0xffff, value & 0xff ); } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned sm8500_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram ); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c index bb0ccab6c6a..a3e2d061bf1 100644 --- a/src/emu/cpu/spc700/spc700.c +++ b/src/emu/cpu/spc700/spc700.c @@ -1398,7 +1398,7 @@ void spc700_state_load(void *file) } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "spc700ds.h" #endif @@ -1411,7 +1411,7 @@ int spc700_execute(int clocks) while(CLOCKS > 0) { REG_PPC = REG_PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(REG_PC); REG_PC++; #if 0 @@ -1791,9 +1791,9 @@ void spc700_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = spc700_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = spc700_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = spc700_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &spc700_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/ssp1610/ssp1610.c b/src/emu/cpu/ssp1610/ssp1610.c index 9fdcaafafb0..c65ba7bba5e 100644 --- a/src/emu/cpu/ssp1610/ssp1610.c +++ b/src/emu/cpu/ssp1610/ssp1610.c @@ -143,7 +143,7 @@ static int ssp1610_execute(int cycles) PPC = PC; /* copy PC to previous PC */ - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); op = READ_OP(PC); @@ -690,12 +690,12 @@ static void ssp1610_set_context(void *regs) ssp1610 = *(ssp1610_regs *)regs; } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t ssp1610_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return dasm_ssp1610( buffer, pc, oprom); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #if (HAS_SSP1610) @@ -818,9 +818,9 @@ void ssp1610_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = ssp1610_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = ssp1610_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ssp1610_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ssp1610_ICount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map = 0; break; diff --git a/src/emu/cpu/ssp1610/ssp1610.h b/src/emu/cpu/ssp1610/ssp1610.h index fe31d4d5cad..eb164423a6b 100644 --- a/src/emu/cpu/ssp1610/ssp1610.h +++ b/src/emu/cpu/ssp1610/ssp1610.h @@ -9,7 +9,7 @@ void e116t_get_info(UINT32 state, cpuinfo *info); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned dasm_ssp1610(char *buffer, unsigned pc, const UINT8 *oprom); #endif diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c index 17647b859fa..b4add6fc438 100644 --- a/src/emu/cpu/t11/t11.c +++ b/src/emu/cpu/t11/t11.c @@ -401,7 +401,7 @@ static int t11_execute(int cycles) { t11.ppc = t11.reg[7]; /* copy PC to previous PC */ - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); t11.op = ROPCODE(); (*opcode_table[t11.op >> 3])(); @@ -506,9 +506,9 @@ void t11_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = t11_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = t11_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = t11_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &t11_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/t11/t11.h b/src/emu/cpu/t11/t11.h index e8204b8f288..969e1c998d0 100644 --- a/src/emu/cpu/t11/t11.h +++ b/src/emu/cpu/t11/t11.h @@ -43,7 +43,7 @@ extern void t11_get_info(UINT32 state, cpuinfo *info); #define T11_WRMEM(A,V) (program_write_byte_16le(A,V)) #define T11_WRMEM_WORD(A,V) (program_write_word_16le(A,V)) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t t11_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c index 7e591c44982..eab28658601 100644 --- a/src/emu/cpu/tlcs90/tlcs90.c +++ b/src/emu/cpu/tlcs90/tlcs90.c @@ -1330,7 +1330,7 @@ static int t90_execute(int cycles) do { T90.prvpc.d = T90.pc.d; - CALL_MAME_DEBUG; + CALL_DEBUGGER(T90.pc.d); check_interrupts(); @@ -2784,7 +2784,7 @@ void tmp90840_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = t90_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = t90_execute; break; case CPUINFO_PTR_BURN: info->burn = t90_burn; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = t90_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &t90_ICount; break; diff --git a/src/emu/cpu/tlcs90/tlcs90.h b/src/emu/cpu/tlcs90/tlcs90.h index fc750a00c1d..fd9b3f8ad51 100644 --- a/src/emu/cpu/tlcs90/tlcs90.h +++ b/src/emu/cpu/tlcs90/tlcs90.h @@ -8,7 +8,7 @@ void tmp90841_get_info(UINT32, cpuinfo*); void tmp91640_get_info(UINT32, cpuinfo*); void tmp91641_get_info(UINT32, cpuinfo*); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned t90_dasm(char *buffer, UINT32 oldpc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/tms32010/32010dsm.c b/src/emu/cpu/tms32010/32010dsm.c index fe9de001b05..c7d73071d8b 100644 --- a/src/emu/cpu/tms32010/32010dsm.c +++ b/src/emu/cpu/tms32010/32010dsm.c @@ -29,7 +29,7 @@ #include #include -#ifdef MAME_DEBUG /* Compile interface to MAME */ +#ifdef ENABLE_DEBUGGER /* Compile interface to MAME */ #include "cpuintrf.h" #include "tms32010.h" #include "debugger.h" diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c index 6a154755446..390ddd4227e 100644 --- a/src/emu/cpu/tms32010/tms32010.c +++ b/src/emu/cpu/tms32010/tms32010.c @@ -790,7 +790,7 @@ static int tms32010_execute(int cycles) R.PREVPC = R.PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(R.PC); R.opcode.d = M_RDOP(R.PC); R.PC++; @@ -930,9 +930,9 @@ void tms32010_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = tms32010_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = tms32010_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms32010_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tms32010_icount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map = construct_map_tms32010_ram; break; diff --git a/src/emu/cpu/tms32010/tms32010.h b/src/emu/cpu/tms32010/tms32010.h index 60a69858f92..5ca14e6277c 100644 --- a/src/emu/cpu/tms32010/tms32010.h +++ b/src/emu/cpu/tms32010/tms32010.h @@ -123,7 +123,7 @@ void tms32010_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t tms32010_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/tms32025/32025dsm.c b/src/emu/cpu/tms32025/32025dsm.c index b4097abbfcd..95bd0a8bddd 100644 --- a/src/emu/cpu/tms32025/32025dsm.c +++ b/src/emu/cpu/tms32025/32025dsm.c @@ -33,7 +33,7 @@ #include #include -#ifdef MAME_DEBUG /* Compile interface to MAME */ +#ifdef ENABLE_DEBUGGER /* Compile interface to MAME */ #include "tms32025.h" #include "debugger.h" extern UINT16 *tms32025_pgmmap[0x200]; diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c index 153bb28b240..6f98d691479 100644 --- a/src/emu/cpu/tms32025/tms32025.c +++ b/src/emu/cpu/tms32025/tms32025.c @@ -1982,7 +1982,7 @@ static int tms32025_execute(int cycles) while (R.idle && tms32025_icount > 0) process_timer(tms32025_icount); - if (tms32025_icount <= 0) CALL_MAME_DEBUG; + if (tms32025_icount <= 0) CALL_DEBUGGER(R.PC); while (tms32025_icount > 0) @@ -1995,7 +1995,7 @@ static int tms32025_execute(int cycles) R.PREVPC = R.PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(R.PC); R.opcode.d = M_RDOP(R.PC); R.PC++; @@ -2020,7 +2020,7 @@ static int tms32025_execute(int cycles) if (R.init_load_addr == 2) { /* Repeat next instruction */ R.PREVPC = R.PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(R.PC); R.opcode.d = M_RDOP(R.PC); R.PC++; @@ -2385,9 +2385,9 @@ void tms32025_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = tms32025_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = tms32025_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms32025_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_READ: info->read = tms32025_read; break; case CPUINFO_PTR_WRITE: info->write = tms32025_write; break; case CPUINFO_PTR_READOP: info->readop = tms32025_readop; break; diff --git a/src/emu/cpu/tms32025/tms32025.h b/src/emu/cpu/tms32025/tms32025.h index 173c2783aee..19d55fbe482 100644 --- a/src/emu/cpu/tms32025/tms32025.h +++ b/src/emu/cpu/tms32025/tms32025.h @@ -71,7 +71,7 @@ extern void tms32025_get_info(UINT32 state, cpuinfo *info); extern void tms32026_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t tms32025_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/tms32031/32031ops.c b/src/emu/cpu/tms32031/32031ops.c index f4c9d1e74eb..65aa45dfd20 100644 --- a/src/emu/cpu/tms32031/32031ops.c +++ b/src/emu/cpu/tms32031/32031ops.c @@ -85,7 +85,7 @@ static UINT32 defval; static void illegal(void) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER logerror("Illegal op @ %06X: %08X (tbl=%03X)\n", tms32031.pc - 1, OP, OP >> 21); DEBUGGER_BREAK; #endif @@ -100,7 +100,7 @@ static void unimplemented(void) INLINE void execute_one(void) { - CALL_MAME_DEBUG; + CALL_DEBUGGER(tms32031.pc); OP = ROPCODE(tms32031.pc); tms32031_icount -= 2; /* 2 clocks per cycle */ tms32031.pc++; diff --git a/src/emu/cpu/tms32031/tms32031.c b/src/emu/cpu/tms32031/tms32031.c index 279c41dd0df..29798e03cfb 100644 --- a/src/emu/cpu/tms32031/tms32031.c +++ b/src/emu/cpu/tms32031/tms32031.c @@ -520,7 +520,7 @@ static int tms32031_execute(int cycles) while (tms32031_icount > 0) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER if (IREG(TMR_SP) & 0xff000000) DEBUGGER_BREAK; #endif @@ -559,14 +559,14 @@ static int tms32031_execute(int cycles) DISASSEMBLY HOOK ***************************************************************************/ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t tms32031_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { UINT32 op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24); extern unsigned dasm_tms32031(char *, unsigned, UINT32); return dasm_tms32031(buffer, pc, op); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ @@ -816,9 +816,9 @@ void tms32031_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = tms32031_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = tms32031_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms32031_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tms32031_icount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map = construct_map_internal_32031; break; diff --git a/src/emu/cpu/tms32051/tms32051.c b/src/emu/cpu/tms32051/tms32051.c index b357af04f14..c515edfea05 100644 --- a/src/emu/cpu/tms32051/tms32051.c +++ b/src/emu/cpu/tms32051/tms32051.c @@ -361,7 +361,7 @@ static int tms_execute(int num_cycles) } ppc = tms.pc; - CALL_MAME_DEBUG; + CALL_DEBUGGER(tms.pc); tms.op = ROPCODE(); tms32051_opcode_table[tms.op >> 8](); @@ -628,9 +628,9 @@ static void tms_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = tms_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = tms_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms32051_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_READ: info->read = tms_debug_read; break; case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tms_icount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map = construct_map_internal_pgm; break; diff --git a/src/emu/cpu/tms32051/tms32051.h b/src/emu/cpu/tms32051/tms32051.h index 86576b524e9..172db88ef30 100644 --- a/src/emu/cpu/tms32051/tms32051.h +++ b/src/emu/cpu/tms32051/tms32051.h @@ -5,7 +5,7 @@ void tms32051_get_info(UINT32 state, cpuinfo *info); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t tms32051_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c index d9d418276e9..e2eee022326 100644 --- a/src/emu/cpu/tms34010/tms34010.c +++ b/src/emu/cpu/tms34010/tms34010.c @@ -835,8 +835,8 @@ static int tms34010_execute(int cycles) do { - #ifdef MAME_DEBUG - if (Machine->debug_mode) { state.st = GET_ST(); mame_debug_hook(); } + #ifdef ENABLE_DEBUGGER + if (Machine->debug_mode) { state.st = GET_ST(); mame_debug_hook(PC); } #endif state.op = ROPCODE(); (*opcode_table[state.op >> 4])(); @@ -1864,9 +1864,9 @@ void tms34010_get_info(UINT32 _state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = tms34010_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = tms34010_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms34010_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tms34010_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -1953,9 +1953,9 @@ void tms34020_get_info(UINT32 _state, cpuinfo *info) case CPUINFO_PTR_GET_CONTEXT: info->getcontext = tms34020_get_context; break; case CPUINFO_PTR_SET_CONTEXT: info->setcontext = tms34020_set_context; break; case CPUINFO_PTR_RESET: info->reset = tms34020_reset; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms34020_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "TMS34020"); break; diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h index 4a3f017690e..57b349b24ea 100644 --- a/src/emu/cpu/tms34010/tms34010.h +++ b/src/emu/cpu/tms34010/tms34010.h @@ -122,7 +122,7 @@ READ16_HANDLER( tms34020_io_register_r ); #define TOWORD(bitaddr) ((offs_t)(bitaddr) >> 4) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t tms34010_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); offs_t tms34020_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/tms7000/tms7000.c b/src/emu/cpu/tms7000/tms7000.c index ef83592d2df..fe3b861565e 100644 --- a/src/emu/cpu/tms7000/tms7000.c +++ b/src/emu/cpu/tms7000/tms7000.c @@ -331,7 +331,7 @@ void tms7000_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = tms7000_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = tms7000_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; /* Not supported */break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms7000_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tms7000_icount; break; @@ -471,7 +471,7 @@ static int tms7000_execute(int cycles) do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(pPC); if( tms7000.idle_state == 0 ) { @@ -510,7 +510,7 @@ static int tms7000_exl_execute(int cycles) do { - CALL_MAME_DEBUG; + CALL_DEBUGGER(pPC); if( tms7000.idle_state == 0 ) { diff --git a/src/emu/cpu/tms7000/tms7000.h b/src/emu/cpu/tms7000/tms7000.h index cc2ed8ea067..030ce982c1d 100644 --- a/src/emu/cpu/tms7000/tms7000.h +++ b/src/emu/cpu/tms7000/tms7000.h @@ -47,9 +47,9 @@ extern void tms7000_A6EC1( void ); /* External event counter */ extern void tms7000_get_info(UINT32 state, cpuinfo *info); extern void tms7000_exl_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned tms7000_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram ); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif /* _TMS7000_H */ diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h index 4a2e1b194b7..eb61e0f2c93 100644 --- a/src/emu/cpu/tms9900/99xxcore.h +++ b/src/emu/cpu/tms9900/99xxcore.h @@ -1473,7 +1473,7 @@ static int tms99xx_execute(int cycles) } } - #ifdef MAME_DEBUG + #ifdef ENABLE_DEBUGGER { if (Machine->debug_mode) { @@ -1502,7 +1502,7 @@ static int tms99xx_execute(int cycles) #endif #endif - mame_debug_hook(); + mame_debug_hook(I.IR); } } #endif @@ -1966,12 +1966,12 @@ static void field_interrupt(void) #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static unsigned tms99xx_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return Dasm9900(buffer, pc, TMS99XX_MODEL, oprom, opram); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /*****************************************************************************/ @@ -4811,9 +4811,9 @@ void TMS99XX_GET_INFO(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = tms99xx_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = tms99xx_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tms99xx_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &TMS99XX_ICOUNT; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/tms9900/tms9900.h b/src/emu/cpu/tms9900/tms9900.h index 8b248ed6b52..be5ec7c3d24 100644 --- a/src/emu/cpu/tms9900/tms9900.h +++ b/src/emu/cpu/tms9900/tms9900.h @@ -214,7 +214,7 @@ typedef struct tms99110areset_param #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c index 7ff55dafe5d..ffa632f7bc5 100644 --- a/src/emu/cpu/upd7810/upd7810.c +++ b/src/emu/cpu/upd7810/upd7810.c @@ -1621,7 +1621,7 @@ static int upd7810_execute (int cycles) { int cc = 0; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); PPC = PC; RDOP(OP); @@ -1919,9 +1919,9 @@ void upd7810_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = upd7810_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = upd7810_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = upd7810_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &upd7810_icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -2007,9 +2007,9 @@ void upd7807_get_info(UINT32 state, cpuinfo *info) { /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_RESET: info->reset = upd7807_reset; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = upd7807_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "uPD7807"); break; diff --git a/src/emu/cpu/upd7810/upd7810.h b/src/emu/cpu/upd7810/upd7810.h index bd68a1499b2..183e3271aa1 100644 --- a/src/emu/cpu/upd7810/upd7810.h +++ b/src/emu/cpu/upd7810/upd7810.h @@ -148,7 +148,7 @@ typedef struct { int (*irq_callback)(int irqline); } UPD7810; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t upd7810_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); offs_t upd7807_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c index 24d54d21645..671a744760d 100644 --- a/src/emu/cpu/v30mz/v30mz.c +++ b/src/emu/cpu/v30mz/v30mz.c @@ -917,12 +917,12 @@ static void set_irq_line(int irqline, int state) } } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static offs_t nec_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { return necv_dasm_one(buffer, pc, oprom); } -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ static void nec_init(int index, int clock, const void *config, int (*irqcallback)(int), int type) { @@ -970,7 +970,7 @@ static int v30mz_execute(int cycles) if (I.no_interrupt) I.no_interrupt--; - CALL_MAME_DEBUG; + CALL_DEBUGGER((I.sregs[CS]<<4) + I.ip); nec_instruction[FETCHOP](); } @@ -1097,9 +1097,9 @@ void v30mz_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = nec_reset; break; case CPUINFO_PTR_EXIT: info->exit = nec_exit; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = nec_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &nec_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/v60/v60.c b/src/emu/cpu/v60/v60.c index e6e08e35e07..d1892b371e4 100644 --- a/src/emu/cpu/v60/v60.c +++ b/src/emu/cpu/v60/v60.c @@ -426,7 +426,7 @@ static int v60_execute(int cycles) v60_try_irq(); while(v60_ICount >= 0) { v60.PPC = PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); v60_ICount -= 8; /* fix me -- this is just an average */ inc = OpCodeTable[OpRead8(PC)](); PC += inc; @@ -453,10 +453,10 @@ static void v60_set_context(void *src) } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t v60_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); offs_t v70_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /************************************************************************** @@ -642,9 +642,9 @@ void v60_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = v60_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = v60_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = v60_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &v60_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -733,9 +733,9 @@ void v70_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as pointers to data or functions --- */ case CPUINFO_PTR_INIT: info->init = v70_init; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = v70_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "V70"); break; diff --git a/src/emu/cpu/v60/v60d.c b/src/emu/cpu/v60/v60d.c index 0723715986f..97804598569 100644 --- a/src/emu/cpu/v60/v60d.c +++ b/src/emu/cpu/v60/v60d.c @@ -1460,7 +1460,7 @@ static int (*const dasm_optable[256])(unsigned ipc, unsigned pc, char *out) = /* 0xFF */ dopCLRTLB }; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t v60_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) { rombase = oprom; diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c index 08940278b8f..51e108878f1 100644 --- a/src/emu/cpu/v810/v810.c +++ b/src/emu/cpu/v810/v810.c @@ -974,7 +974,7 @@ static int v810_execute(int cycles) while(v810_ICount>=0) { v810.PPC=PC; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); OP=R_OP(PC); PC+=2; v810_ICount-= OpCodeTable[OP>>10](); @@ -1183,9 +1183,9 @@ void v810_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = NULL; break; case CPUINFO_PTR_EXECUTE: info->execute = v810_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = v810_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &v810_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/v810/v810.h b/src/emu/cpu/v810/v810.h index 4832537a009..d2e83d2f45c 100644 --- a/src/emu/cpu/v810/v810.h +++ b/src/emu/cpu/v810/v810.h @@ -46,7 +46,7 @@ void v810_get_info(UINT32, cpuinfo*); #define ADD(dst, src) { UINT64 res=(UINT64)(dst)+(UINT64)(src); SetCF(res); SetOF_Add(res,src,dst); SetSZPF(res); dst=(UINT32)res; } #define SUB(dst, src) { UINT64 res=(UINT64)(dst)-(INT64)(src); SetCF(res); SetOF_Sub(res,src,dst); SetSZPF(res); dst=(UINT32)res; } -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t v810_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/x64drc.c b/src/emu/cpu/x64drc.c index c224cb26586..266edce7fba 100644 --- a/src/emu/cpu/x64drc.c +++ b/src/emu/cpu/x64drc.c @@ -65,7 +65,7 @@ #include "x64drc.h" #include "debugger.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "deprecat.h" #endif @@ -175,7 +175,7 @@ drc_core *drc_init(UINT8 cpunum, drc_config *config) goto error; /* get pointers to external C functions */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER drc->mame_debug_hook = (x86code *)mame_debug_hook; #endif drc->recompile_code = (x86code *)recompile_code; @@ -421,7 +421,7 @@ void drc_invalidate_code_range(drc_core *drc, UINT32 startpc, UINT32 endpc) void drc_append_call_debugger(drc_core *drc) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER if (Machine->debug_mode) emit_call_m64(DRCTOP, MDRC(&drc->mame_debug_hook)); // call mame_debug_hook #endif diff --git a/src/emu/cpu/x86drc.c b/src/emu/cpu/x86drc.c index 7b065ee080e..03d3aa90f8e 100644 --- a/src/emu/cpu/x86drc.c +++ b/src/emu/cpu/x86drc.c @@ -391,7 +391,7 @@ void drc_append_verify_code(drc_core *drc, void *code, UINT8 length) void drc_append_call_debugger(drc_core *drc) { -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER if (Machine->debug_mode) { emit_link link; @@ -615,7 +615,7 @@ void drc_dasm(FILE *f, const void *begin, const void *end) while(begin_ptr < end_ptr) { -#if defined(MAME_DEBUG) && HAS_I386 +#if defined(ENABLE_DEBUGGER) && HAS_I386 length = i386_dasm_one(buffer, pc, (UINT8 *) begin_ptr, 32) & DASMFLAG_LENGTHMASK; #else sprintf(buffer, "%02X", *begin_ptr); diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c index d630d4df49b..c40590750dc 100644 --- a/src/emu/cpu/z180/z180.c +++ b/src/emu/cpu/z180/z180.c @@ -2179,7 +2179,7 @@ again: if ((IO_DSTAT & Z180_DSTAT_DE0) == Z180_DSTAT_DE0 && (IO_DMODE & Z180_DMODE_MMOD) == Z180_DMODE_MMOD) { - CALL_MAME_DEBUG; + CALL_DEBUGGER(_PCD); z180_dma0(); old_icount = handle_timers(z180_icount, old_icount); @@ -2192,7 +2192,7 @@ again: Z180.after_EI = 0; _PPC = _PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(_PCD); _R++; EXEC_INLINE(op,ROP()); @@ -2219,7 +2219,7 @@ again: Z180.after_EI = 0; _PPC = _PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(_PCD); _R++; EXEC_INLINE(op,ROP()); old_icount = handle_timers(z180_icount, old_icount); @@ -2557,9 +2557,9 @@ void z180_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_RESET: info->reset = z180_reset; break; case CPUINFO_PTR_EXECUTE: info->execute = z180_execute; break; case CPUINFO_PTR_BURN: info->burn = z180_burn; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = z180_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &z180_icount; break; case CPUINFO_PTR_TRANSLATE: info->translate = z180_translate; break; case CPUINFO_PTR_Z180_CYCLE_TABLE + Z180_TABLE_op: info->p = (void *)cc[Z180_TABLE_op]; break; diff --git a/src/emu/cpu/z180/z180.h b/src/emu/cpu/z180/z180.h index 825e08f3168..04897283532 100644 --- a/src/emu/cpu/z180/z180.h +++ b/src/emu/cpu/z180/z180.h @@ -127,7 +127,7 @@ extern void z180_setOPbase(int pc); extern void z180_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t z180_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c index aad8bcd99f3..274ad4b4adb 100644 --- a/src/emu/cpu/z80/z80.c +++ b/src/emu/cpu/z80/z80.c @@ -3566,7 +3566,7 @@ static int z80_execute(int cycles) Z80.after_ei = FALSE; PRVPC = PCD; - CALL_MAME_DEBUG; + CALL_DEBUGGER(PCD); R++; EXEC_INLINE(op,ROP()); } while( z80_ICount > 0 ); @@ -3756,7 +3756,7 @@ void z80_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = z80_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = z80_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = z80_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &z80_ICount; break; diff --git a/src/emu/cpu/z80/z80.h b/src/emu/cpu/z80/z80.h index a2a080b78ad..94bb71ababa 100644 --- a/src/emu/cpu/z80/z80.h +++ b/src/emu/cpu/z80/z80.h @@ -29,7 +29,7 @@ enum extern void z80_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned z80_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c index 8af59e6a5c4..1f523da95e4 100644 --- a/src/emu/cpu/z8000/z8000.c +++ b/src/emu/cpu/z8000/z8000.c @@ -480,7 +480,7 @@ static int z8000_execute(int cycles) if (IRQ_REQ) Interrupt(); - CALL_MAME_DEBUG; + CALL_DEBUGGER(PC); if (IRQ_REQ & Z8000_HALT) { @@ -689,9 +689,9 @@ void z8000_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXIT: info->exit = z8000_exit; break; case CPUINFO_PTR_EXECUTE: info->execute = z8000_execute; break; case CPUINFO_PTR_BURN: info->burn = NULL; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = z8000_dasm; break; -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &z8000_ICount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ diff --git a/src/emu/cpu/z8000/z8000.h b/src/emu/cpu/z8000/z8000.h index 92f07f30f71..f6f80dc3fef 100644 --- a/src/emu/cpu/z8000/z8000.h +++ b/src/emu/cpu/z8000/z8000.h @@ -22,7 +22,7 @@ enum { /* PUBLIC FUNCTIONS */ extern void z8000_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER offs_t z8000_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); #endif diff --git a/src/emu/cpu/z80gb/z80gb.c b/src/emu/cpu/z80gb/z80gb.c index 68c4c7d2be4..c362c8613fe 100644 --- a/src/emu/cpu/z80gb/z80gb.c +++ b/src/emu/cpu/z80gb/z80gb.c @@ -307,7 +307,7 @@ static int z80gb_execute (int cycles) } else { /* Fetch and count cycles */ z80gb_ProcessInterrupts (); - CALL_MAME_DEBUG; + CALL_DEBUGGER(Regs.w.PC); if ( Regs.w.enable & HALTED ) { CYCLES_PASSED( Cycles[0x76] ); Regs.w.execution_state = 1; @@ -466,7 +466,7 @@ void z80gb_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_EXECUTE: info->execute = z80gb_execute; break; case CPUINFO_PTR_BURN: info->burn = z80gb_burn; break; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER case CPUINFO_PTR_DISASSEMBLE: info->disassemble = z80gb_dasm; break; #endif case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &z80gb_ICount; break; diff --git a/src/emu/cpu/z80gb/z80gb.h b/src/emu/cpu/z80gb/z80gb.h index abbbe41df0b..0e1d7e6cd39 100644 --- a/src/emu/cpu/z80gb/z80gb.h +++ b/src/emu/cpu/z80gb/z80gb.h @@ -25,8 +25,8 @@ enum { /****************************************************************************/ extern void z80gb_get_info(UINT32 state, cpuinfo *info); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER extern unsigned z80gb_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram ); -#endif /* MAME_DEBUG */ +#endif /* ENABLE_DEBUGGER */ #endif diff --git a/src/emu/cpuexec.c b/src/emu/cpuexec.c index 725edd3a613..e74a9075a10 100644 --- a/src/emu/cpuexec.c +++ b/src/emu/cpuexec.c @@ -15,7 +15,7 @@ #include "profiler.h" #include "debugger.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "debug/debugcpu.h" #endif @@ -1050,7 +1050,7 @@ static TIMER_CALLBACK( cpu_vblankcallback ) /* reset the counter */ vblank_countdown = vblank_multiplier; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER /* notify the debugger */ debug_vblank_hook(); #endif diff --git a/src/emu/cpuint.c b/src/emu/cpuint.c index 2d8463ec375..0b13bfb2d36 100644 --- a/src/emu/cpuint.c +++ b/src/emu/cpuint.c @@ -11,7 +11,7 @@ #include "driver.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "debug/debugcpu.h" #endif @@ -364,7 +364,7 @@ INLINE int cpu_irq_callback(int cpunum, int line) if (drv_irq_callbacks[cpunum]) vector = (*drv_irq_callbacks[cpunum])(line); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER /* notify the debugger */ debug_interrupt_hook(cpunum, line); #endif diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 0c190ec1c53..0bda342cc93 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -706,10 +706,9 @@ static void set_cpu_reg(UINT32 ref, UINT64 value) before executing each instruction -------------------------------------------------*/ -void mame_debug_hook(void) +void mame_debug_hook(offs_t curpc) { int cpunum = cpu_getactivecpu(); - offs_t curpc = activecpu_get_pc(); debug_cpu_info *info = &debug_cpuinfo[cpunum]; /* update the history */ diff --git a/src/emu/debugger.h b/src/emu/debugger.h index 8cc9dbb00a5..4bb78d76ebe 100644 --- a/src/emu/debugger.h +++ b/src/emu/debugger.h @@ -15,6 +15,7 @@ #define __DEBUGGER_H__ #include "mame.h" +#include "memory.h" /*************************************************************************** @@ -22,7 +23,7 @@ ***************************************************************************/ /* handy macro for hard-coding debugger breaks */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #define DEBUGGER_BREAK if (Machine->debug_mode) mame_debug_break(); #else #define DEBUGGER_BREAK @@ -30,10 +31,10 @@ /* handy macro for CPU cores */ -#ifdef MAME_DEBUG -#define CALL_MAME_DEBUG if (Machine->debug_mode) mame_debug_hook(); +#ifdef ENABLE_DEBUGGER +#define CALL_DEBUGGER(p) if (Machine->debug_mode) mame_debug_hook(p); #else -#define CALL_MAME_DEBUG +#define CALL_DEBUGGER(p) #endif @@ -46,7 +47,7 @@ void mame_debug_init(running_machine *machine); /* call this once per instruction from CPU cores */ -void mame_debug_hook(void); +void mame_debug_hook(offs_t curpc); /* call this to break into the debugger as soon as possible */ void mame_debug_break(void); @@ -60,7 +61,7 @@ int mame_debug_is_active(void); STUBS ***************************************************************************/ -#ifndef MAME_DEBUG +#ifndef ENABLE_DEBUGGER #define mame_debug_init(m) do { } while (0) #define mame_debug_hook() do { } while (0) #define mame_debug_break() do { } while (0) diff --git a/src/emu/emu.mak b/src/emu/emu.mak index 377f3714b14..652557ac916 100644 --- a/src/emu/emu.mak +++ b/src/emu/emu.mak @@ -81,7 +81,7 @@ EMUOBJS += \ $(EMUOBJ)/profiler.o endif -ifdef DEBUG +ifdef DEBUGGER EMUOBJS += \ $(EMUOBJ)/debug/debugcmd.o \ $(EMUOBJ)/debug/debugcmt.o \ @@ -190,7 +190,7 @@ include $(EMUSRC)/cpu/cpu.mak $(LIBCPU): $(CPUOBJS) -ifdef DEBUG +ifdef DEBUGGER $(LIBCPU): $(DBGOBJS) endif diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index 492244b7bb8..630dcf30468 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -144,7 +144,7 @@ const options_entry mame_core_options[] = { "log", "0", OPTION_BOOLEAN, "generate an error.log file" }, { "verbose;v", "0", OPTION_BOOLEAN, "display additional diagnostic information" }, { "update_in_pause", "0", OPTION_BOOLEAN, "keep calling video updates while in pause" }, -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER { "debug;d", "1", OPTION_BOOLEAN, "enable/disable debugger" }, { "debugscript", NULL, 0, "script for debugger" }, #else diff --git a/src/emu/mame.c b/src/emu/mame.c index c1d05eb14f5..9f5c7e3c2e0 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -86,7 +86,7 @@ #include "uimenu.h" #include "deprecat.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "debug/debugcon.h" #endif @@ -1297,7 +1297,7 @@ void mame_parse_ini_files(core_options *options, const game_driver *driver) parse_ini_file(options, CONFIGNAME); /* debug builds: parse "debug.ini" as well */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER parse_ini_file(options, "debug"); #endif @@ -1447,7 +1447,7 @@ static void reset_machine(running_machine *machine) machine->playback_file = NULL; /* debugger-related information */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER machine->debug_mode = options_get_bool(mame_options(), OPTION_DEBUG); #else machine->debug_mode = 0; @@ -1544,7 +1544,7 @@ static void init_machine(running_machine *machine) devices_init(machine); #endif -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER /* initialize the debugger */ if (machine->debug_mode) mame_debug_init(machine); diff --git a/src/emu/memory.c b/src/emu/memory.c index c7ee930a8a2..0ddf0ee0804 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -92,7 +92,7 @@ #include "driver.h" #include "profiler.h" #include "deprecat.h" -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #include "debug/debugcpu.h" #endif @@ -152,7 +152,7 @@ #define SUBTABLE_PTR(tabledata, entry) (&(tabledata)->table[(1 << LEVEL1_BITS) + (((entry) - SUBTABLE_BASE) << LEVEL2_BITS)]) -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER #define DEBUG_HOOK_READ(a,b,c) if (debug_hook_read) (*debug_hook_read)(a, b, c) #define DEBUG_HOOK_WRITE(a,b,c,d) if (debug_hook_write) (*debug_hook_write)(a, b, c, d) #else @@ -291,7 +291,7 @@ static int log_unmap[ADDRESS_SPACES]; /* log unmapped memory accesses */ static cpu_data cpudata[MAX_CPU]; /* data gathered for each CPU */ static bank_data bankdata[STATIC_COUNT]; /* data gathered for each bank */ -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER static debug_hook_read_ptr debug_hook_read; /* pointer to debugger callback for memory reads */ static debug_hook_write_ptr debug_hook_write; /* pointer to debugger callback for memory writes */ #endif @@ -540,7 +540,7 @@ void memory_set_context(int activecpu) opbasefunc = cpudata[activecpu].opbase; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER if (activecpu != -1) debug_get_memory_hooks(activecpu, &debug_hook_read, &debug_hook_write); else diff --git a/src/emu/memory.h b/src/emu/memory.h index 48112a0de5b..cc85598118d 100644 --- a/src/emu/memory.h +++ b/src/emu/memory.h @@ -18,26 +18,6 @@ -/*************************************************************************** - PARAMETERS -***************************************************************************/ - -#ifdef MAME_DEBUG -#define CPUREADOP_SAFETY_NONE 0 -#define CPUREADOP_SAFETY_PARTIAL 0 -#define CPUREADOP_SAFETY_FULL 1 -#elif defined(MESS) -#define CPUREADOP_SAFETY_NONE 0 -#define CPUREADOP_SAFETY_PARTIAL 1 -#define CPUREADOP_SAFETY_FULL 0 -#else -#define CPUREADOP_SAFETY_NONE 1 -#define CPUREADOP_SAFETY_PARTIAL 0 -#define CPUREADOP_SAFETY_FULL 0 -#endif - - - /*************************************************************************** BASIC TYPE DEFINITIONS ***************************************************************************/ @@ -1030,15 +1010,7 @@ extern address_space active_address_space[]; /* address spaces */ #define ACCESSING_MSB32 ((mem_mask & 0xff000000) == 0) /* ----- opcode range safety checks ----- */ -#if CPUREADOP_SAFETY_NONE -#define address_is_unsafe(A) (0) -#elif CPUREADOP_SAFETY_PARTIAL -#define address_is_unsafe(A) (UNEXPECTED((A) > opcode_memory_max)) -#elif CPUREADOP_SAFETY_FULL #define address_is_unsafe(A) ((UNEXPECTED((A) < opcode_memory_min) || UNEXPECTED((A) > opcode_memory_max))) -#else -#error Must set either CPUREADOP_SAFETY_NONE, CPUREADOP_SAFETY_PARTIAL or CPUREADOP_SAFETY_FULL -#endif /* ----- dynamic memory installation ----- */ #define memory_install_read_handler(cpu, space, start, end, mask, mirror, handler) \ diff --git a/src/emu/ui.c b/src/emu/ui.c index e97f1e99609..8f54a529aa8 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -1246,11 +1246,8 @@ static UINT32 handler_ingame(running_machine *machine, UINT32 state) return ui_set_handler(ui_menu_ui_handler, 0); /* if the on-screen display isn't up and the user has toggled it, turn it on */ -#ifdef MAME_DEBUG - if (!Machine->debug_mode) -#endif - if (input_ui_pressed(IPT_UI_ON_SCREEN_DISPLAY)) - return ui_set_handler(handler_slider, 0); + if (!Machine->debug_mode && input_ui_pressed(IPT_UI_ON_SCREEN_DISPLAY)) + return ui_set_handler(handler_slider, 0); /* handle a reset request */ if (input_ui_pressed(IPT_UI_RESET_MACHINE)) diff --git a/src/mame/layout/ampoker.lay b/src/mame/layout/ampoker2.lay similarity index 100% rename from src/mame/layout/ampoker.lay rename to src/mame/layout/ampoker2.lay diff --git a/src/osd/windows/video.c b/src/osd/windows/video.c index 36d053dbf14..6928db82142 100644 --- a/src/osd/windows/video.c +++ b/src/osd/windows/video.c @@ -111,7 +111,7 @@ void winvideo_init(running_machine *machine) SetForegroundWindow(win_window_list->hwnd); // possibly create the debug window, but don't show it yet -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER if (options_get_bool(mame_options(), OPTION_DEBUG)) debugwin_init_windows(); #endif @@ -130,7 +130,7 @@ static void video_exit(running_machine *machine) effect_bitmap = NULL; // possibly kill the debug window -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER if (options_get_bool(mame_options(), OPTION_DEBUG)) debugwin_destroy_windows(); #endif @@ -384,7 +384,7 @@ static void extract_video_config(void) video_config.prescale = options_get_int(mame_options(), WINOPTION_PRESCALE); video_config.keepaspect = options_get_bool(mame_options(), WINOPTION_KEEPASPECT); video_config.numscreens = options_get_int(mame_options(), WINOPTION_NUMSCREENS); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER // if we are in debug mode, never go full screen if (options_get_bool(mame_options(), OPTION_DEBUG)) video_config.windowed = TRUE; diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index 673da9c5d33..1fbf842a241 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -353,7 +353,7 @@ void winwindow_process_events(int ingame) assert(GetCurrentThreadId() == main_threadid); // if we're running, disable some parts of the debugger -#if defined(MAME_DEBUG) +#ifdef ENABLE_DEBUGGER if (ingame) debugwin_update_during_game(); #endif @@ -495,7 +495,7 @@ void winwindow_toggle_full_screen(void) assert(GetCurrentThreadId() == main_threadid); -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER // if we are in debug mode, never go full screen if (options_get_bool(mame_options(), OPTION_DEBUG)) return; diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index b108c6479e1..837519c9d3f 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -249,7 +249,7 @@ $(WINOBJ)/drawdd.o : $(SRC)/emu/rendersw.c $(WINOBJ)/drawgdi.o : $(SRC)/emu/rendersw.c # add debug-specific files -ifdef DEBUG +ifdef DEBUGGER OSDOBJS += \ $(WINOBJ)/debugwin.o endif diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c index 74b593a0a99..ae95b62bfc0 100644 --- a/src/osd/windows/winmain.c +++ b/src/osd/windows/winmain.c @@ -408,7 +408,7 @@ static LONG CALLBACK exception_filter(struct _EXCEPTION_POINTERS *info) ExitProcess(100); already_hit = 1; -#ifdef MAME_DEBUG +#ifdef ENABLE_DEBUGGER { extern void debug_flush_traces(void); debug_flush_traces();