more ParallelRDP debugging
This commit is contained in:
@@ -100,7 +100,7 @@ inline void HandleInterrupt(Registers& regs) {
|
||||
|
||||
void Cpu::LogInstruction(u32 instruction) {
|
||||
#ifndef NDEBUG
|
||||
u8 code[4]{};
|
||||
/*u8 code[4]{};
|
||||
u32 bswapped = be32toh(instruction);
|
||||
memcpy(code, &instruction, 4);
|
||||
count = cs_disasm(handle, code, 4, regs.pc, 0, &insn);
|
||||
@@ -112,7 +112,7 @@ void Cpu::LogInstruction(u32 instruction) {
|
||||
cs_free(insn, count);
|
||||
} else {
|
||||
util::panic("Failed to disassemble {:08X}!", instruction);
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ u32 VI::Read(u32 paddr) const {
|
||||
case 0x04400020: return hsyncLeap.raw;
|
||||
case 0x04400024: return hvideo.raw;
|
||||
case 0x04400028: return vvideo.raw;
|
||||
case 0x0440002C: return vburst.raw;
|
||||
case 0x0440002C: return vburst;
|
||||
case 0x04400030: return xscale.raw;
|
||||
case 0x04400034: return yscale.raw;
|
||||
default:
|
||||
@@ -74,7 +74,7 @@ void VI::Write(MI& mi, Registers& regs, u32 paddr, u32 val) {
|
||||
case 0x04400020: hsyncLeap.raw = val; break;
|
||||
case 0x04400024: hvideo.raw = val; break;
|
||||
case 0x04400028: vvideo.raw = val; break;
|
||||
case 0x0440002C: vburst.raw = val; break;
|
||||
case 0x0440002C: vburst = val; break;
|
||||
case 0x04400030: xscale.raw = val; break;
|
||||
case 0x04400034: yscale.raw = val; break;
|
||||
default:
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
|
||||
namespace n64 {
|
||||
union VIBurst {
|
||||
struct {
|
||||
/*struct {
|
||||
unsigned hsyncW:8;
|
||||
unsigned burstW:8;
|
||||
unsigned vsyncW:4;
|
||||
unsigned burstStart:10;
|
||||
unsigned:2;
|
||||
};
|
||||
};*/
|
||||
u32 raw;
|
||||
};
|
||||
|
||||
union VIHsyncLeap {
|
||||
struct {
|
||||
/*struct {
|
||||
unsigned leapB:10;
|
||||
unsigned:6;
|
||||
unsigned leapA:10;
|
||||
unsigned:6;
|
||||
};
|
||||
};*/
|
||||
u32 raw;
|
||||
} ;
|
||||
|
||||
@@ -33,14 +33,20 @@ union VIVideo {
|
||||
u32 raw;
|
||||
};
|
||||
|
||||
union VIScale {
|
||||
union AxisScale {
|
||||
u32 raw;
|
||||
struct {
|
||||
unsigned scale:12;
|
||||
unsigned:4;
|
||||
unsigned offset:12;
|
||||
unsigned scaleDecimal:10;
|
||||
unsigned scaleInteger:2;
|
||||
unsigned subpixelOffsetDecimal:10;
|
||||
unsigned subpixelOffsetInteger:2;
|
||||
unsigned:4;
|
||||
};
|
||||
struct {
|
||||
unsigned scale:12;
|
||||
unsigned subpixelOffset:12;
|
||||
unsigned:4;
|
||||
};
|
||||
u32 raw;
|
||||
};
|
||||
|
||||
enum VIFormat {
|
||||
@@ -52,14 +58,30 @@ enum VIFormat {
|
||||
|
||||
union VIStatus {
|
||||
struct {
|
||||
u8 format:2;
|
||||
unsigned serrate:1;
|
||||
unsigned:29;
|
||||
u8 type:2;
|
||||
bool gamma_dither_enable:1;
|
||||
bool gamma_enable:1;
|
||||
bool divot_enable:1;
|
||||
bool reserved_always_off:1;
|
||||
bool serrate:1;
|
||||
bool reserved_diagnostics_only:1;
|
||||
unsigned antialias_mode:3;
|
||||
unsigned:21;
|
||||
};
|
||||
|
||||
u32 raw;
|
||||
};
|
||||
|
||||
union AxisStart {
|
||||
u32 raw;
|
||||
struct {
|
||||
unsigned end:10;
|
||||
unsigned:6;
|
||||
unsigned start:10;
|
||||
unsigned:6;
|
||||
};
|
||||
};
|
||||
|
||||
struct MI;
|
||||
struct Registers;
|
||||
|
||||
@@ -67,14 +89,15 @@ struct VI {
|
||||
VI();
|
||||
[[nodiscard]] u32 Read(u32) const;
|
||||
void Write(MI&, Registers&, u32, u32);
|
||||
VIScale xscale{}, yscale{};
|
||||
AxisScale xscale{}, yscale{};
|
||||
VIVideo hvideo{}, vvideo{};
|
||||
VIHsyncLeap hsyncLeap{};
|
||||
VIStatus status{};
|
||||
VIBurst burst{}, vburst{};
|
||||
VIBurst burst{};
|
||||
u32 vburst{};
|
||||
u32 origin, width, current;
|
||||
u32 vsync, hsync, intr;
|
||||
u32 hstart{}, vstart{};
|
||||
AxisStart hstart{}, vstart{};
|
||||
int swaps{};
|
||||
int numHalflines;
|
||||
int numFields;
|
||||
|
||||
Reference in New Issue
Block a user