Added a utility function to dump an AX PB for debugging

This commit is contained in:
Pierre Bourdon 2012-12-18 07:00:24 +01:00
parent 1abbfd4b15
commit faaaa97c9e

View File

@ -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;