From faaaa97c9e6cea7fa865312ce07a9c222983e50a Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 18 Dec 2012 07:00:24 +0100 Subject: [PATCH] Added a utility function to dump an AX PB for debugging --- .../Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h index 16a9870b9e..155965dfea 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h @@ -103,6 +103,26 @@ bool WritePB(u32 addr, const PB_TYPE& pb) return true; } +// Dump the value of a PB for debugging +#define DUMP_U16(field) WARN_LOG(DSPHLE, " %04x (%s)", pb.field, #field) +#define DUMP_U32(field) WARN_LOG(DSPHLE, " %08x (%s)", HILO_TO_32(pb.field), #field) +void DumpPB(const PB_TYPE& pb) +{ + DUMP_U32(next_pb); + DUMP_U32(this_pb); + DUMP_U16(src_type); + DUMP_U16(coef_select); +#ifdef AX_GC + DUMP_U16(mixer_control); +#else + DUMP_U32(mixer_control); +#endif + DUMP_U16(running); + DUMP_U16(is_stream); + + // TODO: complete as needed +} + // Simulated accelerator state. static u32 acc_loop_addr, acc_end_addr; static u32* acc_cur_addr;