Merge pull request #7887 from lioncash/hid

DolphinQt/Debugger/RegisterColumn: Add HID registers to the register pane
This commit is contained in:
Léo Lam 2019-05-04 22:33:45 +02:00 committed by GitHub
commit afa46aaf43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,7 @@ enum class RegisterType
srr, // Machine status save/restore register (SRR0 - SRR1) srr, // Machine status save/restore register (SRR0 - SRR1)
sr, // Segment register (SR0 - SR15) sr, // Segment register (SR0 - SR15)
gqr, // Graphics quantization registers (GQR0 - GQR7) gqr, // Graphics quantization registers (GQR0 - GQR7)
hid, // Hardware Implementation-Dependent registers (HID0-2, HID4)
exceptions, // Keeps track of currently triggered exceptions exceptions, // Keeps track of currently triggered exceptions
int_mask, // ??? int_mask, // ???
int_cause, // ??? int_cause, // ???

View File

@ -258,6 +258,16 @@ void RegisterWidget::PopulateTable()
[i] { return PowerPC::ppcState.spr[SPR_GQR0 + i]; }, nullptr); [i] { return PowerPC::ppcState.spr[SPR_GQR0 + i]; }, nullptr);
} }
// HID registers
AddRegister(24, 7, RegisterType::hid, "HID0", [] { return PowerPC::ppcState.spr[SPR_HID0]; },
[](u64 value) { PowerPC::ppcState.spr[SPR_HID0] = static_cast<u32>(value); });
AddRegister(25, 7, RegisterType::hid, "HID1", [] { return PowerPC::ppcState.spr[SPR_HID1]; },
[](u64 value) { PowerPC::ppcState.spr[SPR_HID1] = static_cast<u32>(value); });
AddRegister(26, 7, RegisterType::hid, "HID2", [] { return PowerPC::ppcState.spr[SPR_HID2]; },
[](u64 value) { PowerPC::ppcState.spr[SPR_HID2] = static_cast<u32>(value); });
AddRegister(27, 7, RegisterType::hid, "HID4", [] { return PowerPC::ppcState.spr[SPR_HID4]; },
[](u64 value) { PowerPC::ppcState.spr[SPR_HID4] = static_cast<u32>(value); });
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
{ {
// SR registers // SR registers