Fix a if statement I missed in the last commit, and add in a couple functions for printing structs.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2262 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-11-27 15:25:26 +00:00
parent f11a138ce9
commit b78944866b
5 changed files with 27 additions and 4 deletions

View File

@ -43,6 +43,7 @@ union tDMA_CHCR {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Chcr: 0x%x", _u32); }
};
union tDMA_SADR {
@ -55,6 +56,7 @@ union tDMA_SADR {
tDMA_SADR(u32 val) { _u32 = val; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Sadr: 0x%x", _u32); }
};
@ -158,6 +160,7 @@ union tDMAC_CTRL {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Ctrl: 0x%x", _u32); }
};
union tDMAC_STAT {
@ -181,6 +184,7 @@ union tDMAC_STAT {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Stat: 0x%x", _u32); }
};
union tDMAC_PCR {
@ -199,6 +203,7 @@ union tDMAC_PCR {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Pcr: 0x%x", _u32); }
};
union tDMAC_SQWC {
@ -216,6 +221,7 @@ union tDMAC_SQWC {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Sqwc: 0x%x", _u32); }
};
union tDMAC_RBSR {
@ -228,6 +234,7 @@ union tDMAC_RBSR {
tDMAC_RBSR(u32 val) { _u32 = val; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Rbsr: 0x%x", _u32); }
};
union tDMAC_RBOR {
@ -240,6 +247,7 @@ union tDMAC_RBOR {
tDMAC_RBOR(u32 val) { _u32 = val; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Rbor: 0x%x", _u32); }
};
union tDMAC_STADR {
@ -252,6 +260,7 @@ union tDMAC_STADR {
tDMAC_STADR(u32 val) { _u32 = val; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Stadr: 0x%x", _u32); }
};
struct DMACregisters
@ -286,6 +295,7 @@ union tINTC_STAT {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Stat: 0x%x", _u32); }
};
union tINTC_MASK {
@ -301,6 +311,7 @@ union tINTC_MASK {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Mask: 0x%x", _u32); }
};
struct INTCregisters

View File

@ -75,6 +75,7 @@ union tGIF_CTRL
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Ctrl: 0x%x", _u32); }
};
union tGIF_MODE
@ -95,6 +96,7 @@ union tGIF_MODE
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Mode: 0x%x", _u32); }
};
enum gif_paths
@ -133,6 +135,7 @@ union tGIF_STAT
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Stat: 0x%x", _u32); }
};
union tGIF_TAG0
@ -151,6 +154,7 @@ union tGIF_TAG0
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Tag0: 0x%x", _u32); }
};
union tGIF_TAG1
@ -171,6 +175,7 @@ union tGIF_TAG1
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Tag1: 0x%x", _u32); }
};
union tGIF_CNT
@ -192,6 +197,7 @@ union tGIF_CNT
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"CNT: 0x%x", _u32); }
};
union tGIF_P3CNT
@ -206,6 +212,7 @@ union tGIF_P3CNT
tGIF_P3CNT(u32 val) { _u32 = val; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"P3CNT: 0x%x", _u32); }
};
union tGIF_P3TAG
@ -224,6 +231,7 @@ union tGIF_P3TAG
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"P3Tag: 0x%x", _u32); }
};
struct GIFregisters

View File

@ -655,7 +655,7 @@ void vifMFIFOInterrupt()
// Console.WriteLn("Empty 1");
vifqwc = 0;
vif1.inprogress |= 0x10;
vif1Regs->stat.FQC = 0; // FQC=0
vif1Regs->stat.FQC = 0;
hwDmacIrq(DMAC_MFIFO_EMPTY);
return;
}

View File

@ -110,6 +110,7 @@ union tVIF_STAT {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Stat: 0x%x", _u32); }
};
union tVIF_FBRST {
@ -128,6 +129,7 @@ union tVIF_FBRST {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Fbrst: 0x%x", _u32); }
};
union tVIF_ERR {
@ -146,9 +148,11 @@ union tVIF_ERR {
void set_flags(u32 flags) { _u32 |= flags; }
void clear_flags(u32 flags) { _u32 &= ~flags; }
void reset() { _u32 = 0; }
wxString desc() { return wxsFormat(L"Err: 0x%x", _u32); }
};
struct vifCycle {
struct vifCycle
{
u8 cl, wl;
u8 pad[2];
};

View File

@ -648,9 +648,9 @@ void dmaVIF0()
if (!(vif0ch->chcr.MOD & 0x1) || vif0ch->qwc > 0) // Normal Mode
{
if (_VIF0chain() == -2)
if (!_VIF0chain())
{
Console.WriteLn("Stall on normal %x", vif0Regs->stat._u32);
Console.WriteLn(L"Stall on normal vif0 " + vif0Regs->stat.desc());
vif0.vifstalled = true;
return;