}
if (debug_copper) {
int hpos = current_hpos();
- record_copper_blitwait(cop_state.ip - 4, hpos, vpos);
+ record_copper_blitwait(cop_state.ip - 2, hpos, vpos);
}
}
#endif
#ifdef DEBUGGER
if (debug_copper && cop_state.irload2) {
- record_copper(cop_state.ip - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
+ record_copper(cop_state.ip - 2, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
}
#endif
}
cop_state.strobe = 0;
#ifdef DEBUGGER
if (debug_copper) {
- record_copper(previp - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
+ record_copper(previp - 2, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
}
#endif
} else {
#ifdef DEBUGGER
if (debug_copper && cop_state.irload2) {
- record_copper(cop_state.ip - 4, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
+ record_copper(cop_state.ip - 2, cop_state.ip, cop_state.ir[0], cop_state.ir[1], agnus_hpos, vpos);
}
}
#endif
debug_hpos = -1;
debug_cycles(2);
set_special(SPCFLAG_BRK);
+ trace_mode = TRACE_IMMEDIATE;
}
void debug_hsync(void)
int ypose, ypose_ecs;
int attach;
uae_u64 w1, w2, ww1, ww2;
+ bool detectsize = true;
int size = 1, width;
int ecs, sh10;
int y, i;
ignore_ws(inptr);
addr = readhex(inptr, NULL);
ignore_ws(inptr);
- if (more_params (inptr))
+ if (more_params (inptr)) {
size = readhex(inptr, NULL);
+ detectsize = false;
+ }
if (size != 1 && size != 2 && size != 4) {
addr2 = size;
+ detectsize = true;
ignore_ws(inptr);
- if (more_params(inptr))
+ if (more_params(inptr)) {
size = readint(inptr, NULL);
- if (size != 1 && size != 2 && size != 4)
- size = 1;
+ detectsize = false;
+ }
+ }
+ if ((size != 1 && size != 2 && size != 4) || detectsize) {
+ size = 1;
+ if (get_word_debug(addr + 2) == 0 && get_word_debug(addr + 4) != 0 && get_word_debug(addr + 6) == 0) {
+ size = 2;
+ } else if (get_word_debug(addr + 2) == 0 && get_word_debug(addr + 4) == 0 && get_word_debug(addr + 6) == 0 && get_word_debug(addr + 8) != 0) {
+ size = 4;
+ }
}
+
for (;;) {
ecs = 0;
sh10 = 0;
if (line > 0 && line != trace_param[1])
bp = -1;
}
+ } else if (trace_mode == TRACE_IMMEDIATE) {
+ bp = -2;
}
}
if (!bp && bpnum < 0) {
if (bpnum >= 0) {
console_out_f(_T("Breakpoint %d triggered.\n"), bpnum);
}
- debug_cycles(1);
+ if (bp >= -1) {
+ debug_cycles(1);
+ }
}
} else {
memwatch_hit_msg(memwatch_triggered - 1);
#define TRACE_RANGE_PC 4
#define TRACE_SKIP_LINE 5
#define TRACE_RAM_PC 6
+#define TRACE_IMMEDIATE 7
#define TRACE_CHECKONLY 10
#else
}
}
m68k_disasm (pc, nextpc, pc, 1);
- if (nextpc)
+ if (nextpc) {
console_out_f (_T("Next PC: %08x\n"), *nextpc);
+ *nextpc = pc;
+ }
}
void m68k_dumpcache (bool dc)