mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER
macro from the source code. All MAME builds now include the debugger, and it is enabled/disabled exclusively by the runtime command-line/ini settings. This is a minor speed hit for now, but will be further optimized going forward. Changed the 'd' suffix in the makefile to apply to DEBUG builds (versus DEBUGGER builds as it did before). Changed machine->debug_mode to machine->debug_flags. These flags now indicate several things, such as whether debugging is enabled, whether CPU cores should call the debugger on each instruction, and whether there are live watchpoints on each address space. Redesigned a significant portion of debugcpu.c around the concept of maintaining these flags globally and a similar, more complete set of flags internally for each CPU. All previous functionality should work as designed but should be more robust and faster to work with. Added new debugger hooks for starting/stopping CPU execution. This allows the debugger to decide whether or not a given CPU needs to call the debugger on each instruction during the coming timeslice. Added new debugger hook for reporting exceptions. Proper exception breakpoints are not yet implemented. Added new module debugger.c which is where global debugger functions live.
This commit is contained in:
parent
2f6f4aed58
commit
68f3a9ab9e
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -509,6 +509,7 @@ src/emu/debug/express.c svneol=native#text/plain
|
||||
src/emu/debug/express.h svneol=native#text/plain
|
||||
src/emu/debug/textbuf.c svneol=native#text/plain
|
||||
src/emu/debug/textbuf.h svneol=native#text/plain
|
||||
src/emu/debugger.c svneol=native#text/plain
|
||||
src/emu/debugger.h svneol=native#text/plain
|
||||
src/emu/deprecat.h svneol=native#text/plain
|
||||
src/emu/devconv.h svneol=native#text/plain
|
||||
|
12
makefile
12
makefile
@ -97,9 +97,6 @@ endif
|
||||
# for details
|
||||
#-------------------------------------------------
|
||||
|
||||
# uncomment next line to enable the debugger
|
||||
# DEBUGGER = 1
|
||||
|
||||
# uncomment next line to build a debug version
|
||||
# DEBUG = 1
|
||||
|
||||
@ -205,8 +202,8 @@ RM = @rm -f
|
||||
# form the name of the executable
|
||||
#-------------------------------------------------
|
||||
|
||||
# debugger builds just get the 'd' suffix and nothing more
|
||||
ifdef DEBUGGER
|
||||
# debug builds just get the 'd' suffix and nothing more
|
||||
ifdef DEBUG
|
||||
DEBUGSUFFIX = d
|
||||
endif
|
||||
|
||||
@ -265,11 +262,6 @@ 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
|
||||
|
@ -950,7 +950,7 @@ static int adsp2100_execute(int cycles)
|
||||
|
||||
/* debugging */
|
||||
adsp2100.ppc = adsp2100.pc; /* copy PC to previous PC */
|
||||
CALL_DEBUGGER(adsp2100.pc);
|
||||
debugger_instruction_hook(Machine, adsp2100.pc);
|
||||
|
||||
#if TRACK_HOTSPOTS
|
||||
pcbucket[adsp2100.pc & 0x3fff]++;
|
||||
@ -1690,9 +1690,7 @@ static int adsp2100_execute(int cycles)
|
||||
DEBUGGER DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern offs_t adsp2100_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
@ -1947,9 +1945,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = adsp2100_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &adsp2100_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -285,7 +285,7 @@ INLINE void M_UNDEFINED(void)
|
||||
mame_printf_debug("ALPHA8201: PC = %03x, Unimplemented opcode = %02x\n", PC-1, M_RDMEM(PC-1));
|
||||
#endif
|
||||
#if BREAK_ON_UNKNOWN_OPCODE
|
||||
DEBUGGER_BREAK;
|
||||
debugger_break(Machine);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ INLINE void M_UNDEFINED2(void)
|
||||
mame_printf_debug("ALPHA8201: PC = %03x, Unimplemented opcode = %02x,%02x\n", PC-2, op,imm);
|
||||
#endif
|
||||
#if BREAK_ON_UNKNOWN_OPCODE
|
||||
DEBUGGER_BREAK;
|
||||
debugger_break(Machine);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ static void need_verify(const char *s)
|
||||
mame_printf_debug("ALPHA8201: PC = %03x, unknown opcode = %02x is '%s' ??\n",PC-1, op,s);
|
||||
#endif
|
||||
#if BREAK_ON_UNCERTAIN_OPCODE
|
||||
DEBUGGER_BREAK;
|
||||
debugger_break(Machine);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ static void need_verify2(const char *s)
|
||||
mame_printf_debug("ALPHA8201: PC = %03x, unknown opcode = %02x %02x is '%s' ??\n",PC-2, op1, op2, s);
|
||||
#endif
|
||||
#if BREAK_ON_UNCERTAIN_OPCODE
|
||||
DEBUGGER_BREAK;
|
||||
debugger_break(Machine);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@ -790,7 +790,7 @@ mame_printf_debug("ALPHA8201 START ENTRY=%02X PC=%03X\n",pcptr,PC);
|
||||
|
||||
/* run */
|
||||
R.PREVPC = PC;
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
opcode =M_RDOP(PC);
|
||||
#if TRACE_PC
|
||||
mame_printf_debug("ALPHA8201: PC = %03x, opcode = %02x\n", PC, opcode);
|
||||
@ -954,9 +954,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ALPHA8201_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ALPHA8201_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -65,8 +65,6 @@ extern void alpha8301_get_info(UINT32 state, cpuinfo *info);
|
||||
*/
|
||||
#define ALPHA8201_RDOP_ARG(A) ((unsigned)cpu_readop_arg(A))
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t ALPHA8201_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _ALPHA8201_H */
|
||||
|
@ -802,7 +802,7 @@ static int apexc_execute(int cycles)
|
||||
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(effective_address(apexc.ml));
|
||||
debugger_instruction_hook(Machine, effective_address(apexc.ml));
|
||||
|
||||
if (apexc.running)
|
||||
execute();
|
||||
@ -898,10 +898,7 @@ void apexc_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_PTR_RESET: info->reset = apexc_reset; break;
|
||||
case CPUINFO_PTR_EXECUTE: info->execute = apexc_execute; break;
|
||||
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = apexc_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = apexc_dasm; break;
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &apexc_ICount; break;
|
||||
|
||||
case CPUINFO_STR_NAME: strcpy(info->s = cpuintrf_temp_str(), "APEXC"); break;
|
||||
|
@ -28,9 +28,7 @@ without danger */
|
||||
#define apexc_writemem_masked(address, data, mask) cpu_writemem13_32masked((address), (data), (mask))
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
unsigned apexc_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
#define apexc_readop(address) apexc_readmem(address)
|
||||
|
||||
|
@ -323,7 +323,7 @@ static int arm_execute( int cycles )
|
||||
arm_icount = cycles;
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(R15);
|
||||
debugger_instruction_hook(Machine, R15);
|
||||
|
||||
/* load instruction */
|
||||
pc = R15;
|
||||
@ -502,13 +502,11 @@ static void set_irq_line(int irqline, int state)
|
||||
arm_check_irq_state();
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
static void arm_init(int index, int clock, const void *config, int (*irqcallback)(int))
|
||||
{
|
||||
@ -1531,9 +1529,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = arm_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &arm_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -16,9 +16,7 @@
|
||||
|
||||
extern void arm_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern UINT32 arm_disasm( char *pBuf, UINT32 pc, UINT32 opcode );
|
||||
#endif
|
||||
extern UINT32 arm_disasm(char *pBuf, UINT32 pc, UINT32 opcode);
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -48,12 +48,10 @@ 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)(UINT32 addr));
|
||||
static void test_dt_w_callback(UINT32 insn, UINT32 *prn, void (*write32)(UINT32 addr, UINT32 data));
|
||||
#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);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Macros that can be re-defined for custom cpu implementations - The core expects these to be defined */
|
||||
/* In this case, we are using the default arm7 handlers (supplied by the core)
|
||||
@ -101,13 +99,11 @@ 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 ENABLE_DEBUGGER
|
||||
// setup dasm callbacks - direct method example
|
||||
arm7_dasm_cop_dt_callback = Spec_DT;
|
||||
arm7_dasm_cop_rt_callback = Spec_RT;
|
||||
arm7_dasm_cop_do_callback = Spec_DO;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static void arm7_reset(void)
|
||||
@ -150,7 +146,6 @@ static void arm7_set_context(void *src)
|
||||
}
|
||||
}
|
||||
|
||||
#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))
|
||||
@ -162,7 +157,6 @@ 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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
@ -340,9 +334,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = arm7_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ARM7_ICOUNT; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -442,7 +434,6 @@ static void test_dt_w_callback(UINT32 insn, UINT32 *prn, void (*write32)(UINT32
|
||||
}
|
||||
|
||||
/* Custom Co-proc DASM handlers */
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
static char *Spec_RT(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0)
|
||||
{
|
||||
pBuf += sprintf(pBuf, "SPECRT");
|
||||
@ -459,4 +450,3 @@ static char *Spec_DO(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf
|
||||
return pBuf;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -125,12 +125,11 @@ WRITE32_HANDLER((*arm7_coproc_rt_w_callback)); // holder for the co processor R
|
||||
void (*arm7_coproc_dt_r_callback)(UINT32 insn, UINT32 *prn, UINT32 (*read32)(UINT32 addr));
|
||||
void (*arm7_coproc_dt_w_callback)(UINT32 insn, UINT32 *prn, void (*write32)(UINT32 addr, UINT32 data));
|
||||
|
||||
#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);
|
||||
char *(*arm7_dasm_cop_do_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* Default Memory Handlers
|
||||
|
@ -398,13 +398,11 @@ extern WRITE32_HANDLER((*arm7_coproc_rt_w_callback));
|
||||
extern void (*arm7_coproc_dt_r_callback)(UINT32 insn, UINT32* prn, UINT32 (*read32)(UINT32 addr));
|
||||
extern void (*arm7_coproc_dt_w_callback)(UINT32 insn, UINT32* prn, void (*write32)(UINT32 addr, UINT32 data));
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern UINT32 arm7_disasm(char *pBuf, UINT32 pc, UINT32 opcode);
|
||||
extern UINT32 thumb_disasm(char *pBuf, UINT32 pc, UINT16 opcode);
|
||||
|
||||
extern char *(*arm7_dasm_cop_dt_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
|
||||
extern char *(*arm7_dasm_cop_rt_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
|
||||
extern char *(*arm7_dasm_cop_do_callback)(char *pBuf, UINT32 opcode, char *pConditionCode, char *pBuf0);
|
||||
#endif
|
||||
|
||||
#endif /* ARM7CORE_H */
|
||||
|
@ -47,7 +47,7 @@
|
||||
ARM7_ICOUNT = cycles;
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(R15);
|
||||
debugger_instruction_hook(Machine, R15);
|
||||
|
||||
/* handle Thumb instructions if active */
|
||||
if (T_IS_SET(GET_CPSR))
|
||||
|
@ -508,7 +508,17 @@ INLINE void fetch_instruction(void)
|
||||
{
|
||||
/* debugging */
|
||||
asap.ppc = asap.pc;
|
||||
CALL_DEBUGGER(asap.pc);
|
||||
|
||||
/* instruction fetch */
|
||||
asap.op.d = ROPCODE(asap.pc);
|
||||
asap.pc += 4;
|
||||
}
|
||||
|
||||
INLINE void fetch_instruction_debug(void)
|
||||
{
|
||||
/* debugging */
|
||||
asap.ppc = asap.pc;
|
||||
debugger_instruction_hook(Machine, asap.pc);
|
||||
|
||||
/* instruction fetch */
|
||||
asap.op.d = ROPCODE(asap.pc);
|
||||
@ -530,27 +540,54 @@ static int asap_execute(int cycles)
|
||||
UPDATEPC();
|
||||
|
||||
/* core execution loop */
|
||||
do
|
||||
if ((Machine->debug_flags & DEBUG_FLAG_ENABLED) == 0)
|
||||
{
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
do
|
||||
{
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction();
|
||||
execute_instruction();
|
||||
|
||||
asap_icount -= 4;
|
||||
asap_icount -= 4;
|
||||
|
||||
} while (asap_icount > 0);
|
||||
} while (asap_icount > 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction_debug();
|
||||
execute_instruction();
|
||||
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction_debug();
|
||||
execute_instruction();
|
||||
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction_debug();
|
||||
execute_instruction();
|
||||
|
||||
/* fetch and execute the next instruction */
|
||||
fetch_instruction_debug();
|
||||
execute_instruction();
|
||||
|
||||
asap_icount -= 4;
|
||||
|
||||
} while (asap_icount > 0);
|
||||
}
|
||||
|
||||
/* eat any new interrupt cycles */
|
||||
asap_icount -= asap.interrupt_cycles;
|
||||
@ -564,9 +601,7 @@ static int asap_execute(int cycles)
|
||||
DISASSEMBLY HOOK
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern offs_t asap_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
@ -1806,9 +1841,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = asap_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &asap_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -212,7 +212,7 @@ static int ccpu_execute(int cycles)
|
||||
ccpu.nextmiflag = ccpu.nextnextmiflag;
|
||||
|
||||
/* fetch the opcode */
|
||||
CALL_DEBUGGER(ccpu.PC);
|
||||
debugger_instruction_hook(Machine, ccpu.PC);
|
||||
opcode = READOP(ccpu.PC++);
|
||||
|
||||
switch (opcode)
|
||||
@ -786,9 +786,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ccpu_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ccpu_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -53,8 +53,6 @@ struct CCPUConfig
|
||||
void ccpu_get_info(UINT32 state, cpuinfo *info);
|
||||
void ccpu_wdt_timer_trigger(void);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t ccpu_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -232,7 +232,7 @@ static void cdp1802_run(running_machine *machine)
|
||||
|
||||
cdp1802_ICount -= CDP1802_CYCLES_RESET;
|
||||
|
||||
CALL_DEBUGGER(cdp1802.r[cdp1802.p]);
|
||||
debugger_instruction_hook(Machine, cdp1802.r[cdp1802.p]);
|
||||
|
||||
break;
|
||||
|
||||
@ -257,7 +257,7 @@ static void cdp1802_run(running_machine *machine)
|
||||
cdp1802.state = CDP1802_STATE_0_FETCH;
|
||||
}
|
||||
|
||||
CALL_DEBUGGER(cdp1802.r[cdp1802.p]);
|
||||
debugger_instruction_hook(Machine, cdp1802.r[cdp1802.p]);
|
||||
|
||||
break;
|
||||
|
||||
@ -734,7 +734,7 @@ static void cdp1802_run(running_machine *machine)
|
||||
cdp1802.state = CDP1802_STATE_0_FETCH;
|
||||
}
|
||||
|
||||
CALL_DEBUGGER(cdp1802.r[cdp1802.p]);
|
||||
debugger_instruction_hook(Machine, cdp1802.r[cdp1802.p]);
|
||||
|
||||
break;
|
||||
|
||||
@ -822,7 +822,7 @@ static void cdp1802_run(running_machine *machine)
|
||||
cdp1802.state = CDP1802_STATE_0_FETCH;
|
||||
}
|
||||
|
||||
CALL_DEBUGGER(cdp1802.r[cdp1802.p]);
|
||||
debugger_instruction_hook(Machine, cdp1802.r[cdp1802.p]);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -1025,9 +1025,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cdp1802_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cdp1802_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -110,8 +110,6 @@ struct _cdp1802_interface
|
||||
};
|
||||
#define CDP1802_INTERFACE(name) const cdp1802_interface (name) =
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t cdp1802_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -97,9 +97,7 @@ extern void cop426_get_info(UINT32 state, cpuinfo *info);
|
||||
extern void cop444_get_info(UINT32 state, cpuinfo *info);
|
||||
extern void cop445_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif /* __COP400__ */
|
||||
|
@ -313,7 +313,7 @@ static int cop410_execute(int cycles)
|
||||
{
|
||||
prevPC = PC;
|
||||
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
if (R.intf->cko == COP400_CKO_HALT_IO_PORT)
|
||||
{
|
||||
@ -469,9 +469,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cop410_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cop410_ICount; break;
|
||||
|
||||
/* case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM:
|
||||
|
@ -452,7 +452,7 @@ static int cop420_execute(int cycles)
|
||||
{
|
||||
prevPC = PC;
|
||||
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
opcode = ROM(PC);
|
||||
|
||||
@ -642,9 +642,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cop420_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cop420_ICount; break;
|
||||
|
||||
/* case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM:
|
||||
|
@ -2166,7 +2166,7 @@ static int cp1610_execute(int cycles)
|
||||
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(cp1610.r[7]);
|
||||
debugger_instruction_hook(Machine, cp1610.r[7]);
|
||||
|
||||
cp1610.mask_interrupts = 0;
|
||||
|
||||
@ -3491,9 +3491,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = cp1610_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &cp1610_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -35,9 +35,7 @@ enum {
|
||||
|
||||
void cp1610_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
unsigned cp1610_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
// Temporary
|
||||
#define cp1610_readop(A) program_read_word_16be((A)<<1)
|
||||
|
@ -596,7 +596,7 @@ static int drcbec_execute(drcbe_state *drcbe, drcuml_codehandle *entry)
|
||||
break;
|
||||
|
||||
case MAKE_OPCODE_SHORT(DRCUML_OP_DEBUG, 4, 0): /* DEBUG pc */
|
||||
CALL_DEBUGGER(PARAM0);
|
||||
debugger_instruction_hook(Machine, PARAM0);
|
||||
break;
|
||||
|
||||
case MAKE_OPCODE_SHORT(DRCUML_OP_HASHJMP, 4, 0): /* HASHJMP mode,pc,handle */
|
||||
|
@ -273,7 +273,7 @@ struct _drcbe_state
|
||||
x86code * exit; /* exit point */
|
||||
x86code * nocode; /* nocode handler */
|
||||
|
||||
x86code * mame_debug_hook; /* debugger callback */
|
||||
x86code * debug_cpu_instruction_hook;/* debugger callback */
|
||||
x86code * debug_log_hashjmp; /* hashjmp debugging */
|
||||
x86code * drcmap_get_value; /* map lookup helper */
|
||||
data_accessors accessors[ADDRESS_SPACES];/* memory accessors */
|
||||
@ -713,9 +713,7 @@ static drcbe_state *drcbex64_alloc(drcuml_state *drcuml, drccache *cache, UINT32
|
||||
drcbe->absmask64[0] = drcbe->absmask64[1] = U64(0x7fffffffffffffff);
|
||||
|
||||
/* get pointers to C functions we need to call */
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
drcbe->mame_debug_hook = (x86code *)mame_debug_hook;
|
||||
#endif
|
||||
drcbe->debug_cpu_instruction_hook = (x86code *)debug_cpu_instruction_hook;
|
||||
#if LOG_HASHJMPS
|
||||
drcbe->debug_log_hashjmp = (x86code *)debug_log_hashjmp;
|
||||
#endif
|
||||
@ -3083,24 +3081,32 @@ static x86code *op_nop(drcbe_state *drcbe, x86code *dst, const drcuml_instructio
|
||||
|
||||
static x86code *op_debug(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst)
|
||||
{
|
||||
emit_link skip = { 0 };
|
||||
|
||||
/* validate instruction */
|
||||
assert(inst->size == 4);
|
||||
assert_no_condition(inst);
|
||||
assert_no_flags(inst);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
if (Machine->debug_mode)
|
||||
if ((Machine->debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
{
|
||||
drcuml_parameter pcp;
|
||||
|
||||
/* normalize parameters */
|
||||
param_normalize_1(drcbe, inst, &pcp, PTYPE_MRI);
|
||||
|
||||
/* test and branch */
|
||||
emit_mov_r64_imm(&dst, REG_PARAM1, (FPTR)Machine); // mov param1,pcp
|
||||
emit_test_m32_imm(&dst, MBD(REG_PARAM1, offsetof(running_machine, debug_flags)), DEBUG_FLAG_CALL_HOOK);
|
||||
// test [Machine->debug_flags],DEBUG_FLAG_CALL_HOOK
|
||||
emit_jcc_short_link(&dst, COND_Z, &skip); // jz skip
|
||||
|
||||
/* push the parameter */
|
||||
emit_mov_r32_p32(drcbe, &dst, REG_PARAM1, &pcp); // mov param1,pcp
|
||||
emit_smart_call_m64(drcbe, &dst, &drcbe->mame_debug_hook); // call mame_debug_hook
|
||||
emit_mov_r32_p32(drcbe, &dst, REG_PARAM2, &pcp); // mov param1,pcp
|
||||
emit_smart_call_m64(drcbe, &dst, &drcbe->debug_cpu_instruction_hook); // call debug_cpu_instruction_hook
|
||||
|
||||
resolve_link(&dst, &skip); // skip:
|
||||
}
|
||||
#endif
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
@ -3207,24 +3207,31 @@ static x86code *op_nop(drcbe_state *drcbe, x86code *dst, const drcuml_instructio
|
||||
|
||||
static x86code *op_debug(drcbe_state *drcbe, x86code *dst, const drcuml_instruction *inst)
|
||||
{
|
||||
emit_link skip = { 0 };
|
||||
|
||||
/* validate instruction */
|
||||
assert(inst->size == 4);
|
||||
assert_no_condition(inst);
|
||||
assert_no_flags(inst);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
if (Machine->debug_mode)
|
||||
if ((Machine->debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
{
|
||||
drcuml_parameter pcp;
|
||||
|
||||
|
||||
/* normalize parameters */
|
||||
param_normalize_1(drcbe, inst, &pcp, PTYPE_MRI);
|
||||
|
||||
/* test and branch */
|
||||
emit_test_m32_imm(&dst, MABS(&Machine->debug_flags), DEBUG_FLAG_CALL_HOOK); // test [Machine->debug_flags],DEBUG_FLAG_CALL_HOOK
|
||||
emit_jcc_short_link(&dst, COND_Z, &skip); // jz skip
|
||||
|
||||
/* push the parameter */
|
||||
emit_mov_m32_p32(drcbe, &dst, MBD(REG_ESP, 0), &pcp); // mov [esp],pcp
|
||||
emit_call(&dst, (x86code *)mame_debug_hook); // call mame_debug_hook
|
||||
emit_mov_m32_p32(drcbe, &dst, MBD(REG_ESP, 4), &pcp); // mov [esp+4],pcp
|
||||
emit_mov_m32_imm(&dst, MBD(REG_ESP, 0), (FPTR)Machine); // mov [esp],Machine
|
||||
emit_call(&dst, (x86code *)debug_cpu_instruction_hook); // call debug_cpu_instruction_hook
|
||||
|
||||
resolve_link(&dst, &skip); // skip:
|
||||
}
|
||||
#endif
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ int ds5002fp_execute(int cycles)
|
||||
PPC = PC;
|
||||
|
||||
//Call Debugger
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
//remove after testing
|
||||
if(PC != PPC) op = cpu_readop(PC);
|
||||
@ -2184,9 +2184,7 @@ INLINE void do_add_flags(UINT8 a, UINT8 data, UINT8 c)
|
||||
SET_AC(ac);
|
||||
SET_OV(ov);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
// mame_printf_debug("add: result=%x, c=%x, ac=%x, ov=%x\n",a+data+c,cy,ac,ov);
|
||||
#endif
|
||||
}
|
||||
|
||||
INLINE void do_sub_flags(UINT8 a, UINT8 data, UINT8 c)
|
||||
@ -2202,9 +2200,7 @@ INLINE void do_sub_flags(UINT8 a, UINT8 data, UINT8 c)
|
||||
SET_AC(ac);
|
||||
SET_OV(ov);
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
INLINE void update_timer(int cyc)
|
||||
@ -2539,14 +2535,12 @@ void ds5002fp_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_PTR_SET_INFO: info->setinfo = ds5002fp_set_info; break;
|
||||
case CPUINFO_PTR_GET_CONTEXT: info->getcontext = ds5002fp_get_context; break;
|
||||
case CPUINFO_PTR_SET_CONTEXT: info->setcontext = ds5002fp_set_context; break;
|
||||
case CPUINFO_PTR_INIT: info->init = ds5002fp_init; break;
|
||||
case CPUINFO_PTR_INIT: info->init = ds5002fp_init; break;
|
||||
case CPUINFO_PTR_RESET: info->reset = ds5002fp_reset; break;
|
||||
case CPUINFO_PTR_EXIT: info->exit = ds5002fp_exit; break;
|
||||
case CPUINFO_PTR_EXIT: info->exit = ds5002fp_exit; break;
|
||||
case CPUINFO_PTR_EXECUTE: info->execute = ds5002fp_execute; break;
|
||||
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ds5002fp_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ds5002fp_icount; break;
|
||||
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map8 = NULL; break;
|
||||
|
@ -132,9 +132,7 @@ extern void ds5002fp_set_serial_tx_callback(void (*callback)(int data));
|
||||
extern void ds5002fp_set_serial_rx_callback(int (*callback)(void));
|
||||
extern void ds5002fp_set_ebram_iaddr_callback(READ32_HANDLER((*callback)));
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern offs_t ds5002fp_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
void ds5002fp_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
|
@ -436,13 +436,11 @@ static int dsp32c_execute(int cycles)
|
||||
DISASSEMBLY HOOK
|
||||
***************************************************************************/
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
@ -876,9 +874,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = dsp32c_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &dsp32_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -130,7 +130,7 @@ static void unimplemented(void)
|
||||
INLINE void execute_one(void)
|
||||
{
|
||||
PROCESS_DEFERRED_MEMORY();
|
||||
CALL_DEBUGGER(dsp32.PC);
|
||||
debugger_instruction_hook(Machine, dsp32.PC);
|
||||
OP = ROPCODE(dsp32.PC);
|
||||
dsp32_icount -= 4; /* 4 clocks per cycle */
|
||||
dsp32.PC += 4;
|
||||
@ -363,7 +363,7 @@ INLINE void dau_set_val_flags(int aidx, double res)
|
||||
else if (absres > 3.40282e38)
|
||||
{
|
||||
dsp32.VUflags = VFLAGBIT;
|
||||
// DEBUGGER_BREAK;
|
||||
// debugger_break(Machine);
|
||||
// fprintf(stderr, "Result = %g\n", absres);
|
||||
res = (res < 0) ? -3.40282e38 : 3.40282e38;
|
||||
}
|
||||
@ -408,7 +408,7 @@ INLINE UINT32 double_to_dsp(double val)
|
||||
return 0x00000000;
|
||||
else if (exponent > 255)
|
||||
{
|
||||
// DEBUGGER_BREAK;
|
||||
// debugger_break(Machine);
|
||||
// fprintf(stderr, "Exponent = %d\n", exponent);
|
||||
return ((INT32)id.i[BYTE_XOR_BE(0)] >= 0) ? 0x7fffffff : 0x800000ff;
|
||||
}
|
||||
|
@ -1236,9 +1236,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = dsp56k_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &dsp56k_icount; break;
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA:
|
||||
info->internal_map16 = address_map_dsp56156_x_data_memory; break;
|
||||
|
@ -117,7 +117,7 @@ static void execute_one(void)
|
||||
{
|
||||
unsigned size = 666 ;
|
||||
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
OP = ROPCODE(PC<<1);
|
||||
|
||||
if (BITS(OP,0x8000)) // First, the parallel data move instructions
|
||||
|
@ -1774,12 +1774,10 @@ static void hyperstone_set_context(void *regs)
|
||||
hyperstone = *(hyperstone_regs *)regs;
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
/* Opcodes */
|
||||
|
||||
@ -4762,7 +4760,7 @@ static int hyperstone_execute(int cycles)
|
||||
UINT16 opcode;
|
||||
|
||||
PPC = PC; /* copy PC to previous PC */
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
opcode = READ_OP(PC);
|
||||
PC += 2;
|
||||
@ -5084,9 +5082,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hyperstone_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &hyperstone_ICount; break;
|
||||
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_DATA: info->internal_map16 = NULL; break;
|
||||
|
@ -77,9 +77,7 @@ void gms30c2216_get_info(UINT32 state, cpuinfo *info);
|
||||
void gms30c2232_get_info(UINT32 state, cpuinfo *info);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned dasm_hyperstone(char *buffer, unsigned pc, const UINT8 *oprom, unsigned h_flag, int private_fp);
|
||||
#endif
|
||||
|
||||
extern int hyp_type_16bit;
|
||||
|
||||
|
@ -1575,7 +1575,7 @@ static int f8_execute(int cycles)
|
||||
do
|
||||
{
|
||||
UINT8 op=f8.dbus;
|
||||
CALL_DEBUGGER((f8.pc0 - 1) & 0xffff);
|
||||
debugger_instruction_hook(Machine, (f8.pc0 - 1) & 0xffff);
|
||||
|
||||
switch( op )
|
||||
{
|
||||
@ -1890,9 +1890,7 @@ static void f8_set_context (void *src)
|
||||
f8 = *(f8_Regs *) src;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
unsigned f8_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
static void f8_init (int index, int clock, const void *config, int (*irqcallback)(int))
|
||||
{
|
||||
@ -2115,9 +2113,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = f8_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = f8_dasm; break;
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &f8_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -310,14 +310,12 @@ static void g65816_set_irq_callback(int (*callback)(int))
|
||||
|
||||
|
||||
/* Disassemble an instruction */
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
@ -430,9 +428,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = g65816_dasm; break;
|
||||
#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;
|
||||
|
||||
|
@ -89,7 +89,7 @@ enum
|
||||
void g65816_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#undef G65816_CALL_DEBUGGER
|
||||
#define G65816_CALL_DEBUGGER CALL_DEBUGGER
|
||||
#define G65816_CALL_DEBUGGER(x) debugger_instruction_hook(Machine, x)
|
||||
|
||||
#define g65816_read_8(addr) program_read_byte_8be(addr)
|
||||
#define g65816_write_8(addr,data) program_write_byte_8be(addr,data)
|
||||
|
@ -244,7 +244,7 @@ static int h6280_execute(int cycles)
|
||||
CHANGE_PC;
|
||||
h6280.ppc = h6280.pc;
|
||||
|
||||
CALL_DEBUGGER(PCW);
|
||||
debugger_instruction_hook(Machine, PCW);
|
||||
|
||||
/* Execute 1 instruction */
|
||||
in=RDOP();
|
||||
@ -426,7 +426,6 @@ 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 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;
|
||||
@ -435,7 +434,6 @@ static void h6280_set_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_INT_REGISTER + H6280_M6: h6280.mmr[5] = info->i; break;
|
||||
case CPUINFO_INT_REGISTER + H6280_M7: h6280.mmr[6] = info->i; break;
|
||||
case CPUINFO_INT_REGISTER + H6280_M8: h6280.mmr[7] = info->i; break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -493,7 +491,6 @@ 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 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;
|
||||
@ -502,7 +499,6 @@ void h6280_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_INT_REGISTER + H6280_M6: info->i = h6280.mmr[5]; break;
|
||||
case CPUINFO_INT_REGISTER + H6280_M7: info->i = h6280.mmr[6]; break;
|
||||
case CPUINFO_INT_REGISTER + H6280_M8: info->i = h6280.mmr[7]; break;
|
||||
#endif
|
||||
|
||||
/* --- the following bits of info are returned as pointers to data or functions --- */
|
||||
case CPUINFO_PTR_SET_INFO: info->setinfo = h6280_set_info; break;
|
||||
@ -513,9 +509,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = h6280_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &h6280_ICount; break;
|
||||
case CPUINFO_PTR_TRANSLATE: info->translate = h6280_translate; break;
|
||||
|
||||
@ -550,7 +544,6 @@ 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 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;
|
||||
@ -559,6 +552,5 @@ void h6280_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_STR_REGISTER + H6280_M6: sprintf(info->s, "M6:%02X", h6280.mmr[5]); break;
|
||||
case CPUINFO_STR_REGISTER + H6280_M7: sprintf(info->s, "M7:%02X", h6280.mmr[6]); break;
|
||||
case CPUINFO_STR_REGISTER + H6280_M8: sprintf(info->s, "M8:%02X", h6280.mmr[7]); break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -18,12 +18,9 @@
|
||||
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 ENABLE_DEBUGGER
|
||||
,
|
||||
H6280_NMI_STATE, H6280_IRQ1_STATE, H6280_IRQ2_STATE, H6280_IRQT_STATE,
|
||||
H6280_M1, H6280_M2, H6280_M3, H6280_M4,
|
||||
H6280_M5, H6280_M6, H6280_M7, H6280_M8
|
||||
#endif
|
||||
};
|
||||
|
||||
#define LAZY_FLAGS 0
|
||||
@ -47,8 +44,6 @@ WRITE8_HANDLER( H6280_timer_w );
|
||||
UINT8 h6280io_get_buffer(void);
|
||||
void h6280io_set_buffer(UINT8);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t h6280_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _H6280_H */
|
||||
|
@ -181,9 +181,7 @@ static UINT32 h8_divxs16(INT16 src, INT32 dst);
|
||||
|
||||
/* implementation */
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern offs_t h8_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
void h8_3002_InterruptRequest(UINT8 source)
|
||||
{
|
||||
@ -479,7 +477,7 @@ static int h8_execute(int cycles)
|
||||
{
|
||||
h8.ppc = h8.pc;
|
||||
|
||||
CALL_DEBUGGER(h8.pc);
|
||||
debugger_instruction_hook(Machine, h8.pc);
|
||||
|
||||
opcode = cpu_readop16(h8.pc);
|
||||
// mame_printf_debug("[%06x]: %04x => %x\n", h8.pc, opcode, (opcode>>12)&0xf);
|
||||
@ -4081,9 +4079,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = h8_disasm; break;
|
||||
#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;
|
||||
|
@ -118,9 +118,7 @@
|
||||
#define false 0
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern offs_t hd6309_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
/*#define BIG_SWITCH*/
|
||||
|
||||
@ -629,7 +627,7 @@ static int hd6309_execute(int cycles) /* NS 970908 */
|
||||
|
||||
if (hd6309.int_state & (HD6309_CWAI | HD6309_SYNC))
|
||||
{
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
hd6309_ICount = 0;
|
||||
}
|
||||
else
|
||||
@ -638,7 +636,7 @@ static int hd6309_execute(int cycles) /* NS 970908 */
|
||||
{
|
||||
pPPC = pPC;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
hd6309.ireg = ROP(PCD);
|
||||
PC++;
|
||||
@ -1296,9 +1294,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hd6309_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &hd6309_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -15,9 +15,7 @@
|
||||
#include "i386.h"
|
||||
#include "i386intf.h"
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
#include "debug/debugcpu.h"
|
||||
#endif
|
||||
|
||||
int i386_parity_table[256];
|
||||
MODRM_TABLE i386_MODRM_table[256];
|
||||
@ -443,8 +441,6 @@ static void I386OP(decode_two_byte)(void)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
|
||||
static UINT64 i386_debug_segbase(UINT32 ref, UINT32 params, UINT64 *param)
|
||||
{
|
||||
UINT32 result;
|
||||
@ -485,8 +481,6 @@ static void i386_debug_setup(void)
|
||||
symtable_add_function(global_symtable, "seglimit", 0, 1, 1, i386_debug_seglimit);
|
||||
}
|
||||
|
||||
#endif /* defined(ENABLE_DEBUGGER) */
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
static STATE_POSTLOAD( i386_postload )
|
||||
@ -717,7 +711,7 @@ static int i386_execute(int num_cycles)
|
||||
I.segment_prefix = 0;
|
||||
I.prev_eip = I.eip;
|
||||
|
||||
CALL_DEBUGGER(I.pc);
|
||||
debugger_instruction_hook(Machine, I.pc);
|
||||
|
||||
i386_check_irq_line();
|
||||
I386OP(decode_opcode)();
|
||||
@ -741,12 +735,10 @@ static int translate_address_cb(int space, int intention, offs_t *addr)
|
||||
return result;
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
static void i386_set_info(UINT32 state, cpuinfo *info)
|
||||
{
|
||||
@ -969,10 +961,8 @@ 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 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
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "I386"); break;
|
||||
|
@ -10,9 +10,7 @@
|
||||
|
||||
#define INPUT_LINE_A20 1
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern int i386_dasm_one(char *buffer, UINT32 pc, const UINT8 *oprom, int mode);
|
||||
#endif
|
||||
|
||||
typedef enum { ES, CS, SS, DS, FS, GS } SREGS;
|
||||
|
||||
|
@ -761,7 +761,7 @@ static int i8039_execute(int cycles)
|
||||
{
|
||||
R.PREVPC = R.PC;
|
||||
|
||||
CALL_DEBUGGER(R.PC.w.l);
|
||||
debugger_instruction_hook(Machine, R.PC.w.l);
|
||||
|
||||
opcode=M_RDOP(R.PC.w.l);
|
||||
|
||||
@ -956,9 +956,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8039_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8039_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -241,8 +241,6 @@ extern void m58715_get_info(UINT32 state, cpuinfo *info);
|
||||
*/
|
||||
#define I8039_RDOP_ARG(A) ((unsigned)cpu_readop_arg(A))
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t i8039_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _I8039_H */
|
||||
|
@ -600,7 +600,7 @@ int i8051_execute(int cycles)
|
||||
PPC = PC;
|
||||
|
||||
//Call Debugger
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
//remove after testing
|
||||
if(PC != PPC) op = cpu_readop(PC);
|
||||
@ -1948,9 +1948,7 @@ INLINE void do_add_flags(UINT8 a, UINT8 data, UINT8 c)
|
||||
SET_AC(ac);
|
||||
SET_OV(ov);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
// mame_printf_debug("add: result=%x, c=%x, ac=%x, ov=%x\n",a+data+c,cy,ac,ov);
|
||||
#endif
|
||||
}
|
||||
|
||||
INLINE void do_sub_flags(UINT8 a, UINT8 data, UINT8 c)
|
||||
@ -1966,9 +1964,7 @@ INLINE void do_sub_flags(UINT8 a, UINT8 data, UINT8 c)
|
||||
SET_AC(ac);
|
||||
SET_OV(ov);
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
INLINE void update_timer(int cyc)
|
||||
@ -2477,9 +2473,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8051_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8051_icount; break;
|
||||
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map8 = NULL; break;
|
||||
|
@ -114,9 +114,7 @@ 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 ENABLE_DEBUGGER
|
||||
extern offs_t i8051_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/****************************************************************************
|
||||
* 8752 Section
|
||||
|
@ -1298,7 +1298,7 @@ static int i8085_execute(int cycles)
|
||||
i8085_ICount = cycles;
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(I.PC.d);
|
||||
debugger_instruction_hook(Machine, I.PC.d);
|
||||
/* interrupts enabled or TRAP pending ? */
|
||||
if ( (I.IM & IM_IEN) || (I.IREQ & IM_TRAP) )
|
||||
{
|
||||
@ -1728,9 +1728,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8085_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8085_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -51,8 +51,6 @@ void i8085_get_info(UINT32 state, cpuinfo *info);
|
||||
void i8080_get_info(UINT32 state, cpuinfo *info);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t i8085_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -225,7 +225,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_DEBUGGER(I.pc);
|
||||
debugger_instruction_hook(Machine, I.pc);
|
||||
|
||||
seg_prefix=FALSE;
|
||||
I.prevpc = I.pc;
|
||||
@ -242,12 +242,10 @@ static int i80286_execute(int num_cycles)
|
||||
|
||||
extern int i386_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, int mode);
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
static void i80286_init(int index, int clock, const void *config, int (*irqcallback)(int))
|
||||
{
|
||||
@ -445,9 +443,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i80286_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i80286_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -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_DEBUGGER(I.pc);
|
||||
debugger_instruction_hook(Machine, I.pc);
|
||||
|
||||
seg_prefix = FALSE;
|
||||
I.prevpc = I.pc;
|
||||
@ -259,12 +259,10 @@ static int i8086_execute(int num_cycles)
|
||||
}
|
||||
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
#if (HAS_I80186 || HAS_I80188)
|
||||
@ -299,7 +297,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_DEBUGGER(I.pc);
|
||||
debugger_instruction_hook(Machine, I.pc);
|
||||
|
||||
seg_prefix = FALSE;
|
||||
I.prevpc = I.pc;
|
||||
@ -436,9 +434,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8086_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8086_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -3128,7 +3128,7 @@ static void PREFIX86(_invalid)(void)
|
||||
i80286_trap2(ILLEGAL_INSTRUCTION);
|
||||
#else
|
||||
/* makes the cpu loops forever until user resets it */
|
||||
/*{ DEBUGGER_BREAK; } */
|
||||
/*{ debugger_break(Machine); } */
|
||||
logerror("illegal instruction %.2x at %.5x\n",PEEKBYTE(I.pc), I.pc);
|
||||
I.pc--;
|
||||
ICOUNT -= 10;
|
||||
|
@ -1402,7 +1402,7 @@ static int i8x41_execute(int cycles)
|
||||
|
||||
PPC = PC;
|
||||
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
PC += 1;
|
||||
i8x41_ICount -= i8x41_cycles[op];
|
||||
@ -2283,9 +2283,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i8x41_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &i8x41_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -91,8 +91,6 @@ enum {
|
||||
|
||||
extern void i8x41_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern offs_t i8x41_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _I8X41_H */
|
||||
|
@ -618,7 +618,7 @@ static int i960_execute(int cycles)
|
||||
check_irqs();
|
||||
while(i960_icount >= 0) {
|
||||
i960.PIP = i960.IP;
|
||||
CALL_DEBUGGER(i960.IP);
|
||||
debugger_instruction_hook(Machine, i960.IP);
|
||||
|
||||
i960.bursting = 0;
|
||||
|
||||
@ -2067,7 +2067,6 @@ 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 ENABLE_DEBUGGER
|
||||
static offs_t i960_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
|
||||
{
|
||||
disassemble_t dis;
|
||||
@ -2080,7 +2079,6 @@ static offs_t i960_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UIN
|
||||
|
||||
return dis.IPinc | dis.disflags | DASMFLAG_SUPPORTED;
|
||||
}
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
static void i960_reset(void)
|
||||
{
|
||||
@ -2118,9 +2116,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = i960_disasm; break;
|
||||
#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;
|
||||
|
@ -522,7 +522,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_DEBUGGER(jaguar.PC);
|
||||
debugger_instruction_hook(Machine, jaguar.PC);
|
||||
|
||||
/* instruction fetch */
|
||||
jaguar.op = ROPCODE(jaguar.PC);
|
||||
@ -568,7 +568,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_DEBUGGER(jaguar.PC);
|
||||
debugger_instruction_hook(Machine, jaguar.PC);
|
||||
|
||||
/* instruction fetch */
|
||||
jaguar.op = ROPCODE(jaguar.PC);
|
||||
@ -595,7 +595,6 @@ static int jaguardsp_execute(int cycles)
|
||||
DISASSEMBLY HOOK
|
||||
***************************************************************************/
|
||||
|
||||
#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 *);
|
||||
@ -607,7 +606,6 @@ 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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
@ -806,7 +804,7 @@ void jr_cc_n(void)
|
||||
{
|
||||
INT32 r1 = (INT8)((jaguar.op >> 2) & 0xf8) >> 2;
|
||||
UINT32 newpc = jaguar.PC + r1;
|
||||
CALL_DEBUGGER(jaguar.PC);
|
||||
debugger_instruction_hook(Machine, jaguar.PC);
|
||||
jaguar.op = ROPCODE(jaguar.PC);
|
||||
jaguar.PC = newpc;
|
||||
(*jaguar.table[jaguar.op >> 10])();
|
||||
@ -823,7 +821,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_DEBUGGER(jaguar.PC);
|
||||
debugger_instruction_hook(Machine, jaguar.PC);
|
||||
jaguar.op = ROPCODE(jaguar.PC);
|
||||
jaguar.PC = newpc;
|
||||
(*jaguar.table[jaguar.op >> 10])();
|
||||
@ -1659,9 +1657,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguargpu_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &jaguar_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -1754,9 +1750,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguardsp_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "Jaguar DSP"); break;
|
||||
|
@ -501,7 +501,7 @@ static int konami_execute(int cycles)
|
||||
{
|
||||
pPPC = pPC;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
konami.ireg = ROP(PCD);
|
||||
PC++;
|
||||
@ -609,9 +609,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = konami_dasm; break;
|
||||
#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;
|
||||
|
||||
|
@ -51,8 +51,6 @@ void konami_get_info(UINT32 state, cpuinfo *info);
|
||||
# define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t konami_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _KONAMI_H */
|
||||
|
@ -131,7 +131,7 @@ static int lh5801_execute(int cycles)
|
||||
{
|
||||
lh5801.oldpc = P;
|
||||
|
||||
CALL_DEBUGGER(P);
|
||||
debugger_instruction_hook(Machine, P);
|
||||
lh5801_instruction();
|
||||
|
||||
} while (lh5801_icount > 0);
|
||||
@ -234,9 +234,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = lh5801_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &lh5801_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -306,7 +306,7 @@ static int lr35902_execute (int cycles)
|
||||
} else {
|
||||
/* Fetch and count cycles */
|
||||
lr35902_ProcessInterrupts ();
|
||||
CALL_DEBUGGER(Regs.w.PC);
|
||||
debugger_instruction_hook(Machine, Regs.w.PC);
|
||||
if ( Regs.w.enable & HALTED ) {
|
||||
CYCLES_PASSED( Cycles[0x76] );
|
||||
Regs.w.execution_state = 1;
|
||||
@ -464,10 +464,7 @@ void lr35902_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_PTR_RESET: info->reset = lr35902_reset; break;
|
||||
case CPUINFO_PTR_EXECUTE: info->execute = lr35902_execute; break;
|
||||
case CPUINFO_PTR_BURN: info->burn = lr35902_burn; break;
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = lr35902_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &lr35902_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -25,8 +25,6 @@ enum {
|
||||
/****************************************************************************/
|
||||
extern void lr35902_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned lr35902_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram );
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif
|
||||
|
@ -1033,14 +1033,12 @@ void m37710_set_irq_callback(int (*callback)(int))
|
||||
#endif
|
||||
|
||||
/* Disassemble an instruction */
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
static STATE_POSTLOAD( m37710_restore_state )
|
||||
{
|
||||
@ -1225,9 +1223,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m37710_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m37710_ICount; break;
|
||||
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map16 = address_map_m37710_internal_map; break;
|
||||
|
@ -104,7 +104,7 @@ void m37710_state_load(void *file);
|
||||
|
||||
#undef M37710_CALL_DEBUGGER
|
||||
|
||||
#define M37710_CALL_DEBUGGER CALL_DEBUGGER
|
||||
#define M37710_CALL_DEBUGGER(x) debugger_instruction_hook(Machine, x)
|
||||
#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)
|
||||
|
@ -263,7 +263,7 @@ static int m4510_execute(int cycles)
|
||||
UINT8 op;
|
||||
PPC = PCD;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
/* if an irq is pending, take it now */
|
||||
if( m4510.pending_irq )
|
||||
@ -493,9 +493,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m4510_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m4510_ICount; break;
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP: info->internal_map8 = address_map_m4510_mem; break;
|
||||
case CPUINFO_PTR_TRANSLATE: info->translate = m4510_translate; break;
|
||||
|
@ -39,9 +39,7 @@ enum {
|
||||
void m4510_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned m4510_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -230,7 +230,7 @@ static int m6502_execute(int cycles)
|
||||
UINT8 op;
|
||||
PPC = PCD;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
/* if an irq is pending, take it now */
|
||||
if( m6502.pending_irq )
|
||||
@ -449,7 +449,7 @@ static int m65c02_execute(int cycles)
|
||||
UINT8 op;
|
||||
PPC = PCD;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
op = RDOP();
|
||||
(*m6502.insn[op])();
|
||||
@ -620,7 +620,7 @@ static int deco16_execute(int cycles)
|
||||
UINT8 op;
|
||||
PPC = PCD;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
op = RDOP();
|
||||
(*m6502.insn[op])();
|
||||
@ -747,9 +747,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6502_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6502_ICount; break;
|
||||
case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: info->f = (genf *) m6502.rdmem_id; break;
|
||||
case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: info->f = (genf *) m6502.wrmem_id; break;
|
||||
@ -831,9 +829,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6510_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP: info->internal_map8 = address_map_m6510_mem; break;
|
||||
case CPUINFO_PTR_M6510_PORTREAD: info->f = (genf *) m6502.port_read; break;
|
||||
case CPUINFO_PTR_M6510_PORTWRITE: info->f = (genf *) m6502.port_write; break;
|
||||
@ -929,9 +925,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m65c02_dasm; break;
|
||||
#endif
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "M65C02"); break;
|
||||
@ -953,9 +947,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m65sc02_dasm; break;
|
||||
#endif
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "M65SC02"); break;
|
||||
@ -1001,9 +993,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = deco16_dasm; break;
|
||||
#endif
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "DECO CPU16"); break;
|
||||
|
@ -71,9 +71,7 @@ enum
|
||||
|
||||
extern void m6502_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned m6502_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* The 6510
|
||||
@ -94,9 +92,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 ENABLE_DEBUGGER
|
||||
extern unsigned m6510_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -201,9 +197,7 @@ extern void n2a03_irq(void);
|
||||
|
||||
extern void m65c02_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned m65c02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -226,10 +220,8 @@ extern unsigned m65c02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const U
|
||||
|
||||
extern void m65sc02_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned m65sc02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* The DECO CPU16
|
||||
@ -251,9 +243,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 ENABLE_DEBUGGER
|
||||
extern unsigned deco16_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _M6502_H */
|
||||
|
||||
|
@ -204,7 +204,7 @@ static int m6509_execute(int cycles)
|
||||
UINT8 op;
|
||||
PPC = PCD;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
/* if an irq is pending, take it now */
|
||||
if( m6509.pending_irq )
|
||||
@ -372,9 +372,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6502_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6502_ICount; break;
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP: info->internal_map8 = address_map_m6509_mem; break;
|
||||
case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: info->f = (genf *) m6509.rdmem_id; break;
|
||||
|
@ -168,7 +168,7 @@ static int m65ce02_execute(int cycles)
|
||||
UINT8 op;
|
||||
PPC = PCD;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
/* if an irq is pending, take it now */
|
||||
if( m65ce02.pending_irq )
|
||||
@ -323,9 +323,7 @@ void m65ce02_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_PTR_EXIT: info->exit = m65ce02_exit; break;
|
||||
case CPUINFO_PTR_EXECUTE: info->execute = m65ce02_execute; break;
|
||||
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m65ce02_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m65ce02_ICount; break;
|
||||
case CPUINFO_PTR_M6502_READINDEXED_CALLBACK: info->f = (genf *) m65ce02.rdmem_id; break;
|
||||
case CPUINFO_PTR_M6502_WRITEINDEXED_CALLBACK: info->f = (genf *) m65ce02.wrmem_id; break;
|
||||
|
@ -34,9 +34,7 @@ enum {
|
||||
|
||||
void m65ce02_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned m65ce02_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _M65CE02_H */
|
||||
|
||||
|
@ -264,7 +264,7 @@ enum
|
||||
#define ONE_MORE_INSN() { \
|
||||
UINT8 ireg; \
|
||||
pPPC = pPC; \
|
||||
CALL_DEBUGGER(PCD); \
|
||||
debugger_instruction_hook(Machine, PCD); \
|
||||
ireg=M_RDOP(PCD); \
|
||||
PC++; \
|
||||
(*m6800.insn[ireg])(); \
|
||||
@ -987,7 +987,7 @@ static int m6800_execute(int cycles)
|
||||
else
|
||||
{
|
||||
pPPC = pPC;
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
ireg=M_RDOP(PCD);
|
||||
PC++;
|
||||
|
||||
@ -1334,7 +1334,7 @@ static int m6803_execute(int cycles)
|
||||
else
|
||||
{
|
||||
pPPC = pPC;
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
ireg=M_RDOP(PCD);
|
||||
PC++;
|
||||
|
||||
@ -1674,7 +1674,7 @@ static int hd63701_execute(int cycles)
|
||||
else
|
||||
{
|
||||
pPPC = pPC;
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
ireg=M_RDOP(PCD);
|
||||
PC++;
|
||||
|
||||
@ -2006,7 +2006,7 @@ static int nsc8105_execute(int cycles)
|
||||
else
|
||||
{
|
||||
pPPC = pPC;
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
ireg=M_RDOP(PCD);
|
||||
PC++;
|
||||
|
||||
@ -2652,9 +2652,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6800_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6800_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -2704,9 +2702,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6801_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "M6801"); break;
|
||||
@ -2731,9 +2727,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6802_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "M6802"); break;
|
||||
@ -2761,9 +2755,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6803_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map8 = address_map_m6803_mem; break;
|
||||
|
||||
@ -2790,9 +2782,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6808_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "M6808"); break;
|
||||
@ -2820,9 +2810,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hd63701_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "HD63701"); break;
|
||||
@ -2848,9 +2836,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = nsc8105_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "NSC8105"); break;
|
||||
|
@ -210,7 +210,6 @@ extern void nsc8105_get_info(UINT32 state, cpuinfo *info);
|
||||
# define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#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);
|
||||
@ -218,6 +217,5 @@ offs_t m6803_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opra
|
||||
offs_t m6808_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
offs_t hd63701_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
offs_t nsc8105_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _M6800_H */
|
||||
|
@ -197,13 +197,11 @@ static void m68000_set_context(void *src)
|
||||
m68k_set_context(src);
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
/****************************************************************************
|
||||
* M68008 section
|
||||
@ -246,13 +244,11 @@ static void m68008_set_context(void *src)
|
||||
m68k_set_context(src);
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif /* HAS_M68008 */
|
||||
|
||||
@ -270,13 +266,11 @@ static void m68010_init(int index, int clock, const void *config, int (*irqcallb
|
||||
m68k_set_int_ack_callback(irqcallback);
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif /* HAS_M68010 */
|
||||
|
||||
@ -320,13 +314,11 @@ static void m68020_set_context(void *src)
|
||||
m68k_set_context(src);
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
@ -343,13 +335,11 @@ static void m68ec020_init(int index, int clock, const void *config, int (*irqcal
|
||||
m68k_set_int_ack_callback(irqcallback);
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif /* HAS_M68EC020 */
|
||||
|
||||
@ -394,13 +384,11 @@ static void m68040_set_context(void *src)
|
||||
m68k_set_context(src);
|
||||
}
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif /* HAS_M68040 */
|
||||
|
||||
@ -533,9 +521,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68000_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -713,9 +699,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68008_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -804,9 +788,8 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68010_dasm; break;
|
||||
#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;
|
||||
@ -954,9 +937,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68020_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -1047,9 +1028,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68ec020_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
case CPUINFO_STR_NAME: strcpy(info->s, "68EC020"); break;
|
||||
@ -1196,9 +1175,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m68040_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m68k_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define M68K_SET_PC_CALLBACK(A) change_pc(A)
|
||||
|
||||
#define M68K_INSTRUCTION_HOOK OPT_SPECIFY_HANDLER
|
||||
#define M68K_INSTRUCTION_CALLBACK(A) CALL_DEBUGGER(A)
|
||||
#define M68K_INSTRUCTION_CALLBACK(A) debugger_instruction_hook(Machine, A)
|
||||
|
||||
#define M68K_EMULATE_PREFETCH OPT_ON
|
||||
|
||||
|
@ -522,7 +522,7 @@ static int m6805_execute(int cycles)
|
||||
}
|
||||
}
|
||||
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
ireg=M_RDOP(PC++);
|
||||
|
||||
@ -939,9 +939,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6805_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6805_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -82,8 +82,6 @@ extern void hd63705_get_info(UINT32 state, cpuinfo *info);
|
||||
/****************************************************************************/
|
||||
#define M6805_RDOP_ARG(Addr) ((unsigned)cpu_readop_arg(Addr))
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t m6805_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif /* _M6805_H */
|
||||
|
@ -82,9 +82,7 @@
|
||||
|
||||
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern offs_t m6809_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
|
||||
INLINE void fetch_effective_address( void );
|
||||
@ -517,7 +515,7 @@ static int m6809_execute(int cycles) /* NS 970908 */
|
||||
|
||||
if (m6809.int_state & (M6809_CWAI | M6809_SYNC))
|
||||
{
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
m6809_ICount = 0;
|
||||
}
|
||||
else
|
||||
@ -526,7 +524,7 @@ static int m6809_execute(int cycles) /* NS 970908 */
|
||||
{
|
||||
pPPC = pPC;
|
||||
|
||||
CALL_DEBUGGER(PCD);
|
||||
debugger_instruction_hook(Machine, PCD);
|
||||
|
||||
m6809.ireg = ROP(PCD);
|
||||
PC++;
|
||||
@ -1173,9 +1171,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = m6809_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &m6809_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -906,7 +906,7 @@ static int mb86233_execute(int cycles)
|
||||
UINT32 val;
|
||||
UINT32 opcode;
|
||||
|
||||
CALL_DEBUGGER(GETPC());
|
||||
debugger_instruction_hook(Machine, GETPC());
|
||||
|
||||
opcode = ROPCODE(GETPC());
|
||||
|
||||
@ -1522,7 +1522,6 @@ static int mb86233_execute(int cycles)
|
||||
DISASSEMBLY HOOK
|
||||
***************************************************************************/
|
||||
|
||||
#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);
|
||||
@ -1531,7 +1530,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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Information Setters
|
||||
@ -1642,9 +1641,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mb86233_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &mb86233_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -236,7 +236,7 @@ static int mb88_execute(int cycles)
|
||||
UINT8 opcode, arg, oc;
|
||||
|
||||
/* fetch the opcode */
|
||||
CALL_DEBUGGER(GETPC());
|
||||
debugger_instruction_hook(Machine, GETPC());
|
||||
opcode = READOP(GETPC());
|
||||
|
||||
/* increment the PC */
|
||||
@ -850,9 +850,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mb88_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &mb88_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -71,8 +71,6 @@ 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 ENABLE_DEBUGGER
|
||||
offs_t mb88_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -384,7 +384,7 @@ static int hc11_execute(int cycles)
|
||||
UINT8 op;
|
||||
|
||||
hc11.ppc = hc11.pc;
|
||||
CALL_DEBUGGER(hc11.pc);
|
||||
debugger_instruction_hook(Machine, hc11.pc);
|
||||
|
||||
op = FETCH();
|
||||
hc11_optable[op]();
|
||||
@ -457,9 +457,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = hc11_disasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &hc11.icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -3,9 +3,7 @@
|
||||
|
||||
#include "cpuintrf.h"
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t hc11_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
|
||||
void mc68hc11_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
|
@ -165,7 +165,7 @@ static int minx_execute( int cycles )
|
||||
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(GET_MINX_PC);
|
||||
debugger_instruction_hook(Machine, GET_MINX_PC);
|
||||
oldpc = GET_MINX_PC;
|
||||
|
||||
if ( regs.interrupt_pending )
|
||||
@ -354,9 +354,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = minx_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &minx_icount; break;
|
||||
case CPUINFO_STR_NAME: strcpy( info->s = cpuintrf_temp_str(), "Minx" ); break;
|
||||
case CPUINFO_STR_CORE_FAMILY: strcpy( info->s = cpuintrf_temp_str(), "Nintendo Minx" ); break;
|
||||
|
@ -10,9 +10,7 @@ enum {
|
||||
MINX_XI, MINX_YI,
|
||||
};
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned minx_dasm( char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -166,7 +166,7 @@ INLINE void generate_exception(int exception, int backup)
|
||||
if (exception != 0)
|
||||
{
|
||||
fprintf(stderr, "Exception: PC=%08X, PPC=%08X\n", mips3.core.pc, mips3.ppc);
|
||||
DEBUGGER_BREAK;
|
||||
debugger_break(Machine);
|
||||
}
|
||||
*/
|
||||
|
||||
@ -297,13 +297,11 @@ static int mips3_translate(int space, int intention, offs_t *address)
|
||||
}
|
||||
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
@ -1679,7 +1677,7 @@ int mips3_execute(int cycles)
|
||||
|
||||
/* debugging */
|
||||
mips3.ppc = mips3.core.pc;
|
||||
CALL_DEBUGGER(mips3.core.pc);
|
||||
debugger_instruction_hook(Machine, mips3.core.pc);
|
||||
|
||||
/* instruction fetch */
|
||||
op = ROPCODE(mips3.pcbase | (mips3.core.pc & 0xfff));
|
||||
@ -2136,9 +2134,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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips3_dasm; break;
|
||||
#endif
|
||||
case CPUINFO_PTR_TRANSLATE: info->translate = mips3_translate; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -164,7 +164,6 @@ void mips3com_reset(mips3_state *mips)
|
||||
CPU
|
||||
-------------------------------------------------*/
|
||||
|
||||
#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);
|
||||
@ -175,8 +174,6 @@ 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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
@ -223,9 +223,7 @@ void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, int in
|
||||
void mips3com_exit(mips3_state *mips);
|
||||
|
||||
void mips3com_reset(mips3_state *mips);
|
||||
#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);
|
||||
|
||||
void mips3com_map_tlb_entry(mips3_state *mips, int tlbindex);
|
||||
|
@ -573,13 +573,10 @@ static int mips3_translate(int space, int intention, offs_t *address)
|
||||
mips3_dasm - disassemble an instruction
|
||||
-------------------------------------------------*/
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
static offs_t mips3_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
|
||||
{
|
||||
return mips3com_dasm(mips3, buffer, pc, oprom, opram);
|
||||
}
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
@ -634,9 +631,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips3_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_TRANSLATE: info->translate = mips3_translate; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -1229,99 +1224,100 @@ static void static_generate_memory_accessor(drcuml_state *drcuml, int mode, int
|
||||
UML_JMPc(block, IF_Z, tlbmiss = label++); // jmp tlbmiss,z
|
||||
UML_ROLINS(block, IREG(0), IREG(3), IMM(0), IMM(0xfffff000)); // rolins i0,i3,0,0xfffff000
|
||||
|
||||
for (ramnum = 0; ramnum < MIPS3_MAX_FASTRAM; ramnum++)
|
||||
if (!Machine->debug_mode && mips3->impstate->fastram[ramnum].base != NULL && (!iswrite || !mips3->impstate->fastram[ramnum].readonly))
|
||||
{
|
||||
void *fastbase = (UINT8 *)mips3->impstate->fastram[ramnum].base - mips3->impstate->fastram[ramnum].start;
|
||||
UINT32 skip = label++;
|
||||
if (mips3->impstate->fastram[ramnum].end != 0xffffffff)
|
||||
if ((Machine->debug_flags & DEBUG_FLAG_ENABLED) == 0)
|
||||
for (ramnum = 0; ramnum < MIPS3_MAX_FASTRAM; ramnum++)
|
||||
if (mips3->impstate->fastram[ramnum].base != NULL && (!iswrite || !mips3->impstate->fastram[ramnum].readonly))
|
||||
{
|
||||
UML_CMP(block, IREG(0), IMM(mips3->impstate->fastram[ramnum].end)); // cmp i0,end
|
||||
UML_JMPc(block, IF_A, skip); // ja skip
|
||||
}
|
||||
if (mips3->impstate->fastram[ramnum].start != 0x00000000)
|
||||
{
|
||||
UML_CMP(block, IREG(0), IMM(mips3->impstate->fastram[ramnum].start));// cmp i0,fastram_start
|
||||
UML_JMPc(block, IF_B, skip); // jb skip
|
||||
}
|
||||
void *fastbase = (UINT8 *)mips3->impstate->fastram[ramnum].base - mips3->impstate->fastram[ramnum].start;
|
||||
UINT32 skip = label++;
|
||||
if (mips3->impstate->fastram[ramnum].end != 0xffffffff)
|
||||
{
|
||||
UML_CMP(block, IREG(0), IMM(mips3->impstate->fastram[ramnum].end)); // cmp i0,end
|
||||
UML_JMPc(block, IF_A, skip); // ja skip
|
||||
}
|
||||
if (mips3->impstate->fastram[ramnum].start != 0x00000000)
|
||||
{
|
||||
UML_CMP(block, IREG(0), IMM(mips3->impstate->fastram[ramnum].start));// cmp i0,fastram_start
|
||||
UML_JMPc(block, IF_B, skip); // jb skip
|
||||
}
|
||||
|
||||
if (!iswrite)
|
||||
{
|
||||
if (size == 1)
|
||||
if (!iswrite)
|
||||
{
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_LOAD(block, IREG(0), fastbase, IREG(0), BYTE); // load i0,fastbase,i0,byte
|
||||
}
|
||||
else if (size == 2)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(1)); // shr i0,i0,1
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_LOAD(block, IREG(0), fastbase, IREG(0), WORD); // load i0,fastbase,i0,word
|
||||
}
|
||||
else if (size == 4)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(2)); // shr i0,i0,2
|
||||
UML_LOAD(block, IREG(0), fastbase, IREG(0), DWORD); // load i0,fastbase,i0,dword
|
||||
}
|
||||
else if (size == 8)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(3)); // shr i0,i0,3
|
||||
UML_DLOAD(block, IREG(0), fastbase, IREG(0), QWORD); // dload i0,fastbase,i0,qword
|
||||
UML_DROR(block, IREG(0), IREG(0), IMM(32 * (mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0))));
|
||||
// dror i0,i0,32*bytexor
|
||||
}
|
||||
UML_RET(block); // ret
|
||||
}
|
||||
else
|
||||
{
|
||||
if (size == 1)
|
||||
{
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(1), BYTE); // store fastbase,i0,i1,byte
|
||||
}
|
||||
else if (size == 2)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(1)); // shr i0,i0,1
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(1), WORD); // store fastbase,i0,i1,word
|
||||
}
|
||||
else if (size == 4)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(2)); // shr i0,i0,2
|
||||
if (ismasked)
|
||||
if (size == 1)
|
||||
{
|
||||
UML_LOAD(block, IREG(3), fastbase, IREG(0), DWORD); // load i3,fastbase,i0,dword
|
||||
UML_ROLINS(block, IREG(3), IREG(1), IMM(0), IREG(2)); // rolins i3,i1,0,i2
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(3), DWORD); // store fastbase,i0,i3,dword
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_LOAD(block, IREG(0), fastbase, IREG(0), BYTE); // load i0,fastbase,i0,byte
|
||||
}
|
||||
else
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(1), DWORD); // store fastbase,i0,i1,dword
|
||||
}
|
||||
else if (size == 8)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(3)); // shr i0,i0,3
|
||||
UML_DROR(block, IREG(1), IREG(1), IMM(32 * (mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0))));
|
||||
// dror i1,i1,32*bytexor
|
||||
if (ismasked)
|
||||
else if (size == 2)
|
||||
{
|
||||
UML_DROR(block, IREG(2), IREG(2), IMM(32 * (mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0))));
|
||||
// dror i2,i2,32*bytexor
|
||||
UML_DLOAD(block, IREG(3), fastbase, IREG(0), QWORD); // dload i3,fastbase,i0,qword
|
||||
UML_DROLINS(block, IREG(3), IREG(1), IMM(0), IREG(2)); // drolins i3,i1,0,i2
|
||||
UML_DSTORE(block, fastbase, IREG(0), IREG(3), QWORD); // dstore fastbase,i0,i3,qword
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(1)); // shr i0,i0,1
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_LOAD(block, IREG(0), fastbase, IREG(0), WORD); // load i0,fastbase,i0,word
|
||||
}
|
||||
else
|
||||
UML_DSTORE(block, fastbase, IREG(0), IREG(1), QWORD); // dstore fastbase,i0,i1,qword
|
||||
else if (size == 4)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(2)); // shr i0,i0,2
|
||||
UML_LOAD(block, IREG(0), fastbase, IREG(0), DWORD); // load i0,fastbase,i0,dword
|
||||
}
|
||||
else if (size == 8)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(3)); // shr i0,i0,3
|
||||
UML_DLOAD(block, IREG(0), fastbase, IREG(0), QWORD); // dload i0,fastbase,i0,qword
|
||||
UML_DROR(block, IREG(0), IREG(0), IMM(32 * (mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0))));
|
||||
// dror i0,i0,32*bytexor
|
||||
}
|
||||
UML_RET(block); // ret
|
||||
}
|
||||
else
|
||||
{
|
||||
if (size == 1)
|
||||
{
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(1), BYTE); // store fastbase,i0,i1,byte
|
||||
}
|
||||
else if (size == 2)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(1)); // shr i0,i0,1
|
||||
UML_XOR(block, IREG(0), IREG(0), IMM(mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0)));
|
||||
// xor i0,i0,bytexor
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(1), WORD); // store fastbase,i0,i1,word
|
||||
}
|
||||
else if (size == 4)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(2)); // shr i0,i0,2
|
||||
if (ismasked)
|
||||
{
|
||||
UML_LOAD(block, IREG(3), fastbase, IREG(0), DWORD); // load i3,fastbase,i0,dword
|
||||
UML_ROLINS(block, IREG(3), IREG(1), IMM(0), IREG(2)); // rolins i3,i1,0,i2
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(3), DWORD); // store fastbase,i0,i3,dword
|
||||
}
|
||||
else
|
||||
UML_STORE(block, fastbase, IREG(0), IREG(1), DWORD); // store fastbase,i0,i1,dword
|
||||
}
|
||||
else if (size == 8)
|
||||
{
|
||||
UML_SHR(block, IREG(0), IREG(0), IMM(3)); // shr i0,i0,3
|
||||
UML_DROR(block, IREG(1), IREG(1), IMM(32 * (mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0))));
|
||||
// dror i1,i1,32*bytexor
|
||||
if (ismasked)
|
||||
{
|
||||
UML_DROR(block, IREG(2), IREG(2), IMM(32 * (mips3->bigendian ? BYTE_XOR_BE(0) : BYTE_XOR_LE(0))));
|
||||
// dror i2,i2,32*bytexor
|
||||
UML_DLOAD(block, IREG(3), fastbase, IREG(0), QWORD); // dload i3,fastbase,i0,qword
|
||||
UML_DROLINS(block, IREG(3), IREG(1), IMM(0), IREG(2)); // drolins i3,i1,0,i2
|
||||
UML_DSTORE(block, fastbase, IREG(0), IREG(3), QWORD); // dstore fastbase,i0,i3,qword
|
||||
}
|
||||
else
|
||||
UML_DSTORE(block, fastbase, IREG(0), IREG(1), QWORD); // dstore fastbase,i0,i1,qword
|
||||
}
|
||||
UML_RET(block); // ret
|
||||
}
|
||||
UML_RET(block); // ret
|
||||
}
|
||||
|
||||
UML_LABEL(block, skip); // skip:
|
||||
}
|
||||
UML_LABEL(block, skip); // skip:
|
||||
}
|
||||
|
||||
switch (size)
|
||||
{
|
||||
@ -1556,7 +1552,7 @@ static void generate_sequence_instruction(drcuml_block *block, compiler_state *c
|
||||
UML_CALLC(block, cfunc_printf_probe, desc->pc); // callc cfunc_printf_probe,desc->pc
|
||||
|
||||
/* if we are debugging, call the debugger */
|
||||
if (Machine->debug_mode)
|
||||
if ((Machine->debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
{
|
||||
UML_MOV(block, MEM(&mips3->pc), IMM(desc->pc)); // mov [pc],desc->pc
|
||||
save_fast_iregs(block);
|
||||
@ -3926,14 +3922,3 @@ void rm7000le_get_info(UINT32 state, cpuinfo *info)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DISASSEMBLERS
|
||||
***************************************************************************/
|
||||
|
||||
#if !defined(ENABLE_DEBUGGER) && (LOG_UML || LOG_NATIVE)
|
||||
#include "mips3dsm.c"
|
||||
#endif
|
||||
|
||||
|
@ -256,8 +256,8 @@ static void mips_load_bad_address( UINT32 address );
|
||||
|
||||
static void mips_stop( void )
|
||||
{
|
||||
DEBUGGER_BREAK;
|
||||
CALL_DEBUGGER( mipscpu.pc );
|
||||
debugger_break(Machine);
|
||||
debugger_instruction_hook(Machine, mipscpu.pc );
|
||||
}
|
||||
|
||||
#if LOG_BIOSCALL
|
||||
@ -1803,7 +1803,7 @@ static int mips_execute( int cycles )
|
||||
log_bioscall();
|
||||
#endif
|
||||
|
||||
CALL_DEBUGGER( mipscpu.pc );
|
||||
debugger_instruction_hook(Machine, mipscpu.pc );
|
||||
|
||||
mipscpu.op = cpu_readop32( mipscpu.pc );
|
||||
switch( INS_OP( mipscpu.op ) )
|
||||
@ -2913,12 +2913,10 @@ ADDRESS_MAP_END
|
||||
* Return a formatted string for a register
|
||||
****************************************************************************/
|
||||
|
||||
#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 /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
static UINT32 getcp1dr( int reg )
|
||||
@ -4178,9 +4176,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &mips_ICount; break;
|
||||
|
||||
case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map32 = address_map_psxcpu_internal_map; break;
|
||||
|
@ -203,9 +203,7 @@ enum
|
||||
#define CF_TLBP ( 8 )
|
||||
#define CF_RFE ( 16 )
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
extern unsigned DasmMIPS( char *buffer, UINT32 pc, const UINT8 *opram );
|
||||
#endif
|
||||
|
||||
#if (HAS_PSXCPU)
|
||||
extern void psxcpu_get_info(UINT32 state, cpuinfo *info);
|
||||
|
@ -750,7 +750,7 @@ static int r3000_execute(int cycles)
|
||||
|
||||
/* debugging */
|
||||
r3000.ppc = r3000.pc;
|
||||
CALL_DEBUGGER(r3000.pc);
|
||||
debugger_instruction_hook(Machine, r3000.pc);
|
||||
|
||||
/* instruction fetch */
|
||||
op = ROPCODE(r3000.pc);
|
||||
@ -932,7 +932,6 @@ static int r3000_execute(int cycles)
|
||||
DISASSEMBLY HOOK
|
||||
***************************************************************************/
|
||||
|
||||
#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);
|
||||
@ -944,7 +943,6 @@ static offs_t r3000_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT
|
||||
|
||||
return dasmr3k(buffer, pc, op);
|
||||
}
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
||||
@ -1287,9 +1285,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = r3000_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &r3000_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -1039,12 +1039,10 @@ static void set_poll_line(int state)
|
||||
I.poll_state = state;
|
||||
}
|
||||
|
||||
#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, I.config);
|
||||
}
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
static void nec_init(int index, int clock, const void *_config, int (*irqcallback)(int), int type)
|
||||
{
|
||||
@ -1194,7 +1192,7 @@ static int v20_execute(int cycles)
|
||||
if (I.no_interrupt)
|
||||
I.no_interrupt--;
|
||||
|
||||
CALL_DEBUGGER((I.sregs[PS]<<4) + I.ip);
|
||||
debugger_instruction_hook(Machine, (I.sregs[PS]<<4) + I.ip);
|
||||
nec_instruction[fetchop()]();
|
||||
}
|
||||
return cycles - nec_ICount;
|
||||
@ -1225,7 +1223,7 @@ static int v30_execute(int cycles) {
|
||||
if (I.no_interrupt)
|
||||
I.no_interrupt--;
|
||||
|
||||
CALL_DEBUGGER((I.sregs[PS]<<4) + I.ip);
|
||||
debugger_instruction_hook(Machine, (I.sregs[PS]<<4) + I.ip);
|
||||
nec_instruction[fetchop()]();
|
||||
}
|
||||
return cycles - nec_ICount;
|
||||
@ -1257,7 +1255,7 @@ static int v33_execute(int cycles)
|
||||
if (I.no_interrupt)
|
||||
I.no_interrupt--;
|
||||
|
||||
CALL_DEBUGGER((I.sregs[PS]<<4) + I.ip);
|
||||
debugger_instruction_hook(Machine, (I.sregs[PS]<<4) + I.ip);
|
||||
nec_instruction[fetchop()]();
|
||||
}
|
||||
|
||||
@ -1390,9 +1388,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = nec_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &nec_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -626,7 +626,7 @@ static int pdp1_execute(int cycles)
|
||||
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
|
||||
/* ioh should be cleared at the end of the instruction cycle, and ios at the
|
||||
@ -1025,9 +1025,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = pdp1_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &pdp1_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -74,8 +74,6 @@ void pdp1_get_info(UINT32 state, cpuinfo *info);
|
||||
#define IOT 035
|
||||
#define OPR 037
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
unsigned pdp1_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
#endif /* _PDP1_H */
|
||||
|
@ -182,7 +182,7 @@ static int tx0_execute_64kw(int cycles)
|
||||
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
|
||||
if (tx0.ioh && tx0.ios)
|
||||
@ -290,7 +290,7 @@ static int tx0_execute_8kw(int cycles)
|
||||
|
||||
do
|
||||
{
|
||||
CALL_DEBUGGER(PC);
|
||||
debugger_instruction_hook(Machine, PC);
|
||||
|
||||
|
||||
if (tx0.ioh && tx0.ios)
|
||||
@ -516,10 +516,7 @@ void tx0_64kw_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_PTR_RESET: info->reset = tx0_reset; break;
|
||||
case CPUINFO_PTR_EXECUTE: info->execute = tx0_execute_64kw; break;
|
||||
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tx0_dasm_64kw; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tx0_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
@ -645,10 +642,7 @@ void tx0_8kw_get_info(UINT32 state, cpuinfo *info)
|
||||
case CPUINFO_PTR_RESET: info->reset = tx0_reset; break;
|
||||
case CPUINFO_PTR_EXECUTE: info->execute = tx0_execute_8kw; break;
|
||||
case CPUINFO_PTR_BURN: info->burn = NULL; break;
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = tx0_dasm_8kw; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &tx0_ICount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -44,7 +44,5 @@ 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 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 /* ENABLE_DEBUGGER */
|
||||
|
@ -26,23 +26,12 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef ENABLE_DEBUGGER /* Compile interface to MAME */
|
||||
#include "cpuintrf.h"
|
||||
static const UINT8 *rombase;
|
||||
static const UINT8 *rambase;
|
||||
static offs_t pcbase;
|
||||
#define READOP16(A) (rombase[(A) - pcbase] | (rombase[(A) + 1 - pcbase] << 8))
|
||||
#define READARG16(A) (rambase[(A) - pcbase] | (rambase[(A) + 1 - pcbase] << 8))
|
||||
#else /* Compile interface for standalone */
|
||||
extern unsigned char *Buffer;
|
||||
#ifdef MSB_FIRST
|
||||
#define READOP16(A) ( ((Buffer[A]<<8) | Buffer[A+1]) )
|
||||
#define READARG16(A) ( ((Buffer[A]<<8) | Buffer[A+1]) )
|
||||
#else
|
||||
#define READOP16(A) ( ((Buffer[A+1]<<8) | Buffer[A]) )
|
||||
#define READARG16(A) ( ((Buffer[A+1]<<8) | Buffer[A]) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
@ -840,7 +840,7 @@ static int pic16C5x_execute(int cycles)
|
||||
if (PD == 0) /* Sleep Mode */
|
||||
{
|
||||
inst_cycles = (1*CLK);
|
||||
CALL_DEBUGGER(R.PC);
|
||||
debugger_instruction_hook(Machine, R.PC);
|
||||
if (WDTE) {
|
||||
pic16C5x_update_watchdog(1*CLK);
|
||||
}
|
||||
@ -849,7 +849,7 @@ static int pic16C5x_execute(int cycles)
|
||||
{
|
||||
R.PREVPC = R.PC;
|
||||
|
||||
CALL_DEBUGGER(R.PC);
|
||||
debugger_instruction_hook(Machine, R.PC);
|
||||
|
||||
R.opcode.d = M_RDOP(R.PC);
|
||||
R.PC++;
|
||||
@ -1012,9 +1012,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = pic16C5x_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &pic16C5x_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
@ -126,10 +126,8 @@ void pic16C58_get_info(UINT32 state, cpuinfo *info);
|
||||
|
||||
|
||||
#if (HAS_PIC16C54) || (HAS_PIC16C55) || (HAS_PIC16C56) || (HAS_PIC16C57) || (HAS_PIC16C58)
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
offs_t pic16C5x_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _PIC16C5X_H */
|
||||
|
@ -1883,9 +1883,7 @@ 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 ENABLE_DEBUGGER
|
||||
case CPUINFO_PTR_DISASSEMBLE: info->disassemble = ppc_dasm; break;
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &ppc_icount; break;
|
||||
|
||||
/* --- the following bits of info are returned as NULL-terminated strings --- */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user