mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[Core/CPU] improved debug logging
This commit is contained in:
parent
dd4ce564da
commit
03c5fa58f4
@ -188,7 +188,8 @@ void m68k_set_fc_callback(void (*callback)(unsigned int new_fc))
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOGVDP
|
#ifdef LOGERROR
|
||||||
|
|
||||||
extern void error(char *format, ...);
|
extern void error(char *format, ...);
|
||||||
extern uint16 v_counter;
|
extern uint16 v_counter;
|
||||||
#endif
|
#endif
|
||||||
@ -202,8 +203,8 @@ void m68k_update_irq(unsigned int mask)
|
|||||||
/* Update IRQ level */
|
/* Update IRQ level */
|
||||||
CPU_INT_LEVEL |= (mask << 8);
|
CPU_INT_LEVEL |= (mask << 8);
|
||||||
|
|
||||||
#ifdef LOGVDP
|
#ifdef LOGERROR
|
||||||
error("[%d(%d)][%d(%d)] IRQ Level = %d(0x%02x) (%x)\n", v_counter, m68k.cycles/3420, m68k.cycles, m68k.cycles%3420,CPU_INT_LEVEL>>8,FLAG_INT_MASK,m68k_get_reg(M68K_REG_PC));
|
error("[%d(%d)][%d(%d)] m68k IRQ Level = %d(0x%02x) (%x)\n", v_counter, m68k.cycles/3420, m68k.cycles, m68k.cycles%3420,CPU_INT_LEVEL>>8,FLAG_INT_MASK,m68k_get_reg(M68K_REG_PC));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,8 +213,8 @@ void m68k_set_irq(unsigned int int_level)
|
|||||||
/* Set IRQ level */
|
/* Set IRQ level */
|
||||||
CPU_INT_LEVEL = int_level << 8;
|
CPU_INT_LEVEL = int_level << 8;
|
||||||
|
|
||||||
#ifdef LOGVDP
|
#ifdef LOGERROR
|
||||||
error("[%d(%d)][%d(%d)] IRQ Level = %d(0x%02x) (%x)\n", v_counter, m68k.cycles/3420, m68k.cycles, m68k.cycles%3420,CPU_INT_LEVEL>>8,FLAG_INT_MASK,m68k_get_reg(M68K_REG_PC));
|
error("[%d(%d)][%d(%d)] m68k IRQ Level = %d(0x%02x) (%x)\n", v_counter, m68k.cycles/3420, m68k.cycles, m68k.cycles%3420,CPU_INT_LEVEL>>8,FLAG_INT_MASK,m68k_get_reg(M68K_REG_PC));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,8 +246,8 @@ void m68k_set_irq_delay(unsigned int int_level)
|
|||||||
CPU_INT_LEVEL = int_level << 8;
|
CPU_INT_LEVEL = int_level << 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LOGVDP
|
#ifdef LOGERROR
|
||||||
error("[%d(%d)][%d(%d)] IRQ Level = %d(0x%02x) (%x)\n", v_counter, m68k.cycles/3420, m68k.cycles, m68k.cycles%3420,CPU_INT_LEVEL>>8,FLAG_INT_MASK,m68k_get_reg(M68K_REG_PC));
|
error("[%d(%d)][%d(%d)] m68k IRQ Level = %d(0x%02x) (%x)\n", v_counter, m68k.cycles/3420, m68k.cycles, m68k.cycles%3420,CPU_INT_LEVEL>>8,FLAG_INT_MASK,m68k_get_reg(M68K_REG_PC));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check interrupt mask to process IRQ */
|
/* Check interrupt mask to process IRQ */
|
||||||
@ -277,7 +278,7 @@ void m68k_run(unsigned int cycles)
|
|||||||
/* Return point for when we have an address error (TODO: use goto) */
|
/* Return point for when we have an address error (TODO: use goto) */
|
||||||
m68ki_set_address_error_trap() /* auto-disable (see m68kcpu.h) */
|
m68ki_set_address_error_trap() /* auto-disable (see m68kcpu.h) */
|
||||||
|
|
||||||
#ifdef LOGVDP
|
#ifdef LOGERROR
|
||||||
error("[%d][%d] m68k run to %d cycles (%x), irq mask = %x (%x)\n", v_counter, m68k.cycles, cycles, m68k.pc,FLAG_INT_MASK, CPU_INT_LEVEL);
|
error("[%d][%d] m68k run to %d cycles (%x), irq mask = %x (%x)\n", v_counter, m68k.cycles, cycles, m68k.pc,FLAG_INT_MASK, CPU_INT_LEVEL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ void s68k_update_irq(unsigned int mask)
|
|||||||
CPU_INT_LEVEL = mask << 8;
|
CPU_INT_LEVEL = mask << 8;
|
||||||
|
|
||||||
#ifdef LOG_SCD
|
#ifdef LOG_SCD
|
||||||
error("[%d][%d] IRQ Level = %d(0x%02x) (%x)\n", v_counter, s68k.cycles, CPU_INT_LEVEL>>8,FLAG_INT_MASK,s68k.pc);
|
error("[%d][%d] s68k IRQ Level = %d(0x%02x) (%x)\n", v_counter, s68k.cycles, CPU_INT_LEVEL>>8,FLAG_INT_MASK,s68k.pc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user