mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
Pinpoint IRQ requests in CPU tracing
This commit is contained in:
parent
3edb24ea3b
commit
4fd6a87340
@ -61,12 +61,15 @@
|
||||
# define TRACE_EPILOGUE \
|
||||
CommonSaveCPUState; \
|
||||
bl CALL(cpu65_trace_epilogue);
|
||||
# define TRACE_IRQ \
|
||||
bl CALL(cpu65_trace_irq);
|
||||
#else
|
||||
# define TRACE_PROLOGUE
|
||||
# define TRACE_ARG
|
||||
# define TRACE_ARG1
|
||||
# define TRACE_ARG2
|
||||
# define TRACE_EPILOGUE
|
||||
# define TRACE_IRQ
|
||||
#endif
|
||||
|
||||
|
||||
@ -2467,8 +2470,9 @@ ex_reset: eor r0, r0, r0
|
||||
|
||||
ex_irq: tst F_Reg, #I_Flag // Already interrupted?
|
||||
beq 1f
|
||||
JumpNextInstruction
|
||||
1: mov r0, PC_Reg
|
||||
JumpNextInstruction // Yes (ignored) ...
|
||||
1: TRACE_IRQ // No (handle IRQ) ...
|
||||
mov r0, PC_Reg
|
||||
mov r0, r0, ROR #8
|
||||
Push(r0)
|
||||
mov r0, r0, LSR #24
|
||||
|
@ -916,7 +916,13 @@ GLUE_C_WRITE(cpu65_trace_epilogue)
|
||||
}
|
||||
|
||||
fprintf(cpu_trace_fp, "%s", "\n");
|
||||
fflush(cpu_trace_fp);
|
||||
}
|
||||
|
||||
GLUE_C_WRITE(cpu65_trace_irq)
|
||||
{
|
||||
if (cpu_trace_fp) {
|
||||
fprintf(cpu_trace_fp, "IRQ:%02X\n", cpu65__signal);
|
||||
}
|
||||
}
|
||||
|
||||
void cpu65_trace_checkpoint(void) {
|
||||
|
@ -58,12 +58,15 @@
|
||||
CommonSaveCPUState; \
|
||||
popLQ _XAX; \
|
||||
CALL_FN(callLQ, cpu65_trace_epilogue, 0x4);
|
||||
# define TRACE_IRQ \
|
||||
CALL_FN(callLQ, cpu65_trace_irq, 0x4);
|
||||
#else
|
||||
# define TRACE_PROLOGUE
|
||||
# define TRACE_ARG
|
||||
# define TRACE_ARG1
|
||||
# define TRACE_ARG2
|
||||
# define TRACE_EPILOGUE
|
||||
# define TRACE_IRQ
|
||||
#endif
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
@ -2186,7 +2189,8 @@ ex_reset: REG2MEM(movb, $0, cpu65__signal)
|
||||
ex_irq: testb $I_Flag, F_Reg // Already interrupted?
|
||||
jz 1f
|
||||
JumpNextInstruction // Yes (ignored) ...
|
||||
1: movw PC_Reg, %ax // No (handle IRQ) ...
|
||||
1: TRACE_IRQ // No (handle IRQ) ...
|
||||
movw PC_Reg, %ax
|
||||
#if __PIC__
|
||||
xchgb %al, %ah
|
||||
Push(%al)
|
||||
|
Loading…
x
Reference in New Issue
Block a user