From af0b0e18eac91ed56ab78e7447f686ce87412377 Mon Sep 17 00:00:00 2001 From: Summate Date: Thu, 9 Apr 2020 00:39:31 -0500 Subject: [PATCH] Adding label IDs to correspond to debugger register edit IDs Abstracting pairing edit IDs with label IDs Extracting definition of register tab data to a separate file Adding a facility to get the text of a CWindow, there didn't seem to be a straightforward mechanism to do this Adding functionality to clipboard the current tab's registers or registers from all tabs Fixing FCSR to have the same styling as all of the other register edit fields --- Source/Project64/Project64.vcxproj | 2 + Source/Project64/Project64.vcxproj.filters | 6 + .../Debugger/Debugger-Commands.cpp | 12 + .../Debugger/Debugger-Commands.h | 6 + .../Debugger/Debugger-RegisterTabData.h | 343 ++++++++++++++++++ .../Debugger/Debugger-RegisterTabs.cpp | 215 ++++++++--- .../Debugger/Debugger-RegisterTabs.h | 182 ++-------- Source/Project64/UserInterface/UIResources.rc | 298 +++++++-------- .../WTLControls/EditNumber32.cpp | 5 + .../UserInterface/WTLControls/EditNumber32.h | 1 + .../WTLControls/GetCWindowText.h | 16 + .../WTLControls/ModifiedEditBox.cpp | 11 +- Source/Project64/UserInterface/resource.h | 149 ++++++++ Source/Project64/WTLApp.h | 4 + 14 files changed, 892 insertions(+), 358 deletions(-) create mode 100644 Source/Project64/UserInterface/Debugger/Debugger-RegisterTabData.h create mode 100644 Source/Project64/UserInterface/WTLControls/GetCWindowText.h diff --git a/Source/Project64/Project64.vcxproj b/Source/Project64/Project64.vcxproj index 5622d09da..979aaeb50 100644 --- a/Source/Project64/Project64.vcxproj +++ b/Source/Project64/Project64.vcxproj @@ -164,6 +164,7 @@ + @@ -205,6 +206,7 @@ + diff --git a/Source/Project64/Project64.vcxproj.filters b/Source/Project64/Project64.vcxproj.filters index 9740bcbab..3b2c44ee2 100644 --- a/Source/Project64/Project64.vcxproj.filters +++ b/Source/Project64/Project64.vcxproj.filters @@ -470,6 +470,12 @@ Header Files\User Interface Headers\WTL Controls Headers + + Header Files\User Interface Headers\WTL Controls Headers + + + Header Files\User Interface Headers\Debugger Headers + diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp b/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp index 7e71450e7..a2c678a5b 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-Commands.cpp @@ -1219,6 +1219,18 @@ LRESULT CDebugCommandsView::OnRemoveBPButton(WORD /*wNotifyCode*/, WORD /*wID*/, return FALSE; } +LRESULT CDebugCommandsView::OnCopyTabRegistersButton(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hwnd*/, BOOL& /*bHandled*/) +{ + m_RegisterTabs.CopyTabRegisters(); + return FALSE; +} + +LRESULT CDebugCommandsView::OnCopyAllRegistersButton(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hwnd*/, BOOL& /*bHandled*/) +{ + m_RegisterTabs.CopyAllRegisters(); + return FALSE; +} + LRESULT CDebugCommandsView::OnCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hwnd*/, BOOL& /*bHandled*/) { EndDialog(0); diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Commands.h b/Source/Project64/UserInterface/Debugger/Debugger-Commands.h index 473ecc581..756122547 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Commands.h +++ b/Source/Project64/UserInterface/Debugger/Debugger-Commands.h @@ -109,6 +109,8 @@ private: COMMAND_HANDLER(IDC_CLEARBP_BTN, BN_CLICKED, OnClearBPButton) COMMAND_HANDLER(IDC_ADDBP_BTN, BN_CLICKED, OnAddBPButton) COMMAND_HANDLER(IDC_RMBP_BTN, BN_CLICKED, OnRemoveBPButton) + COMMAND_HANDLER(IDC_COPYTABREGISTERS_BTN, BN_CLICKED, OnCopyTabRegistersButton) + COMMAND_HANDLER(IDC_COPYALLREGISTERS_BTN, BN_CLICKED, OnCopyAllRegistersButton) COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnCancel) COMMAND_HANDLER(ID_POPUPMENU_EDIT, BN_CLICKED, OnPopupmenuEdit) COMMAND_HANDLER(ID_POPUPMENU_INSERTNOP, BN_CLICKED, OnPopupmenuInsertNOP) @@ -141,6 +143,8 @@ private: DLGRESIZE_CONTROL(IDC_ADDBP_BTN, DLSZ_MOVE_X) DLGRESIZE_CONTROL(IDC_RMBP_BTN, DLSZ_MOVE_X) DLGRESIZE_CONTROL(IDC_CLEARBP_BTN, DLSZ_MOVE_X) + DLGRESIZE_CONTROL(IDC_COPYTABREGISTERS_BTN, DLSZ_MOVE_X) + DLGRESIZE_CONTROL(IDC_COPYALLREGISTERS_BTN, DLSZ_MOVE_X) DLGRESIZE_CONTROL(IDC_REG_TABS, DLSZ_MOVE_X) DLGRESIZE_CONTROL(IDC_BACK_BTN, DLSZ_MOVE_X) DLGRESIZE_CONTROL(IDC_FORWARD_BTN, DLSZ_MOVE_X) @@ -190,6 +194,8 @@ private: LRESULT OnClearBPButton(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); LRESULT OnAddBPButton(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); LRESULT OnRemoveBPButton(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); + LRESULT OnCopyTabRegistersButton(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); + LRESULT OnCopyAllRegistersButton(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); LRESULT OnPopupmenuEdit(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); LRESULT OnPopupmenuInsertNOP(WORD wNotifyCode, WORD wID, HWND hwnd, BOOL& bHandled); diff --git a/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabData.h b/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabData.h new file mode 100644 index 000000000..a8397031c --- /dev/null +++ b/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabData.h @@ -0,0 +1,343 @@ +/**************************************************************************** +* * +* Project64 - A Nintendo 64 emulator. * +* http://www.pj64-emu.com/ * +* Copyright (C) 2012 Project64. All rights reserved. * +* * +* License: * +* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html * +* * +****************************************************************************/ +#pragma once +#include "stdafx.h" + +struct FieldPair +{ + const WORD LabelId; + const WORD EditId; +}; + +using FieldPairWithStopCallback = std::function; +using FieldPairCallback = std::function; + +struct TabRecord +{ + const size_t FieldCount = 0; + const FieldPair* Fields = nullptr; + + constexpr TabRecord(size_t arraySize, const FieldPair *pairs) : + FieldCount{arraySize / sizeof(*pairs)}, + Fields{pairs} + { + } + + int GetLabelIndex(WORD ctrl) const + { + for (int i = 0, end = FieldCount; i < end; i++) + { + const FieldPair *pair = (Fields + i); + if (pair->LabelId == ctrl) + { + return i; + } + } + return -1; + } + + int GetEditIndex(WORD ctrl) const + { + for (int i = 0, end = FieldCount; i < end; i++) + { + const FieldPair *pair = (Fields + i); + if (pair->EditId == ctrl) + { + return i; + } + } + return -1; + } + + void Iterate(const CWindow *parent, FieldPairWithStopCallback callback) const + { + for (size_t i = 0, end = FieldCount; i < end; i++) + { + const FieldPair *pair = (Fields + i); + const CWindow label = parent->GetDescendantWindow(pair->LabelId); + const CWindow edit = parent->GetDescendantWindow(pair->EditId); + if (callback(&label, &edit)) + { + break; + } + } + } + + void Iterate(const CWindow *parent, FieldPairCallback callback) const + { + for (size_t i = 0, end = FieldCount; i < end; i++) + { + const FieldPair *pair = (Fields + i); + const CWindow label = parent->GetDescendantWindow(pair->LabelId); + const CWindow edit = parent->GetDescendantWindow(pair->EditId); + callback(&label, &edit); + } + } +}; + +class TabData +{ +public: + static constexpr FieldPair GPRFields[] = + { + {IDC_R0_LBL, IDC_R0_EDIT}, + {IDC_R1_LBL, IDC_R1_EDIT}, + {IDC_R2_LBL, IDC_R2_EDIT}, + {IDC_R3_LBL, IDC_R3_EDIT}, + {IDC_R4_LBL, IDC_R4_EDIT}, + {IDC_R5_LBL, IDC_R5_EDIT}, + {IDC_R6_LBL, IDC_R6_EDIT}, + {IDC_R7_LBL, IDC_R7_EDIT}, + {IDC_R8_LBL, IDC_R8_EDIT}, + {IDC_R9_LBL, IDC_R9_EDIT}, + {IDC_R10_LBL, IDC_R10_EDIT}, + {IDC_R11_LBL, IDC_R11_EDIT}, + {IDC_R12_LBL, IDC_R12_EDIT}, + {IDC_R13_LBL, IDC_R13_EDIT}, + {IDC_R14_LBL, IDC_R14_EDIT}, + {IDC_R15_LBL, IDC_R15_EDIT}, + {IDC_R16_LBL, IDC_R16_EDIT}, + {IDC_R17_LBL, IDC_R17_EDIT}, + {IDC_R18_LBL, IDC_R18_EDIT}, + {IDC_R19_LBL, IDC_R19_EDIT}, + {IDC_R20_LBL, IDC_R20_EDIT}, + {IDC_R21_LBL, IDC_R21_EDIT}, + {IDC_R22_LBL, IDC_R22_EDIT}, + {IDC_R23_LBL, IDC_R23_EDIT}, + {IDC_R24_LBL, IDC_R24_EDIT}, + {IDC_R25_LBL, IDC_R25_EDIT}, + {IDC_R26_LBL, IDC_R26_EDIT}, + {IDC_R27_LBL, IDC_R27_EDIT}, + {IDC_R28_LBL, IDC_R28_EDIT}, + {IDC_R29_LBL, IDC_R29_EDIT}, + {IDC_R30_LBL, IDC_R30_EDIT}, + {IDC_R31_LBL, IDC_R31_EDIT}, + }; + + static constexpr TabRecord GPR = TabRecord{sizeof(GPRFields), GPRFields}; + + static constexpr FieldPair FPRFields[] = + { + {IDC_F0_LBL, IDC_F0_EDIT}, + {IDC_F1_LBL, IDC_F1_EDIT}, + {IDC_F2_LBL, IDC_F2_EDIT}, + {IDC_F3_LBL, IDC_F3_EDIT}, + {IDC_F4_LBL, IDC_F4_EDIT}, + {IDC_F5_LBL, IDC_F5_EDIT}, + {IDC_F6_LBL, IDC_F6_EDIT}, + {IDC_F7_LBL, IDC_F7_EDIT}, + {IDC_F8_LBL, IDC_F8_EDIT}, + {IDC_F9_LBL, IDC_F9_EDIT}, + {IDC_F10_LBL, IDC_F10_EDIT}, + {IDC_F11_LBL, IDC_F11_EDIT}, + {IDC_F12_LBL, IDC_F12_EDIT}, + {IDC_F13_LBL, IDC_F13_EDIT}, + {IDC_F14_LBL, IDC_F14_EDIT}, + {IDC_F15_LBL, IDC_F15_EDIT}, + {IDC_F16_LBL, IDC_F16_EDIT}, + {IDC_F17_LBL, IDC_F17_EDIT}, + {IDC_F18_LBL, IDC_F18_EDIT}, + {IDC_F19_LBL, IDC_F19_EDIT}, + {IDC_F20_LBL, IDC_F20_EDIT}, + {IDC_F21_LBL, IDC_F21_EDIT}, + {IDC_F22_LBL, IDC_F22_EDIT}, + {IDC_F23_LBL, IDC_F23_EDIT}, + {IDC_F24_LBL, IDC_F24_EDIT}, + {IDC_F25_LBL, IDC_F25_EDIT}, + {IDC_F26_LBL, IDC_F26_EDIT}, + {IDC_F27_LBL, IDC_F27_EDIT}, + {IDC_F28_LBL, IDC_F28_EDIT}, + {IDC_F29_LBL, IDC_F29_EDIT}, + {IDC_F30_LBL, IDC_F30_EDIT}, + {IDC_F31_LBL, IDC_F31_EDIT}, + }; + + static constexpr TabRecord FPR = TabRecord{sizeof(FPRFields), FPRFields}; + + static constexpr FieldPair COP0Fields[] = + { + {IDC_COP0_0_LBL, IDC_COP0_0_EDIT}, + {IDC_COP0_1_LBL, IDC_COP0_1_EDIT}, + {IDC_COP0_2_LBL, IDC_COP0_2_EDIT}, + {IDC_COP0_3_LBL, IDC_COP0_3_EDIT}, + {IDC_COP0_4_LBL, IDC_COP0_4_EDIT}, + {IDC_COP0_5_LBL, IDC_COP0_5_EDIT}, + {IDC_COP0_6_LBL, IDC_COP0_6_EDIT}, + {IDC_COP0_7_LBL, IDC_COP0_7_EDIT}, + {IDC_COP0_8_LBL, IDC_COP0_8_EDIT}, + {IDC_COP0_9_LBL, IDC_COP0_9_EDIT}, + {IDC_COP0_10_LBL, IDC_COP0_10_EDIT}, + {IDC_COP0_11_LBL, IDC_COP0_11_EDIT}, + {IDC_COP0_12_LBL, IDC_COP0_12_EDIT}, + {IDC_COP0_13_LBL, IDC_COP0_13_EDIT}, + {IDC_COP0_14_LBL, IDC_COP0_14_EDIT}, + {IDC_COP0_15_LBL, IDC_COP0_15_EDIT}, + {IDC_COP0_16_LBL, IDC_COP0_16_EDIT}, + {IDC_COP0_17_LBL, IDC_COP0_17_EDIT}, + {IDC_COP0_18_LBL, IDC_COP0_18_EDIT}, + }; + + static constexpr TabRecord COP0 = TabRecord{sizeof(COP0Fields), COP0Fields}; + + static constexpr FieldPair RDRAMFields[] = + { + {IDC_RDRAM00_LBL, IDC_RDRAM00_EDIT}, + {IDC_RDRAM04_LBL, IDC_RDRAM04_EDIT}, + {IDC_RDRAM08_LBL, IDC_RDRAM08_EDIT}, + {IDC_RDRAM0C_LBL, IDC_RDRAM0C_EDIT}, + {IDC_RDRAM10_LBL, IDC_RDRAM10_EDIT}, + {IDC_RDRAM14_LBL, IDC_RDRAM14_EDIT}, + {IDC_RDRAM18_LBL, IDC_RDRAM18_EDIT}, + {IDC_RDRAM1C_LBL, IDC_RDRAM1C_EDIT}, + {IDC_RDRAM20_LBL, IDC_RDRAM20_EDIT}, + {IDC_RDRAM24_LBL, IDC_RDRAM24_EDIT}, + }; + + static constexpr TabRecord RDRAM = TabRecord{sizeof(RDRAMFields), RDRAMFields}; + + static constexpr FieldPair SPFields[] = + { + {IDC_SP00_LBL, IDC_SP00_EDIT}, + {IDC_SP04_LBL, IDC_SP04_EDIT}, + {IDC_SP08_LBL, IDC_SP08_EDIT}, + {IDC_SP0C_LBL, IDC_SP0C_EDIT}, + {IDC_SP10_LBL, IDC_SP10_EDIT}, + {IDC_SP14_LBL, IDC_SP14_EDIT}, + {IDC_SP18_LBL, IDC_SP18_EDIT}, + {IDC_SP1C_LBL, IDC_SP1C_EDIT}, + }; + + static constexpr TabRecord SP = TabRecord{sizeof(SPFields), SPFields}; + + static constexpr FieldPair DPCFields[] = + { + {IDC_DPC00_LBL, IDC_DPC00_EDIT}, + {IDC_DPC04_LBL, IDC_DPC04_EDIT}, + {IDC_DPC08_LBL, IDC_DPC08_EDIT}, + {IDC_DPC0C_LBL, IDC_DPC0C_EDIT}, + {IDC_DPC10_LBL, IDC_DPC10_EDIT}, + {IDC_DPC14_LBL, IDC_DPC14_EDIT}, + {IDC_DPC18_LBL, IDC_DPC18_EDIT}, + {IDC_DPC1C_LBL, IDC_DPC1C_EDIT}, + }; + + static constexpr TabRecord DPC = TabRecord{sizeof(DPCFields), DPCFields}; + + static constexpr FieldPair MIFields[] = + { + {IDC_MI00_LBL, IDC_MI00_EDIT}, + {IDC_MI04_LBL, IDC_MI04_EDIT}, + {IDC_MI08_LBL, IDC_MI08_EDIT}, + {IDC_MI0C_LBL, IDC_MI0C_EDIT}, + }; + + static constexpr TabRecord MI = TabRecord{sizeof(MIFields), MIFields}; + + static constexpr FieldPair VIFields[] = + { + {IDC_VI00_LBL, IDC_VI00_EDIT}, + {IDC_VI04_LBL, IDC_VI04_EDIT}, + {IDC_VI08_LBL, IDC_VI08_EDIT}, + {IDC_VI0C_LBL, IDC_VI0C_EDIT}, + {IDC_VI10_LBL, IDC_VI10_EDIT}, + {IDC_VI14_LBL, IDC_VI14_EDIT}, + {IDC_VI18_LBL, IDC_VI18_EDIT}, + {IDC_VI1C_LBL, IDC_VI1C_EDIT}, + {IDC_VI20_LBL, IDC_VI20_EDIT}, + {IDC_VI24_LBL, IDC_VI24_EDIT}, + {IDC_VI28_LBL, IDC_VI28_EDIT}, + {IDC_VI2C_LBL, IDC_VI2C_EDIT}, + {IDC_VI30_LBL, IDC_VI30_EDIT}, + {IDC_VI34_LBL, IDC_VI34_EDIT}, + }; + + static constexpr TabRecord VI = TabRecord{sizeof(VIFields), VIFields}; + + static constexpr FieldPair AIFields[] = + { + {IDC_AI00_LBL, IDC_AI00_EDIT}, + {IDC_AI04_LBL, IDC_AI04_EDIT}, + {IDC_AI08_LBL, IDC_AI08_EDIT}, + {IDC_AI0C_LBL, IDC_AI0C_EDIT}, + {IDC_AI10_LBL, IDC_AI10_EDIT}, + {IDC_AI14_LBL, IDC_AI14_EDIT}, + }; + + static constexpr TabRecord AI = TabRecord{sizeof(AIFields), AIFields}; + + static constexpr FieldPair PIFields[] = + { + {IDC_PI00_LBL, IDC_PI00_EDIT}, + {IDC_PI04_LBL, IDC_PI04_EDIT}, + {IDC_PI08_LBL, IDC_PI08_EDIT}, + {IDC_PI0C_LBL, IDC_PI0C_EDIT}, + {IDC_PI10_LBL, IDC_PI10_EDIT}, + {IDC_PI14_LBL, IDC_PI14_EDIT}, + {IDC_PI18_LBL, IDC_PI18_EDIT}, + {IDC_PI1C_LBL, IDC_PI1C_EDIT}, + {IDC_PI20_LBL, IDC_PI20_EDIT}, + {IDC_PI24_LBL, IDC_PI24_EDIT}, + {IDC_PI28_LBL, IDC_PI28_EDIT}, + {IDC_PI2C_LBL, IDC_PI2C_EDIT}, + {IDC_PI30_LBL, IDC_PI30_EDIT}, + }; + + static constexpr TabRecord PI = TabRecord{sizeof(PIFields), PIFields}; + + static constexpr FieldPair RIFields[] = + { + {IDC_RI00_LBL, IDC_RI00_EDIT}, + {IDC_RI04_LBL, IDC_RI04_EDIT}, + {IDC_RI08_LBL, IDC_RI08_EDIT}, + {IDC_RI0C_LBL, IDC_RI0C_EDIT}, + {IDC_RI10_LBL, IDC_RI10_EDIT}, + {IDC_RI14_LBL, IDC_RI14_EDIT}, + {IDC_RI18_LBL, IDC_RI18_EDIT}, + {IDC_RI1C_LBL, IDC_RI1C_EDIT}, + }; + + static constexpr TabRecord RI = TabRecord{sizeof(RIFields), RIFields}; + + static constexpr FieldPair SIFields[] = + { + {IDC_SI00_LBL, IDC_SI00_EDIT}, + {IDC_SI04_LBL, IDC_SI04_EDIT}, + {IDC_SI08_LBL, IDC_SI08_EDIT}, + {IDC_SI0C_LBL, IDC_SI0C_EDIT}, + }; + + static constexpr TabRecord SI = TabRecord{sizeof(SIFields), SIFields}; + + static constexpr FieldPair DDFields[] = + { + {IDC_DD00_LBL, IDC_DD00_EDIT}, + {IDC_DD04_LBL, IDC_DD04_EDIT}, + {IDC_DD08_LBL, IDC_DD08_EDIT}, + {IDC_DD0C_LBL, IDC_DD0C_EDIT}, + {IDC_DD10_LBL, IDC_DD10_EDIT}, + {IDC_DD14_LBL, IDC_DD14_EDIT}, + {IDC_DD18_LBL, IDC_DD18_EDIT}, + {IDC_DD1C_LBL, IDC_DD1C_EDIT}, + {IDC_DD20_LBL, IDC_DD20_EDIT}, + {IDC_DD24_LBL, IDC_DD24_EDIT}, + {IDC_DD28_LBL, IDC_DD28_EDIT}, + {IDC_DD2C_LBL, IDC_DD2C_EDIT}, + {IDC_DD30_LBL, IDC_DD30_EDIT}, + {IDC_DD34_LBL, IDC_DD34_EDIT}, + {IDC_DD38_LBL, IDC_DD38_EDIT}, + {IDC_DD3C_LBL, IDC_DD3C_EDIT}, + {IDC_DD40_LBL, IDC_DD40_EDIT}, + {IDC_DD44_LBL, IDC_DD44_EDIT}, + {IDC_DD48_LBL, IDC_DD48_EDIT}, + }; + + static constexpr TabRecord DD = TabRecord{sizeof(DDFields), DDFields}; +}; \ No newline at end of file diff --git a/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.cpp b/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.cpp index dd84a96e9..22d74ba56 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.cpp @@ -45,36 +45,36 @@ void CRegisterTabs::Attach(HWND hWndNew, CDebuggerUI* debugger) m_SITab = AddTab("SI", IDD_Debugger_RegSI, TabProcDefault); m_DDTab = AddTab("DD", IDD_Debugger_RegDD, TabProcDefault); - InitRegisterEdits64(m_GPRTab, m_GPREdits, GPREditIds, sizeof(GPREditIds) / sizeof(GPREditIds[0])); - InitRegisterEdit64(m_GPRTab, m_HIEdit, IDC_HI_EDIT); - InitRegisterEdit64(m_GPRTab, m_LOEdit, IDC_LO_EDIT); + InitRegisterEdits64(m_GPRTab, m_GPREdits, &TabData::GPR); + InitRegisterEdit64(m_GPRTab, m_HIEdit, GPRHi); + InitRegisterEdit64(m_GPRTab, m_LOEdit, GPRLo); - InitRegisterEdits(m_FPRTab, m_FPREdits, FPREditIds, sizeof(FPREditIds) / sizeof(FPREditIds[0])); - InitRegisterEdit(m_FPRTab, m_FCSREdit, IDC_FCSR_EDIT); + InitRegisterEdits(m_FPRTab, m_FPREdits, &TabData::FPR); + InitRegisterEdit(m_FPRTab, m_FCSREdit, FPRFCSR); - InitRegisterEdits(m_COP0Tab, m_COP0Edits, COP0EditIds, sizeof(COP0EditIds) / sizeof(COP0EditIds[0])); + InitRegisterEdits(m_COP0Tab, m_COP0Edits, &TabData::COP0); m_CauseTip.Attach(m_COP0Tab.GetDlgItem(IDC_CAUSE_TIP)); - InitRegisterEdits(m_RDRAMTab, m_RDRAMEdits, RDRAMEditIds, sizeof(RDRAMEditIds) / sizeof(RDRAMEditIds[0])); + InitRegisterEdits(m_RDRAMTab, m_RDRAMEdits, &TabData::RDRAM); - InitRegisterEdits(m_SPTab, m_SPEdits, SPEditIds, sizeof(SPEditIds) / sizeof(SPEditIds[0])); - InitRegisterEdit(m_SPTab, m_SPPCEdit, IDC_SP_PC_EDIT); + InitRegisterEdits(m_SPTab, m_SPEdits, &TabData::SP); + InitRegisterEdit(m_SPTab, m_SPPCEdit, SPPC); - InitRegisterEdits(m_DPCTab, m_DPCEdits, DPCEditIds, sizeof(DPCEditIds) / sizeof(DPCEditIds[0])); + InitRegisterEdits(m_DPCTab, m_DPCEdits, &TabData::DPC); - InitRegisterEdits(m_MITab, m_MIEdits, MIEditIds, sizeof(MIEditIds) / sizeof(MIEditIds[0])); + InitRegisterEdits(m_MITab, m_MIEdits, &TabData::MI); - InitRegisterEdits(m_VITab, m_VIEdits, VIEditIds, sizeof(VIEditIds) / sizeof(VIEditIds[0])); + InitRegisterEdits(m_VITab, m_VIEdits, &TabData::VI); - InitRegisterEdits(m_AITab, m_AIEdits, AIEditIds, sizeof(AIEditIds) / sizeof(AIEditIds[0])); + InitRegisterEdits(m_AITab, m_AIEdits, &TabData::AI); - InitRegisterEdits(m_PITab, m_PIEdits, PIEditIds, sizeof(PIEditIds) / sizeof(PIEditIds[0])); + InitRegisterEdits(m_PITab, m_PIEdits, &TabData::PI); - InitRegisterEdits(m_RITab, m_RIEdits, RIEditIds, sizeof(RIEditIds) / sizeof(RIEditIds[0])); + InitRegisterEdits(m_RITab, m_RIEdits, &TabData::RI); - InitRegisterEdits(m_SITab, m_SIEdits, SIEditIds, sizeof(SIEditIds) / sizeof(SIEditIds[0])); + InitRegisterEdits(m_SITab, m_SIEdits, &TabData::SI); - InitRegisterEdits(m_DDTab, m_DDEdits, DDEditIds, sizeof(DDEditIds) / sizeof(DDEditIds[0])); + InitRegisterEdits(m_DDTab, m_DDEdits, &TabData::DD); SetColorsEnabled(false); RefreshEdits(); @@ -112,23 +112,23 @@ void CRegisterTabs::RefreshEdits() { if (g_Reg == NULL) { - ZeroRegisterEdits64(m_GPREdits, sizeof(m_GPREdits) / sizeof(m_GPREdits[0])); + ZeroRegisterEdits64(m_GPREdits, TabData::GPR.FieldCount); ZeroRegisterEdit64(m_HIEdit); ZeroRegisterEdit64(m_LOEdit); - ZeroRegisterEdits(m_FPREdits, sizeof(m_FPREdits) / sizeof(m_FPREdits[0])); + ZeroRegisterEdits(m_FPREdits, TabData::FPR.FieldCount); ZeroRegisterEdit(m_FCSREdit); - ZeroRegisterEdits(m_COP0Edits, sizeof(m_COP0Edits) / sizeof(m_COP0Edits[0])); - ZeroRegisterEdits(m_RDRAMEdits, sizeof(m_RDRAMEdits) / sizeof(m_RDRAMEdits[0])); - ZeroRegisterEdits(m_SPEdits, sizeof(m_SPEdits) / sizeof(m_SPEdits[0])); + ZeroRegisterEdits(m_COP0Edits, TabData::COP0.FieldCount); + ZeroRegisterEdits(m_RDRAMEdits, TabData::RDRAM.FieldCount); + ZeroRegisterEdits(m_SPEdits, TabData::SP.FieldCount); ZeroRegisterEdit(m_SPPCEdit); - ZeroRegisterEdits(m_DPCEdits, sizeof(m_DPCEdits) / sizeof(m_DPCEdits[0])); - ZeroRegisterEdits(m_MIEdits, sizeof(m_MIEdits) / sizeof(m_MIEdits[0])); - ZeroRegisterEdits(m_VIEdits, sizeof(m_VIEdits) / sizeof(m_VIEdits[0])); - ZeroRegisterEdits(m_AIEdits, sizeof(m_AIEdits) / sizeof(m_AIEdits[0])); - ZeroRegisterEdits(m_PIEdits, sizeof(m_PIEdits) / sizeof(m_PIEdits[0])); - ZeroRegisterEdits(m_RIEdits, sizeof(m_RIEdits) / sizeof(m_RIEdits[0])); - ZeroRegisterEdits(m_SIEdits, sizeof(m_SIEdits) / sizeof(m_SIEdits[0])); - ZeroRegisterEdits(m_DDEdits, sizeof(m_DDEdits) / sizeof(m_DDEdits[0])); + ZeroRegisterEdits(m_DPCEdits, TabData::DPC.FieldCount); + ZeroRegisterEdits(m_MIEdits, TabData::MI.FieldCount); + ZeroRegisterEdits(m_VIEdits, TabData::VI.FieldCount); + ZeroRegisterEdits(m_AIEdits, TabData::AI.FieldCount); + ZeroRegisterEdits(m_PIEdits, TabData::PI.FieldCount); + ZeroRegisterEdits(m_RIEdits, TabData::RI.FieldCount); + ZeroRegisterEdits(m_SIEdits, TabData::SI.FieldCount); + ZeroRegisterEdits(m_DDEdits, TabData::DD.FieldCount); return; } @@ -300,7 +300,7 @@ void CRegisterTabs::RegisterChanged(HWND hDlg, TAB_ID srcTabId, WPARAM wParam) } else { - int nReg = GetCtrlRegNum(ctrlId, GPREditIds); + int nReg = TabData::GPR.GetEditIndex(ctrlId); g_Reg->m_GPR[nReg].UDW = value; } return; @@ -318,7 +318,7 @@ void CRegisterTabs::RegisterChanged(HWND hDlg, TAB_ID srcTabId, WPARAM wParam) return; } - int nReg = GetCtrlRegNum(ctrlId, FPREditIds); + int nReg = TabData::FPR.GetEditIndex(ctrlId); *(uint32_t*)g_Reg->m_FPR_S[nReg] = value; return; } @@ -515,7 +515,7 @@ INT_PTR CALLBACK CRegisterTabs::TabProcGPR(HWND hDlg, UINT msg, WPARAM wParam, L } else { - int nReg = GetCtrlRegNum(ctrlId, GPREditIds); + int nReg = TabData::GPR.GetEditIndex(ctrlId); if (nReg == -1) { @@ -583,7 +583,7 @@ INT_PTR CALLBACK CRegisterTabs::TabProcGPR(HWND hDlg, UINT msg, WPARAM wParam, L } else { - int nReg = GetCtrlRegNum(ctrlId, GPRLabelIds); + int nReg = TabData::GPR.GetLabelIndex(ctrlId); if (nReg <= 0) // ignore R0 { @@ -620,7 +620,7 @@ INT_PTR CALLBACK CRegisterTabs::TabProcGPR(HWND hDlg, UINT msg, WPARAM wParam, L } else { - int nReg = GetCtrlRegNum(ctrlId, GPRLabelIds); + int nReg = TabData::GPR.GetLabelIndex(ctrlId); if (nReg <= 0) // ignore R0 { @@ -668,7 +668,7 @@ INT_PTR CALLBACK CRegisterTabs::TabProcGPR(HWND hDlg, UINT msg, WPARAM wParam, L } else { - int nReg = GetCtrlRegNum(ctrlId, GPRLabelIds); + int nReg = TabData::GPR.GetLabelIndex(ctrlId); if (nReg == -1) { @@ -788,30 +788,30 @@ void CRegisterTabs::SetColorsEnabled(bool bColorsEnabled) m_bColorsEnabled = bColorsEnabled; } -void CRegisterTabs::InitRegisterEdit(CWindow& tab, CEditNumber32& edit, WORD ctrlId) +void CRegisterTabs::InitRegisterEdit(CWindow& tab, CEditNumber32& edit, FieldPair ctrl) { - edit.Attach(tab.GetDlgItem(ctrlId)); + edit.Attach(tab.GetDlgItem(ctrl.EditId)); edit.SetDisplayType(CEditNumber32::DisplayHex); } -void CRegisterTabs::InitRegisterEdits(CWindow& tab, CEditNumber32* edits, const WORD* ctrlIds, uint32_t ctrlIdsCount) +void CRegisterTabs::InitRegisterEdits(CWindow& tab, CEditNumber32* edits, const TabRecord* ctrlIds) { - for (int i = 0, n = ctrlIdsCount; i < n; i++) + for (int i = 0, n = ctrlIds->FieldCount; i < n; i++) { - InitRegisterEdit(tab, edits[i], ctrlIds[i]); + InitRegisterEdit(tab, edits[i], ctrlIds->Fields[i]); } } -void CRegisterTabs::InitRegisterEdit64(CWindow& tab, CEditReg64& edit, WORD ctrlId) +void CRegisterTabs::InitRegisterEdit64(CWindow& tab, CEditReg64& edit, FieldPair ctrl) { - edit.Attach(tab.GetDlgItem(ctrlId)); + edit.Attach(tab.GetDlgItem(ctrl.EditId)); } -void CRegisterTabs::InitRegisterEdits64(CWindow& tab, CEditReg64* edits, const WORD* ctrlIds, uint32_t ctrlIdsCount) +void CRegisterTabs::InitRegisterEdits64(CWindow& tab, CEditReg64* edits, const TabRecord* ctrlIds) { - for (int i = 0, n = ctrlIdsCount; i < n; i++) + for (int i = 0, n = ctrlIds->FieldCount; i < n; i++) { - InitRegisterEdit64(tab, edits[i], ctrlIds[i]); + InitRegisterEdit64(tab, edits[i], ctrlIds->Fields[i]); } } @@ -841,8 +841,124 @@ void CRegisterTabs::ZeroRegisterEdits64(CEditReg64* edits, uint32_t ctrlIdsCount } } -// CEditReg64 for GPR +void CRegisterTabs::CopyTabRegisters() { + int nPage = GetCurSel(); + stdstr str = CopyTabRegisters(nPage); + HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, str.length() + 1); + strncpy((char*)GlobalLock(hMem), str.c_str(), str.length()); + GlobalUnlock(hMem); + OpenClipboard(); + EmptyClipboard(); + SetClipboardData(CF_TEXT, hMem); + CloseClipboard(); +} + +void CRegisterTabs::CopyAllRegisters() { + stdstr str; + for (int i = 0; i <= 12; i++) { + if (!str.empty()) str += "\r\n"; + str += CopyTabRegisters(i); + } + + HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, str.length() + 1); + strncpy((char*)GlobalLock(hMem), str.c_str(), str.length()); + GlobalUnlock(hMem); + OpenClipboard(); + EmptyClipboard(); + SetClipboardData(CF_TEXT, hMem); + CloseClipboard(); +} + +stdstr CRegisterTabs::CopyTabRegisters(int id) +{ + CWindow tab = m_TabWindows[id]; + stdstr str; + + TCITEM item = {0}; + TCHAR buffer[30]; + item.mask = TCIF_TEXT; + item.cchTextMax = 30; + item.pszText = buffer; + GetItem(id, &item); + + str += item.pszText; + + const TabRecord *record = nullptr; + switch (id) + { + case 0: record = &TabData::GPR; break; + case 1: record = &TabData::FPR; break; + case 2: record = &TabData::COP0; break; + case 3: + record = &TabData::RDRAM; + str += " (A3F00000)"; + break; + case 4: + record = &TabData::SP; + str += " (A4040000)"; + break; + case 5: + record = &TabData::DPC; + str += " (A4100000)"; + break; + case 6: + record = &TabData::MI; + str += " (A4300000)"; + break; + case 7: + record = &TabData::VI; + str += " (A4400000)"; + break; + case 8: + record = &TabData::AI; + str += " (A4500000)"; + break; + case 9: + record = &TabData::PI; + str += " (A4600000)"; + break; + case 10: + record = &TabData::RI; + str += " (A4700000)"; + break; + case 11: + record = &TabData::SI; + str += " (A4800000)"; + break; + case 12: + record = &TabData::DD; + str += " (A5000500)"; + break; + } + + record->Iterate(&tab, [&str](const CWindow *label, const CWindow *edit) + { + str += stdstr_f( + "\r\n%s %s", + ::GetCWindowText(label).c_str(), + ::GetCWindowText(edit).c_str()); + }); + + switch (id) + { + case 0: + str += stdstr_f("\r\nHI %s", m_HIEdit.GetValueText().c_str()); + str += stdstr_f("\r\nLO %s", m_LOEdit.GetValueText().c_str()); + break; + case 1: + str += stdstr_f("\r\nFCSR %s", m_FCSREdit.GetValueText().c_str()); + break; + case 4: + str += stdstr_f("\r\nSP (A4080000)\r\n00 SP_PC %s", m_SPPCEdit.GetValueText().c_str()); + break; + } + + str += "\r\n"; + return str; +} + +// CEditReg64 for GPR uint64_t CEditReg64::ParseValue(char* wordPair) { uint32_t a, b; @@ -923,6 +1039,11 @@ uint64_t CEditReg64::GetValue() return ParseValue(text); } +stdstr CEditReg64::GetValueText() +{ + return ::GetCWindowText(this); +} + LRESULT CEditReg64::OnLostFocus(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) { SetValue(GetValue()); // clean up diff --git a/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.h b/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.h index 359926c3c..60206e5b1 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.h +++ b/Source/Project64/UserInterface/Debugger/Debugger-RegisterTabs.h @@ -10,6 +10,7 @@ ****************************************************************************/ #pragma once #include "Breakpoints.h" +#include "Debugger-RegisterTabData.h" class CEditReg64 : public CWindowImpl, @@ -21,6 +22,7 @@ public: LRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnLostFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); uint64_t GetValue(); + stdstr GetValueText(); void SetValue(uint32_t h, uint32_t l); void SetValue(uint64_t value); @@ -54,21 +56,27 @@ public: void RedrawCurrentTab(); void RefreshEdits(); void SetColorsEnabled(bool bColorsEnabled); + void CopyTabRegisters(); + void CopyAllRegisters(); private: CRegisterTabs(const CRegisterTabs&); // Disable copy constructor CRegisterTabs& operator=(const CRegisterTabs&); // Disable assignment + stdstr CopyTabRegisters(int id); + static void RegisterChanged(HWND hDlg, TAB_ID srcTabId, WPARAM wParam); static INT_PTR CALLBACK TabProcDefault(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK TabProcGPR(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK TabProcFPR(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); - static void InitRegisterEdit(CWindow& tab, CEditNumber32& edit, WORD ctrlId); - static void InitRegisterEdits(CWindow& tab, CEditNumber32* edits, const WORD* ctrlIds, uint32_t ctrlIdsCount); - static void InitRegisterEdit64(CWindow& tab, CEditReg64& edit, WORD ctrlId); - static void InitRegisterEdits64(CWindow& tab, CEditReg64* edits, const WORD* ctrlIds, uint32_t ctrlIdsCount); + + static void InitRegisterEdit(CWindow& tab, CEditNumber32& edit, FieldPair ctrl); + static void InitRegisterEdits(CWindow& tab, CEditNumber32* edits, const TabRecord* ctrlIds); + static void InitRegisterEdit64(CWindow& tab, CEditReg64& edit, FieldPair ctrl); + static void InitRegisterEdits64(CWindow& tab, CEditReg64* edits, const TabRecord* ctrlIds); + static void ZeroRegisterEdit(CEditNumber32& edit); static void ZeroRegisterEdits(CEditNumber32* edits, uint32_t ctrlIdsCount); static void ZeroRegisterEdit64(CEditReg64& edit); @@ -91,143 +99,12 @@ private: }; } CAUSE; - static constexpr WORD GPRLabelIds[] = - { - IDC_R0_LBL, IDC_R1_LBL, IDC_R2_LBL, IDC_R3_LBL, - IDC_R4_LBL, IDC_R5_LBL, IDC_R6_LBL, IDC_R7_LBL, - IDC_R8_LBL, IDC_R9_LBL, IDC_R10_LBL, IDC_R11_LBL, - IDC_R12_LBL, IDC_R13_LBL, IDC_R14_LBL, IDC_R15_LBL, - IDC_R16_LBL, IDC_R17_LBL, IDC_R18_LBL, IDC_R19_LBL, - IDC_R20_LBL, IDC_R21_LBL, IDC_R22_LBL, IDC_R23_LBL, - IDC_R24_LBL, IDC_R25_LBL, IDC_R26_LBL, IDC_R27_LBL, - IDC_R28_LBL, IDC_R29_LBL, IDC_R30_LBL, IDC_R31_LBL, - NULL - }; + static constexpr FieldPair GPRHi = {IDC_HI_LBL, IDC_HI_EDIT}; + static constexpr FieldPair GPRLo = {IDC_LO_LBL, IDC_LO_EDIT}; - static constexpr WORD GPREditIds[] = - { - IDC_R0_EDIT, IDC_R1_EDIT, IDC_R2_EDIT, IDC_R3_EDIT, - IDC_R4_EDIT, IDC_R5_EDIT, IDC_R6_EDIT, IDC_R7_EDIT, - IDC_R8_EDIT, IDC_R9_EDIT, IDC_R10_EDIT, IDC_R11_EDIT, - IDC_R12_EDIT, IDC_R13_EDIT, IDC_R14_EDIT, IDC_R15_EDIT, - IDC_R16_EDIT, IDC_R17_EDIT, IDC_R18_EDIT, IDC_R19_EDIT, - IDC_R20_EDIT, IDC_R21_EDIT, IDC_R22_EDIT, IDC_R23_EDIT, - IDC_R24_EDIT, IDC_R25_EDIT, IDC_R26_EDIT, IDC_R27_EDIT, - IDC_R28_EDIT, IDC_R29_EDIT, IDC_R30_EDIT, IDC_R31_EDIT, - NULL - }; + static constexpr FieldPair FPRFCSR = {IDC_FCSR_LBL, IDC_FCSR_EDIT}; - static constexpr WORD FPREditIds[] = - { - IDC_F0_EDIT, IDC_F1_EDIT, IDC_F2_EDIT, IDC_F3_EDIT, - IDC_F4_EDIT, IDC_F5_EDIT, IDC_F6_EDIT, IDC_F7_EDIT, - IDC_F8_EDIT, IDC_F9_EDIT, IDC_F10_EDIT, IDC_F11_EDIT, - IDC_F12_EDIT, IDC_F13_EDIT, IDC_F14_EDIT, IDC_F15_EDIT, - IDC_F16_EDIT, IDC_F17_EDIT, IDC_F18_EDIT, IDC_F19_EDIT, - IDC_F20_EDIT, IDC_F21_EDIT, IDC_F22_EDIT, IDC_F23_EDIT, - IDC_F24_EDIT, IDC_F25_EDIT, IDC_F26_EDIT, IDC_F27_EDIT, - IDC_F28_EDIT, IDC_F29_EDIT, IDC_F30_EDIT, IDC_F31_EDIT, - NULL - }; - - static constexpr WORD COP0EditIds[] = - { - IDC_COP0_0_EDIT, IDC_COP0_1_EDIT, IDC_COP0_2_EDIT, IDC_COP0_3_EDIT, - IDC_COP0_4_EDIT, IDC_COP0_5_EDIT, IDC_COP0_6_EDIT, IDC_COP0_7_EDIT, - IDC_COP0_8_EDIT, IDC_COP0_9_EDIT, IDC_COP0_10_EDIT, IDC_COP0_11_EDIT, - IDC_COP0_12_EDIT, IDC_COP0_13_EDIT, IDC_COP0_14_EDIT, IDC_COP0_15_EDIT, - IDC_COP0_16_EDIT, IDC_COP0_17_EDIT, IDC_COP0_18_EDIT, - NULL - }; - - static constexpr WORD RDRAMEditIds[] = - { - IDC_RDRAM00_EDIT, IDC_RDRAM04_EDIT, IDC_RDRAM08_EDIT, IDC_RDRAM0C_EDIT, - IDC_RDRAM10_EDIT, IDC_RDRAM14_EDIT, IDC_RDRAM18_EDIT, IDC_RDRAM1C_EDIT, - IDC_RDRAM20_EDIT, IDC_RDRAM24_EDIT, - NULL - }; - - static constexpr WORD SPEditIds[] = - { - IDC_SP00_EDIT, IDC_SP04_EDIT, IDC_SP08_EDIT, IDC_SP0C_EDIT, - IDC_SP10_EDIT, IDC_SP14_EDIT, IDC_SP18_EDIT, IDC_SP1C_EDIT, - NULL - }; - - static constexpr WORD DPCEditIds[] = - { - IDC_DPC00_EDIT, IDC_DPC04_EDIT, IDC_DPC08_EDIT, IDC_DPC0C_EDIT, - IDC_DPC10_EDIT, IDC_DPC14_EDIT, IDC_DPC18_EDIT, IDC_DPC1C_EDIT, - NULL - }; - - static constexpr WORD MIEditIds[] = - { - IDC_MI00_EDIT, IDC_MI04_EDIT, IDC_MI08_EDIT, IDC_MI0C_EDIT, - NULL - }; - - static constexpr WORD VIEditIds[] = - { - IDC_VI00_EDIT, IDC_VI04_EDIT, IDC_VI08_EDIT, IDC_VI0C_EDIT, - IDC_VI10_EDIT, IDC_VI14_EDIT, IDC_VI18_EDIT, IDC_VI1C_EDIT, - IDC_VI20_EDIT, IDC_VI24_EDIT, IDC_VI28_EDIT, IDC_VI2C_EDIT, - IDC_VI30_EDIT, IDC_VI34_EDIT, - NULL - }; - - static constexpr WORD AIEditIds[] = - { - IDC_AI00_EDIT, IDC_AI04_EDIT, IDC_AI08_EDIT, IDC_AI0C_EDIT, - IDC_AI10_EDIT, IDC_AI14_EDIT, - NULL - }; - - static constexpr WORD PIEditIds[] = - { - IDC_PI00_EDIT, IDC_PI04_EDIT, IDC_PI08_EDIT, IDC_PI0C_EDIT, - IDC_PI10_EDIT, IDC_PI14_EDIT, IDC_PI18_EDIT, IDC_PI1C_EDIT, - IDC_PI20_EDIT, IDC_PI24_EDIT, IDC_PI28_EDIT, IDC_PI2C_EDIT, - IDC_PI30_EDIT, - NULL - }; - - static constexpr WORD RIEditIds[] = - { - IDC_RI00_EDIT, IDC_RI04_EDIT, IDC_RI08_EDIT, IDC_RI0C_EDIT, - IDC_RI10_EDIT, IDC_RI14_EDIT, IDC_RI18_EDIT, IDC_RI1C_EDIT, - NULL - }; - - static constexpr WORD SIEditIds[] = - { - IDC_SI00_EDIT, IDC_SI04_EDIT, IDC_SI08_EDIT, IDC_SI0C_EDIT, - NULL - }; - - static constexpr WORD DDEditIds[] = - { - IDC_DD00_EDIT, IDC_DD04_EDIT, IDC_DD08_EDIT, IDC_DD0C_EDIT, - IDC_DD10_EDIT, IDC_DD14_EDIT, IDC_DD18_EDIT, IDC_DD1C_EDIT, - IDC_DD20_EDIT, IDC_DD24_EDIT, IDC_DD28_EDIT, IDC_DD2C_EDIT, - IDC_DD30_EDIT, IDC_DD34_EDIT, IDC_DD38_EDIT, IDC_DD3C_EDIT, - IDC_DD40_EDIT, IDC_DD44_EDIT, IDC_DD48_EDIT, - NULL - }; - - // return reg num associated with the control or -1 if ctrl isn't in map - static int GetCtrlRegNum(WORD ctrlId, const WORD* map) - { - for (uint32_t i = 0; map[i] != NULL; i++) - { - if (map[i] == ctrlId) - { - return i; - } - } - return -1; - } + static constexpr FieldPair SPPC = {IDC_SP_PC_LBL, IDC_SP_PC_EDIT}; static constexpr char* ExceptionCodes[] = { @@ -273,47 +150,46 @@ private: bool m_attached; CWindow m_GPRTab; - CEditReg64 m_GPREdits[sizeof(GPREditIds) / sizeof(GPREditIds[0])]; + CEditReg64 m_GPREdits[TabData::GPR.FieldCount]; CEditReg64 m_HIEdit; CEditReg64 m_LOEdit; CWindow m_FPRTab; - CEditNumber32 m_FPREdits[sizeof(FPREditIds) / sizeof(FPREditIds[0])]; + CEditNumber32 m_FPREdits[TabData::FPR.FieldCount]; CEditNumber32 m_FCSREdit; CWindow m_COP0Tab; - CEditNumber32 m_COP0Edits[sizeof(COP0EditIds) / sizeof(COP0EditIds[0])]; + CEditNumber32 m_COP0Edits[TabData::COP0.FieldCount]; CStatic m_CauseTip; CWindow m_RDRAMTab; - CEditNumber32 m_RDRAMEdits[sizeof(RDRAMEditIds) / sizeof(RDRAMEditIds[0])]; + CEditNumber32 m_RDRAMEdits[TabData::RDRAM.FieldCount]; CWindow m_SPTab; - CEditNumber32 m_SPEdits[sizeof(SPEditIds) / sizeof(SPEditIds[0])]; + CEditNumber32 m_SPEdits[TabData::SP.FieldCount]; CEditNumber32 m_SPPCEdit; CWindow m_DPCTab; - CEditNumber32 m_DPCEdits[sizeof(DPCEditIds) / sizeof(DPCEditIds[0])]; + CEditNumber32 m_DPCEdits[TabData::DPC.FieldCount]; CWindow m_MITab; - CEditNumber32 m_MIEdits[sizeof(MIEditIds) / sizeof(MIEditIds[0])]; + CEditNumber32 m_MIEdits[TabData::MI.FieldCount]; CWindow m_VITab; - CEditNumber32 m_VIEdits[sizeof(VIEditIds) / sizeof(VIEditIds[0])]; + CEditNumber32 m_VIEdits[TabData::VI.FieldCount]; CWindow m_AITab; - CEditNumber32 m_AIEdits[sizeof(AIEditIds) / sizeof(AIEditIds[0])]; + CEditNumber32 m_AIEdits[TabData::AI.FieldCount]; CWindow m_PITab; - CEditNumber32 m_PIEdits[sizeof(PIEditIds) / sizeof(PIEditIds[0])]; + CEditNumber32 m_PIEdits[TabData::PI.FieldCount]; CWindow m_RITab; - CEditNumber32 m_RIEdits[sizeof(RIEditIds) / sizeof(RIEditIds[0])]; + CEditNumber32 m_RIEdits[TabData::RI.FieldCount]; CWindow m_SITab; - CEditNumber32 m_SIEdits[sizeof(SIEditIds) / sizeof(SIEditIds[0])]; + CEditNumber32 m_SIEdits[TabData::SI.FieldCount]; CWindow m_DDTab; - CEditNumber32 m_DDEdits[sizeof(DDEditIds) / sizeof(DDEditIds[0])]; - + CEditNumber32 m_DDEdits[TabData::DD.FieldCount]; }; \ No newline at end of file diff --git a/Source/Project64/UserInterface/UIResources.rc b/Source/Project64/UserInterface/UIResources.rc index 7f36cd33b..53d1209a6 100644 --- a/Source/Project64/UserInterface/UIResources.rc +++ b/Source/Project64/UserInterface/UIResources.rc @@ -692,6 +692,8 @@ BEGIN GROUPBOX "",IDC_OPCODE_BOX,298,14,119,45,0,WS_EX_TRANSPARENT EDITTEXT IDC_OP_EDIT,458,51,59,12,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | NOT WS_VISIBLE | NOT WS_BORDER SCROLLBAR IDC_SCRL_BAR,284,0,12,327,SBS_VERT + PUSHBUTTON "Copy Tab Registers",IDC_COPYTABREGISTERS_BTN,298,313,70,13 + PUSHBUTTON "Copy All Registers",IDC_COPYALLREGISTERS_BTN,370,313,70,13 END IDD_Debugger_RegGPR DIALOGEX 0, 0, 190, 210 @@ -787,38 +789,38 @@ IDD_Debugger_RegFPR DIALOGEX 0, 0, 125, 210 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "F0",IDC_STATIC,3,15,14,8 - LTEXT "F1",IDC_STATIC,3,26,14,8 - LTEXT "F2",IDC_STATIC,3,37,14,8 - LTEXT "F3",IDC_STATIC,3,48,14,8 - LTEXT "F4",IDC_STATIC,3,59,14,8 - LTEXT "F5",IDC_STATIC,3,70,14,8 - LTEXT "F6",IDC_STATIC,3,81,14,8 - LTEXT "F7",IDC_STATIC,3,92,14,8 - LTEXT "F8",IDC_STATIC,3,103,14,8 - LTEXT "F9",IDC_STATIC,3,114,14,8 - LTEXT "F10",IDC_STATIC,3,125,14,8 - LTEXT "F11",IDC_STATIC,3,136,14,8 - LTEXT "F12",IDC_STATIC,3,147,14,8 - LTEXT "F13",IDC_STATIC,3,158,14,8 - LTEXT "F14",IDC_STATIC,3,169,14,8 - LTEXT "F15",IDC_STATIC,3,180,14,8 - LTEXT "F16",IDC_STATIC,61,15,14,8 - LTEXT "F17",IDC_STATIC,61,26,14,8 - LTEXT "F18",IDC_STATIC,61,37,14,8 - LTEXT "F19",IDC_STATIC,61,48,14,8 - LTEXT "F20",IDC_STATIC,61,59,14,8 - LTEXT "F21",IDC_STATIC,61,70,14,8 - LTEXT "F22",IDC_STATIC,61,81,14,8 - LTEXT "F23",IDC_STATIC,61,92,14,8 - LTEXT "F24",IDC_STATIC,61,103,14,8 - LTEXT "F25",IDC_STATIC,61,114,14,8 - LTEXT "F26",IDC_STATIC,61,125,14,8 - LTEXT "F27",IDC_STATIC,61,136,14,8 - LTEXT "F28",IDC_STATIC,61,147,14,8 - LTEXT "F29",IDC_STATIC,61,158,14,8 - LTEXT "F30",IDC_STATIC,61,169,14,8 - LTEXT "F31",IDC_STATIC,61,180,14,8 + LTEXT "F0",IDC_F0_LBL,3,15,14,8 + LTEXT "F1",IDC_F1_LBL,3,26,14,8 + LTEXT "F2",IDC_F2_LBL,3,37,14,8 + LTEXT "F3",IDC_F3_LBL,3,48,14,8 + LTEXT "F4",IDC_F4_LBL,3,59,14,8 + LTEXT "F5",IDC_F5_LBL,3,70,14,8 + LTEXT "F6",IDC_F6_LBL,3,81,14,8 + LTEXT "F7",IDC_F7_LBL,3,92,14,8 + LTEXT "F8",IDC_F8_LBL,3,103,14,8 + LTEXT "F9",IDC_F9_LBL,3,114,14,8 + LTEXT "F10",IDC_F10_LBL,3,125,14,8 + LTEXT "F11",IDC_F11_LBL,3,136,14,8 + LTEXT "F12",IDC_F12_LBL,3,147,14,8 + LTEXT "F13",IDC_F13_LBL,3,158,14,8 + LTEXT "F14",IDC_F14_LBL,3,169,14,8 + LTEXT "F15",IDC_F15_LBL,3,180,14,8 + LTEXT "F16",IDC_F16_LBL,61,15,14,8 + LTEXT "F17",IDC_F17_LBL,61,26,14,8 + LTEXT "F18",IDC_F18_LBL,61,37,14,8 + LTEXT "F19",IDC_F19_LBL,61,48,14,8 + LTEXT "F20",IDC_F20_LBL,61,59,14,8 + LTEXT "F21",IDC_F21_LBL,61,70,14,8 + LTEXT "F22",IDC_F22_LBL,61,81,14,8 + LTEXT "F23",IDC_F23_LBL,61,92,14,8 + LTEXT "F24",IDC_F24_LBL,61,103,14,8 + LTEXT "F25",IDC_F25_LBL,61,114,14,8 + LTEXT "F26",IDC_F26_LBL,61,125,14,8 + LTEXT "F27",IDC_F27_LBL,61,136,14,8 + LTEXT "F28",IDC_F28_LBL,61,147,14,8 + LTEXT "F29",IDC_F29_LBL,61,158,14,8 + LTEXT "F30",IDC_F30_LBL,61,169,14,8 + LTEXT "F31",IDC_F31_LBL,61,180,14,8 EDITTEXT IDC_F0_EDIT,17,15,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_F1_EDIT,17,26,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_F2_EDIT,17,37,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -851,8 +853,8 @@ BEGIN EDITTEXT IDC_F29_EDIT,75,158,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_F30_EDIT,75,169,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_F31_EDIT,75,180,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT - LTEXT "FCS",IDC_STATIC,3,196,13,9 - EDITTEXT IDC_FCSR_EDIT,17,195,39,9,ES_AUTOHSCROLL + LTEXT "FCS",IDC_FCSR_LBL,3,196,13,9 + EDITTEXT IDC_FCSR_EDIT,17,195,39,9,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT CONTROL "",IDC_STATIC,"Static",SS_GRAYFRAME | SS_SUNKEN,4,192,112,1 LTEXT "CPU Floating Point Registers (COP1)",IDC_STATIC,3,4,119,8 END @@ -874,19 +876,19 @@ IDD_Debugger_RegPI DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 PI_DRAM_ADDR_REG",IDC_STATIC,3,29,94,8 - LTEXT "04 PI_CART_ADDR_REG",IDC_STATIC,3,39,94,8 - LTEXT "08 PI_RD_LEN_REG",IDC_STATIC,3,50,94,8 - LTEXT "0C PI_WR_LEN_REG",IDC_STATIC,3,61,94,8 - LTEXT "10 PI_STATUS_REG",IDC_STATIC,3,72,94,8 - LTEXT "14 PI_BSD_DOM1_LAT_REG",IDC_STATIC,3,83,94,8 - LTEXT "18 PI_BSD_DOM1_PWD_REG",IDC_STATIC,3,94,94,8 - LTEXT "1C PI_BSD_DOM1_PGS_REG",IDC_STATIC,3,105,94,8 - LTEXT "20 PI_BSD_DOM1_RLS_REG",IDC_STATIC,3,116,94,8 - LTEXT "24 PI_BSD_DOM2_LAT_REG",IDC_STATIC,3,127,94,8 - LTEXT "28 PI_BSD_DOM2_PWD_REG",IDC_STATIC,3,138,94,8 - LTEXT "2C PI_BSD_DOM2_PGS_REG",IDC_STATIC,3,149,94,8 - LTEXT "30 PI_BSD_DOM2_RLS_REG",IDC_STATIC,3,160,94,8 + LTEXT "00 PI_DRAM_ADDR_REG",IDC_PI00_LBL,3,29,94,8 + LTEXT "04 PI_CART_ADDR_REG",IDC_PI04_LBL,3,39,94,8 + LTEXT "08 PI_RD_LEN_REG",IDC_PI08_LBL,3,50,94,8 + LTEXT "0C PI_WR_LEN_REG",IDC_PI0C_LBL,3,61,94,8 + LTEXT "10 PI_STATUS_REG",IDC_PI10_LBL,3,72,94,8 + LTEXT "14 PI_BSD_DOM1_LAT_REG",IDC_PI14_LBL,3,83,94,8 + LTEXT "18 PI_BSD_DOM1_PWD_REG",IDC_PI18_LBL,3,94,94,8 + LTEXT "1C PI_BSD_DOM1_PGS_REG",IDC_PI1C_LBL,3,105,94,8 + LTEXT "20 PI_BSD_DOM1_RLS_REG",IDC_PI20_LBL,3,116,94,8 + LTEXT "24 PI_BSD_DOM2_LAT_REG",IDC_PI24_LBL,3,127,94,8 + LTEXT "28 PI_BSD_DOM2_PWD_REG",IDC_PI28_LBL,3,138,94,8 + LTEXT "2C PI_BSD_DOM2_PGS_REG",IDC_PI2C_LBL,3,149,94,8 + LTEXT "30 PI_BSD_DOM2_RLS_REG",IDC_PI30_LBL,3,160,94,8 EDITTEXT IDC_PI00_EDIT,99,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_PI04_EDIT,99,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_PI08_EDIT,99,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -960,25 +962,25 @@ IDD_Debugger_RegCOP0 DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "Index",-1,3,15,33,8 - LTEXT "Random",-1,3,26,33,8 - LTEXT "EntryLo0",-1,3,37,33,8 - LTEXT "EntryLo1",-1,3,48,33,8 - LTEXT "Context",-1,3,59,27,8 - LTEXT "PageMask",-1,3,70,33,8 - LTEXT "Wired",-1,3,81,33,8 - LTEXT "BadVAddr",-1,3,92,33,8 - LTEXT "Count",-1,3,103,33,8 - LTEXT "EntryHi",-1,3,114,33,8 - LTEXT "Compare",-1,3,125,33,8 - LTEXT "Status",-1,3,136,33,8 - LTEXT "Cause",-1,3,147,33,8 - LTEXT "EPC",-1,3,158,33,8 - LTEXT "Config",-1,3,169,33,8 - LTEXT "TagLo",-1,3,180,33,8 - LTEXT "TagHi",-1,87,15,33,8 - LTEXT "ErrorEPC",-1,87,26,33,8 - LTEXT "FakeCause",-1,87,37,37,8 + LTEXT "Index",IDC_COP0_0_LBL,3,15,33,8 + LTEXT "Random",IDC_COP0_1_LBL,3,26,33,8 + LTEXT "EntryLo0",IDC_COP0_2_LBL,3,37,33,8 + LTEXT "EntryLo1",IDC_COP0_3_LBL,3,48,33,8 + LTEXT "Context",IDC_COP0_4_LBL,3,59,27,8 + LTEXT "PageMask",IDC_COP0_5_LBL,3,70,33,8 + LTEXT "Wired",IDC_COP0_6_LBL,3,81,33,8 + LTEXT "BadVAddr",IDC_COP0_7_LBL,3,92,33,8 + LTEXT "Count",IDC_COP0_8_LBL,3,103,33,8 + LTEXT "EntryHi",IDC_COP0_9_LBL,3,114,33,8 + LTEXT "Compare",IDC_COP0_10_LBL,3,125,33,8 + LTEXT "Status",IDC_COP0_11_LBL,3,136,33,8 + LTEXT "Cause",IDC_COP0_12_LBL,3,147,33,8 + LTEXT "EPC",IDC_COP0_13_LBL,3,158,33,8 + LTEXT "Config",IDC_COP0_14_LBL,3,169,33,8 + LTEXT "TagLo",IDC_COP0_15_LBL,3,180,33,8 + LTEXT "TagHi",IDC_COP0_16_LBL,87,15,33,8 + LTEXT "ErrorEPC",IDC_COP0_17_LBL,87,26,33,8 + LTEXT "FakeCause",IDC_COP0_18_LBL,87,37,37,8 EDITTEXT IDC_COP0_0_EDIT,37,15,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_COP0_1_EDIT,37,26,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_COP0_2_EDIT,37,37,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1016,15 +1018,15 @@ IDD_Debugger_RegSP DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 SP_MEM_ADDR_REG",IDC_STATIC,3,29,94,8 - LTEXT "04 SP_DRAM_ADDR_REG",IDC_STATIC,3,39,94,8 - LTEXT "08 SP_RD_LEN_REG",IDC_STATIC,3,50,94,8 - LTEXT "0C SP_WR_LEN_REG",IDC_STATIC,3,61,94,8 - LTEXT "10 SP_STATUS_REG",IDC_STATIC,3,72,94,8 - LTEXT "14 SP_DMA_FULL_REG",IDC_STATIC,3,83,94,8 - LTEXT "18 SP_DMA_BUSY_REG",IDC_STATIC,3,94,76,8 - LTEXT "1C SP_SEMAPHORE_REG",IDC_STATIC,3,105,94,8 - LTEXT "00 SP_PC",IDC_STATIC,3,135,35,8 + LTEXT "00 SP_MEM_ADDR_REG",IDC_SP00_LBL,3,29,94,8 + LTEXT "04 SP_DRAM_ADDR_REG",IDC_SP04_LBL,3,39,94,8 + LTEXT "08 SP_RD_LEN_REG",IDC_SP08_LBL,3,50,94,8 + LTEXT "0C SP_WR_LEN_REG",IDC_SP0C_LBL,3,61,94,8 + LTEXT "10 SP_STATUS_REG",IDC_SP10_LBL,3,72,94,8 + LTEXT "14 SP_DMA_FULL_REG",IDC_SP14_LBL,3,83,94,8 + LTEXT "18 SP_DMA_BUSY_REG",IDC_SP18_LBL,3,94,76,8 + LTEXT "1C SP_SEMAPHORE_REG",IDC_SP1C_LBL,3,105,94,8 + LTEXT "00 SP_PC",IDC_SP_PC_LBL,3,135,35,8 EDITTEXT IDC_SP00_EDIT,99,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_SP04_EDIT,99,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_SP08_EDIT,99,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1043,10 +1045,10 @@ IDD_Debugger_RegMI DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 MI_INIT_MODE/MODE_REG",-1,3,29,102,8 - LTEXT "04 MI_VERSION/NOOP_REG",-1,3,39,92,8 - LTEXT "08 MI_INTR_REG",-1,3,50,56,8 - LTEXT "0C MI_INTR_MASK_REG",-1,3,61,94,8 + LTEXT "00 MI_INIT_MODE/MODE_REG",IDC_MI00_LBL,3,29,102,8 + LTEXT "04 MI_VERSION/NOOP_REG",IDC_MI04_LBL,3,39,92,8 + LTEXT "08 MI_INTR_REG",IDC_MI08_LBL,3,50,56,8 + LTEXT "0C MI_INTR_MASK_REG",IDC_MI0C_LBL,3,61,94,8 EDITTEXT IDC_MI00_EDIT,107,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_MI04_EDIT,107,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_MI08_EDIT,107,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1059,18 +1061,18 @@ IDD_Debugger_RegAI DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 AI_DRAM_ADDR_REG",IDC_STATIC,3,29,94,8 - LTEXT "04 AI_LEN_REG",IDC_STATIC,3,39,94,8 - LTEXT "08 AI_CONTROL_REG",IDC_STATIC,3,50,94,8 - LTEXT "0C AI_STATUS_REG",IDC_STATIC,3,61,94,8 - LTEXT "10 AI_DACRATE_REG",IDC_STATIC,3,72,94,8 + LTEXT "00 AI_DRAM_ADDR_REG",IDC_AI00_LBL,3,29,94,8 + LTEXT "04 AI_LEN_REG",IDC_AI04_LBL,3,39,94,8 + LTEXT "08 AI_CONTROL_REG",IDC_AI08_LBL,3,50,94,8 + LTEXT "0C AI_STATUS_REG",IDC_AI0C_LBL,3,61,94,8 + LTEXT "10 AI_DACRATE_REG",IDC_AI10_LBL,3,72,94,8 EDITTEXT IDC_AI00_EDIT,99,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_AI04_EDIT,99,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_AI08_EDIT,99,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_AI0C_EDIT,99,61,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_AI10_EDIT,99,72,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT LTEXT "A4500000",IDC_STATIC,3,16,35,8 - LTEXT "14 AI_BITRATE_REG",IDC_STATIC,3,83,94,8 + LTEXT "14 AI_BITRATE_REG",IDC_AI14_LBL,3,83,94,8 EDITTEXT IDC_AI14_EDIT,99,83,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT LTEXT "Audio Interface",IDC_STATIC,3,4,141,8 END @@ -1079,10 +1081,10 @@ IDD_Debugger_RegSI DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 SI_DRAM_ADDR_REG",-1,3,29,94,8 - LTEXT "04 SI_PIF_ADDR_RD64B_REG",-1,3,39,98,8 - LTEXT "10 SI_PIF_ADDR_WR64B_REG",-1,3,50,100,8 - LTEXT "18 SI_STATUS_REG",-1,3,61,94,8 + LTEXT "00 SI_DRAM_ADDR_REG",IDC_SI00_LBL,3,29,94,8 + LTEXT "04 SI_PIF_ADDR_RD64B_REG",IDC_SI04_LBL,3,39,98,8 + LTEXT "10 SI_PIF_ADDR_WR64B_REG",IDC_SI08_LBL,3,50,100,8 + LTEXT "18 SI_STATUS_REG",IDC_SI0C_LBL,3,61,94,8 EDITTEXT IDC_SI00_EDIT,107,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_SI04_EDIT,107,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_SI08_EDIT,107,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1095,14 +1097,14 @@ IDD_Debugger_RegRI DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 RI_MODE_REG",-1,3,29,94,8 - LTEXT "04 RI_CONFIG_REG",-1,3,39,94,8 - LTEXT "08 RI_CURRENT_LOAD_REG",-1,3,50,94,8 - LTEXT "0C RI_SELECT_REG",-1,3,61,94,8 - LTEXT "10 RI_REFRESH/COUNT_REG",-1,3,72,95,8 - LTEXT "14 RI_LATENCY_REG",-1,3,83,94,8 - LTEXT "18 RI_RERROR_REG",-1,3,94,68,8 - LTEXT "1C RI_WERROR_REG",-1,3,105,94,8 + LTEXT "00 RI_MODE_REG",IDC_RI00_LBL,3,29,94,8 + LTEXT "04 RI_CONFIG_REG",IDC_RI04_LBL,3,39,94,8 + LTEXT "08 RI_CURRENT_LOAD_REG",IDC_RI08_LBL,3,50,94,8 + LTEXT "0C RI_SELECT_REG",IDC_RI0C_LBL,3,61,94,8 + LTEXT "10 RI_REFRESH/COUNT_REG",IDC_RI10_LBL,3,72,95,8 + LTEXT "14 RI_LATENCY_REG",IDC_RI14_LBL,3,83,94,8 + LTEXT "18 RI_RERROR_REG",IDC_RI18_LBL,3,94,68,8 + LTEXT "1C RI_WERROR_REG",IDC_RI1C_LBL,3,105,94,8 EDITTEXT IDC_RI00_EDIT,99,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_RI04_EDIT,99,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_RI08_EDIT,99,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1119,14 +1121,14 @@ IDD_Debugger_RegDPC DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 DPC_START_REG",-1,3,29,94,8 - LTEXT "04 DPC_END_REG",-1,3,39,94,8 - LTEXT "08 DPC_CURRENT_REG",-1,3,50,94,8 - LTEXT "0C DPC_STATUS_REG",-1,3,61,94,8 - LTEXT "10 DPC_CLOCK_REG",-1,3,72,95,8 - LTEXT "14 DPC_BUFBUSY_REG",-1,3,83,94,8 - LTEXT "18 DPC_PIPEBUSY_REG",-1,3,94,77,8 - LTEXT "1C DPC_TMEM_REG",-1,3,105,94,8 + LTEXT "00 DPC_START_REG",IDC_DPC00_LBL,3,29,94,8 + LTEXT "04 DPC_END_REG",IDC_DPC04_LBL,3,39,94,8 + LTEXT "08 DPC_CURRENT_REG",IDC_DPC08_LBL,3,50,94,8 + LTEXT "0C DPC_STATUS_REG",IDC_DPC0C_LBL,3,61,94,8 + LTEXT "10 DPC_CLOCK_REG",IDC_DPC10_LBL,3,72,95,8 + LTEXT "14 DPC_BUFBUSY_REG",IDC_DPC14_LBL,3,83,94,8 + LTEXT "18 DPC_PIPEBUSY_REG",IDC_DPC18_LBL,3,94,77,8 + LTEXT "1C DPC_TMEM_REG",IDC_DPC1C_LBL,3,105,94,8 EDITTEXT IDC_DPC00_EDIT,99,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_DPC04_EDIT,99,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_DPC08_EDIT,99,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1143,14 +1145,14 @@ IDD_Debugger_RegRDRAM DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 RDRAM_CONFIG/DEVICE_TYPE_REG",-1,3,29,128,8 - LTEXT "04 RDRAM_DEVICE_ID_REG",-1,3,39,94,8 - LTEXT "08 RDRAM_DELAY_REG",-1,3,50,94,8 - LTEXT "0C RDRAM_MODE_REG",-1,3,61,107,8 - LTEXT "10 RDRAM_REF_INTERVAL_REG",-1,3,72,109,8 - LTEXT "14 RDRAM_REF_ROW_REG",-1,3,83,109,8 - LTEXT "18 RDRAM_RAS_INTERVAL_REG",-1,3,94,106,8 - LTEXT "1C RDRAM_MIN_INTERVAL_REG",-1,3,105,114,8 + LTEXT "00 RDRAM_CONFIG/DEVICE_TYPE_REG",IDC_RDRAM00_LBL,3,29,128,8 + LTEXT "04 RDRAM_DEVICE_ID_REG",IDC_RDRAM04_LBL,3,39,94,8 + LTEXT "08 RDRAM_DELAY_REG",IDC_RDRAM08_LBL,3,50,94,8 + LTEXT "0C RDRAM_MODE_REG",IDC_RDRAM0C_LBL,3,61,107,8 + LTEXT "10 RDRAM_REF_INTERVAL_REG",IDC_RDRAM10_LBL,3,72,109,8 + LTEXT "14 RDRAM_REF_ROW_REG",IDC_RDRAM14_LBL,3,83,109,8 + LTEXT "18 RDRAM_RAS_INTERVAL_REG",IDC_RDRAM18_LBL,3,94,106,8 + LTEXT "1C RDRAM_MIN_INTERVAL_REG",IDC_RDRAM1C_LBL,3,105,114,8 EDITTEXT IDC_RDRAM00_EDIT,134,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_RDRAM04_EDIT,134,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_RDRAM08_EDIT,134,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1161,8 +1163,8 @@ BEGIN EDITTEXT IDC_RDRAM1C_EDIT,134,105,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT LTEXT "A3F00000",-1,3,16,35,8 LTEXT "RDRAM",-1,3,4,100,8 - LTEXT "20 RDRAM_ADDR_SELECT_REG",-1,3,116,103,8 - LTEXT "24 RDRAM_DEVICE_MANUF_REG",-1,3,127,113,8 + LTEXT "20 RDRAM_ADDR_SELECT_REG",IDC_RDRAM20_LBL,3,116,103,8 + LTEXT "24 RDRAM_DEVICE_MANUF_REG",IDC_RDRAM24_LBL,3,127,113,8 EDITTEXT IDC_RDRAM20_EDIT,134,116,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_RDRAM24_EDIT,134,127,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT END @@ -1171,19 +1173,19 @@ IDD_Debugger_RegVI DIALOGEX 0, 0, 190, 210 STYLE DS_SETFONT | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 VI_STATUS/CONTROL_REG",IDC_STATIC,3,29,103,8 - LTEXT "04 VI_ORIGIN/DRAM_ADDR_REG",IDC_STATIC,3,39,117,8 - LTEXT "0C VI_INTR/V_INTR_REG",IDC_STATIC,3,61,94,8 - LTEXT "10 VI_CURRENT/CURRENT_LINE_REG",IDC_STATIC,3,72,124,8 - LTEXT "14 VI_BURST/TIMING_REG",IDC_STATIC,3,83,94,8 - LTEXT "18 VI_V_SYNC_REG",IDC_STATIC,3,94,94,8 - LTEXT "1C VI_H_SYNC_REG",IDC_STATIC,3,105,66,8 - LTEXT "20 VI_LEAP/H_SYNC_LEAP_REG",IDC_STATIC,3,116,122,8 - LTEXT "24 VI_H_START/H_VIDEO_REG",IDC_STATIC,3,127,121,8 - LTEXT "28 VI_V_START/V_VIDEO_REG",IDC_STATIC,3,138,122,8 - LTEXT "2C VI_V_BURST_REG",IDC_STATIC,3,149,69,8 - LTEXT "30 VI_X_SCALE_REG",IDC_STATIC,3,160,94,8 - LTEXT "34 VI_Y_SCALE_REG",IDC_STATIC,3,171,94,8 + LTEXT "00 VI_STATUS/CONTROL_REG",IDC_VI00_LBL,3,29,103,8 + LTEXT "04 VI_ORIGIN/DRAM_ADDR_REG",IDC_VI04_LBL,3,39,117,8 + LTEXT "0C VI_INTR/V_INTR_REG",IDC_VI0C_LBL,3,61,94,8 + LTEXT "10 VI_CURRENT/CURRENT_LINE_REG",IDC_VI10_LBL,3,72,124,8 + LTEXT "14 VI_BURST/TIMING_REG",IDC_VI14_LBL,3,83,94,8 + LTEXT "18 VI_V_SYNC_REG",IDC_VI18_LBL,3,94,94,8 + LTEXT "1C VI_H_SYNC_REG",IDC_VI1C_LBL,3,105,66,8 + LTEXT "20 VI_LEAP/H_SYNC_LEAP_REG",IDC_VI20_LBL,3,116,122,8 + LTEXT "24 VI_H_START/H_VIDEO_REG",IDC_VI24_LBL,3,127,121,8 + LTEXT "28 VI_V_START/V_VIDEO_REG",IDC_VI28_LBL,3,138,122,8 + LTEXT "2C VI_V_BURST_REG",IDC_VI2C_LBL,3,149,69,8 + LTEXT "30 VI_X_SCALE_REG",IDC_VI30_LBL,3,160,94,8 + LTEXT "34 VI_Y_SCALE_REG",IDC_VI34_LBL,3,171,94,8 EDITTEXT IDC_VI00_EDIT,127,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_VI04_EDIT,127,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_VI08_EDIT,127,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1199,7 +1201,7 @@ BEGIN EDITTEXT IDC_VI30_EDIT,127,160,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT LTEXT "A4400000",IDC_STATIC,3,16,35,8 LTEXT "Video Interface",IDC_STATIC,3,4,100,8 - LTEXT "08 VI_WIDTH/H_WIDTH_REG",IDC_STATIC,3,50,118,8 + LTEXT "08 VI_WIDTH/H_WIDTH_REG",IDC_VI08_LBL,3,50,118,8 EDITTEXT IDC_VI34_EDIT,127,171,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT END @@ -1207,19 +1209,19 @@ IDD_Debugger_RegDD DIALOGEX 0, 0, 190, 238 STYLE DS_SETFONT | WS_CHILD | WS_SYSMENU FONT 9, "Lucida Console", 400, 0, 0x1 BEGIN - LTEXT "00 ASIC_DATA",IDC_STATIC,3,29,103,8 - LTEXT "04 ASIC_MISC_REG",IDC_STATIC,3,39,68,8 - LTEXT "0C ASIC_CUR_TK",IDC_STATIC,3,61,68,8 - LTEXT "10 ASIC_BM_STATUS",IDC_STATIC,3,72,75,8 - LTEXT "14 ASIC_ERR_SECTOR",IDC_STATIC,3,83,79,8 - LTEXT "18 ASIC_SEQ_STATUS",IDC_STATIC,3,94,78,8 - LTEXT "1C ASIC_CUR_SECTOR",IDC_STATIC,3,105,76,8 - LTEXT "20 ASIC_HARD_RESET",IDC_STATIC,3,116,76,8 - LTEXT "24 ASIC_C1_S0",IDC_STATIC,3,127,58,8 - LTEXT "28 ASIC_HOST_SECBYTE",IDC_STATIC,3,138,81,8 - LTEXT "2C ASIC_C1_S2",IDC_STATIC,3,149,52,8 - LTEXT "30 ASIC_SEC_BYTE",IDC_STATIC,3,160,67,8 - LTEXT "34 ASIC_C1_S4",IDC_STATIC,3,171,61,8 + LTEXT "00 ASIC_DATA",IDC_DD00_LBL,3,29,103,8 + LTEXT "04 ASIC_MISC_REG",IDC_DD04_LBL,3,39,68,8 + LTEXT "0C ASIC_CUR_TK",IDC_DD0C_LBL,3,61,68,8 + LTEXT "10 ASIC_BM_STATUS",IDC_DD10_LBL,3,72,75,8 + LTEXT "14 ASIC_ERR_SECTOR",IDC_DD14_LBL,3,83,79,8 + LTEXT "18 ASIC_SEQ_STATUS",IDC_DD18_LBL,3,94,78,8 + LTEXT "1C ASIC_CUR_SECTOR",IDC_DD1C_LBL,3,105,76,8 + LTEXT "20 ASIC_HARD_RESET",IDC_DD20_LBL,3,116,76,8 + LTEXT "24 ASIC_C1_S0",IDC_DD24_LBL,3,127,58,8 + LTEXT "28 ASIC_HOST_SECBYTE",IDC_DD28_LBL,3,138,81,8 + LTEXT "2C ASIC_C1_S2",IDC_DD2C_LBL,3,149,52,8 + LTEXT "30 ASIC_SEC_BYTE",IDC_DD30_LBL,3,160,67,8 + LTEXT "34 ASIC_C1_S4",IDC_DD34_LBL,3,171,61,8 EDITTEXT IDC_DD00_EDIT,87,28,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_DD04_EDIT,87,39,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT EDITTEXT IDC_DD08_EDIT,87,50,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT @@ -1235,17 +1237,17 @@ BEGIN EDITTEXT IDC_DD30_EDIT,87,160,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT LTEXT "A5000500",IDC_STATIC,3,16,35,8 LTEXT "Disk Drive",IDC_STATIC,3,4,100,8 - LTEXT "08 ASIC_STATUS",IDC_STATIC,3,50,58,8 + LTEXT "08 ASIC_STATUS",IDC_DD08_LBL,3,50,58,8 EDITTEXT IDC_DD34_EDIT,87,171,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT - LTEXT "38 ASIC_C1_S6",IDC_STATIC,3,182,63,8 + LTEXT "38 ASIC_C1_S6",IDC_DD38_LBL,3,182,63,8 EDITTEXT IDC_DD38_EDIT,87,182,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT - LTEXT "3C ASIC_CUR_ADDR",IDC_STATIC,3,193,73,8 + LTEXT "3C ASIC_CUR_ADDR",IDC_DD3C_LBL,3,193,73,8 EDITTEXT IDC_DD3C_EDIT,87,193,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT - LTEXT "40 ASIC_ID_REG",IDC_STATIC,3,204,61,8 + LTEXT "40 ASIC_ID_REG",IDC_DD40_LBL,3,204,61,8 EDITTEXT IDC_DD40_EDIT,87,204,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT - LTEXT "44 ASIC_TEST_REG",IDC_STATIC,3,215,82,8 + LTEXT "44 ASIC_TEST_REG",IDC_DD44_LBL,3,215,82,8 EDITTEXT IDC_DD44_EDIT,87,215,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT - LTEXT "48 ASIC_TEST_PIN_SEL",IDC_STATIC,3,226,83,8 + LTEXT "48 ASIC_TEST_PIN_SEL",IDC_DD48_LBL,3,226,83,8 EDITTEXT IDC_DD48_EDIT,87,226,39,10,ES_UPPERCASE | ES_AUTOHSCROLL,WS_EX_RIGHT END diff --git a/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp b/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp index e22c187b3..b52e60e78 100644 --- a/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp +++ b/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp @@ -332,6 +332,11 @@ uint32_t CEditNumber32::GetValue(void) return Value; } +stdstr CEditNumber32::GetValueText(void) +{ + return ::GetCWindowText(this); +} + void CEditNumber32::SetValue(uint32_t Value, DisplayMode Display) { char text[200]; diff --git a/Source/Project64/UserInterface/WTLControls/EditNumber32.h b/Source/Project64/UserInterface/WTLControls/EditNumber32.h index 346e233f4..196af7ad6 100644 --- a/Source/Project64/UserInterface/WTLControls/EditNumber32.h +++ b/Source/Project64/UserInterface/WTLControls/EditNumber32.h @@ -30,6 +30,7 @@ public: BOOL AttachToDlgItem(HWND parent, UINT dlgID); void SetDisplayType(DisplayType Type); uint32_t GetValue(void); + stdstr GetValueText(void); void SetValue(uint32_t Value, DisplayMode Display = DisplayMode::ShowHexIdent); protected: diff --git a/Source/Project64/UserInterface/WTLControls/GetCWindowText.h b/Source/Project64/UserInterface/WTLControls/GetCWindowText.h new file mode 100644 index 000000000..e346b2180 --- /dev/null +++ b/Source/Project64/UserInterface/WTLControls/GetCWindowText.h @@ -0,0 +1,16 @@ +#pragma once + +#include "stdafx.h" + +inline static stdstr GetCWindowText(const CWindow *window) +{ + stdstr Result; + int nLen = ::GetWindowTextLength(window->m_hWnd); + if (nLen == 0) + { + return Result; + } + Result.resize(nLen + 1); + ::GetWindowText(window->m_hWnd, (char *)Result.c_str(), nLen + 1); + return Result; +} \ No newline at end of file diff --git a/Source/Project64/UserInterface/WTLControls/ModifiedEditBox.cpp b/Source/Project64/UserInterface/WTLControls/ModifiedEditBox.cpp index 6947ca425..8f2b9c470 100644 --- a/Source/Project64/UserInterface/WTLControls/ModifiedEditBox.cpp +++ b/Source/Project64/UserInterface/WTLControls/ModifiedEditBox.cpp @@ -79,17 +79,8 @@ void CModifiedEditBox::SetChanged(bool Changed) stdstr CModifiedEditBox::GetWindowText(void) { - stdstr Result; ATLASSERT(::IsWindow(m_hWnd)); - - int nLen = ::GetWindowTextLength(m_hWnd); - if (nLen == 0) - { - return Result; - } - Result.resize(nLen + 1); - ::GetWindowText(m_hWnd, (char *)Result.c_str(), nLen + 1); - return Result; + return ::GetCWindowText(this); } void CModifiedEditBox::SetTextField(HWND hWnd) diff --git a/Source/Project64/UserInterface/resource.h b/Source/Project64/UserInterface/resource.h index 5d3c0e709..b96094cd0 100644 --- a/Source/Project64/UserInterface/resource.h +++ b/Source/Project64/UserInterface/resource.h @@ -715,6 +715,155 @@ #define IDC_MEMTABS 1571 #define IDC_STATUSBAR 1572 #define IDC_CMB_JUMP 1573 +#define IDC_COPYTABREGISTERS_BTN 1574 +#define IDC_F0_LBL 1575 +#define IDC_F1_LBL 1576 +#define IDC_F2_LBL 1577 +#define IDC_F3_LBL 1578 +#define IDC_F4_LBL 1579 +#define IDC_F5_LBL 1580 +#define IDC_F6_LBL 1581 +#define IDC_F7_LBL 1582 +#define IDC_F8_LBL 1583 +#define IDC_F9_LBL 1584 +#define IDC_F10_LBL 1585 +#define IDC_F11_LBL 1586 +#define IDC_F12_LBL 1587 +#define IDC_F13_LBL 1588 +#define IDC_F14_LBL 1589 +#define IDC_F15_LBL 1590 +#define IDC_F16_LBL 1591 +#define IDC_F17_LBL 1592 +#define IDC_F18_LBL 1593 +#define IDC_F19_LBL 1594 +#define IDC_F20_LBL 1595 +#define IDC_F21_LBL 1596 +#define IDC_F22_LBL 1597 +#define IDC_F23_LBL 1598 +#define IDC_F24_LBL 1599 +#define IDC_F25_LBL 1600 +#define IDC_F26_LBL 1601 +#define IDC_F27_LBL 1602 +#define IDC_F28_LBL 1603 +#define IDC_F29_LBL 1604 +#define IDC_F30_LBL 1605 +#define IDC_F31_LBL 1606 +#define IDC_FCSR_LBL 1607 +#define IDC_COP0_0_LBL 1608 +#define IDC_COP0_1_LBL 1609 +#define IDC_COP0_2_LBL 1610 +#define IDC_COP0_3_LBL 1611 +#define IDC_COP0_4_LBL 1612 +#define IDC_COP0_5_LBL 1613 +#define IDC_COP0_6_LBL 1614 +#define IDC_COP0_7_LBL 1615 +#define IDC_COP0_8_LBL 1616 +#define IDC_COP0_9_LBL 1617 +#define IDC_COP0_10_LBL 1618 +#define IDC_COP0_11_LBL 1619 +#define IDC_COP0_12_LBL 1620 +#define IDC_COP0_13_LBL 1621 +#define IDC_COP0_14_LBL 1622 +#define IDC_COP0_15_LBL 1623 +#define IDC_COP0_16_LBL 1624 +#define IDC_COP0_17_LBL 1625 +#define IDC_COP0_18_LBL 1626 +#define IDC_RDRAM00_LBL 1627 +#define IDC_RDRAM04_LBL 1628 +#define IDC_RDRAM08_LBL 1629 +#define IDC_RDRAM0C_LBL 1630 +#define IDC_RDRAM10_LBL 1631 +#define IDC_RDRAM14_LBL 1632 +#define IDC_RDRAM18_LBL 1633 +#define IDC_RDRAM1C_LBL 1634 +#define IDC_RDRAM20_LBL 1635 +#define IDC_RDRAM24_LBL 1636 +#define IDC_SP00_LBL 1637 +#define IDC_SP04_LBL 1638 +#define IDC_SP08_LBL 1639 +#define IDC_SP0C_LBL 1640 +#define IDC_SP10_LBL 1641 +#define IDC_SP14_LBL 1642 +#define IDC_SP18_LBL 1643 +#define IDC_SP1C_LBL 1644 +#define IDC_SP_PC_LBL 1645 +#define IDC_DPC00_LBL 1646 +#define IDC_DPC04_LBL 1647 +#define IDC_DPC08_LBL 1648 +#define IDC_DPC0C_LBL 1649 +#define IDC_DPC10_LBL 1650 +#define IDC_DPC14_LBL 1651 +#define IDC_DPC18_LBL 1652 +#define IDC_DPC1C_LBL 1653 +#define IDC_MI00_LBL 1654 +#define IDC_MI04_LBL 1655 +#define IDC_MI08_LBL 1656 +#define IDC_MI0C_LBL 1657 +#define IDC_VI00_LBL 1658 +#define IDC_VI04_LBL 1659 +#define IDC_VI08_LBL 1660 +#define IDC_VI0C_LBL 1661 +#define IDC_VI10_LBL 1662 +#define IDC_VI14_LBL 1663 +#define IDC_VI18_LBL 1664 +#define IDC_VI1C_LBL 1665 +#define IDC_VI20_LBL 1666 +#define IDC_VI24_LBL 1667 +#define IDC_VI28_LBL 1668 +#define IDC_VI2C_LBL 1669 +#define IDC_VI30_LBL 1670 +#define IDC_VI34_LBL 1671 +#define IDC_AI00_LBL 1672 +#define IDC_AI04_LBL 1673 +#define IDC_AI08_LBL 1674 +#define IDC_AI0C_LBL 1675 +#define IDC_AI10_LBL 1676 +#define IDC_AI14_LBL 1677 +#define IDC_PI00_LBL 1678 +#define IDC_PI04_LBL 1679 +#define IDC_PI08_LBL 1680 +#define IDC_PI0C_LBL 1681 +#define IDC_PI10_LBL 1682 +#define IDC_PI14_LBL 1683 +#define IDC_PI18_LBL 1684 +#define IDC_PI1C_LBL 1685 +#define IDC_PI20_LBL 1686 +#define IDC_PI24_LBL 1687 +#define IDC_PI28_LBL 1688 +#define IDC_PI2C_LBL 1689 +#define IDC_PI30_LBL 1690 +#define IDC_RI00_LBL 1691 +#define IDC_RI04_LBL 1692 +#define IDC_RI08_LBL 1693 +#define IDC_RI0C_LBL 1694 +#define IDC_RI10_LBL 1695 +#define IDC_RI14_LBL 1696 +#define IDC_RI18_LBL 1697 +#define IDC_RI1C_LBL 1698 +#define IDC_SI00_LBL 1699 +#define IDC_SI04_LBL 1700 +#define IDC_SI08_LBL 1701 +#define IDC_SI0C_LBL 1702 +#define IDC_DD00_LBL 1703 +#define IDC_DD04_LBL 1704 +#define IDC_DD08_LBL 1705 +#define IDC_DD0C_LBL 1706 +#define IDC_DD10_LBL 1707 +#define IDC_DD14_LBL 1708 +#define IDC_DD18_LBL 1709 +#define IDC_DD1C_LBL 1710 +#define IDC_DD20_LBL 1711 +#define IDC_DD24_LBL 1712 +#define IDC_DD28_LBL 1713 +#define IDC_DD2C_LBL 1714 +#define IDC_DD30_LBL 1715 +#define IDC_DD34_LBL 1716 +#define IDC_DD38_LBL 1717 +#define IDC_DD3C_LBL 1718 +#define IDC_DD40_LBL 1719 +#define IDC_DD44_LBL 1720 +#define IDC_DD48_LBL 1721 +#define IDC_COPYALLREGISTERS_BTN 1722 #define ID_POPUPMENU_PLAYGAMEWITHDISK 40008 #define ID_POPUPMENU_ADDSYMBOL 40013 #define ID_POPUPMENU_VIEWDISASM 40017 diff --git a/Source/Project64/WTLApp.h b/Source/Project64/WTLApp.h index 3d93b8552..3c87e8054 100644 --- a/Source/Project64/WTLApp.h +++ b/Source/Project64/WTLApp.h @@ -10,6 +10,9 @@ ****************************************************************************/ #pragma once +//Uncomment this to prevent lots of spurious assertions in debug mode +//#define _ASSERTE(expr) ((void)0) + #pragma warning(push) #pragma warning(disable : 4091) // warning C4091: 'typedef ': ignored on left of 'tagGPFIDL_FLAGS' when no variable is declared #pragma warning(disable : 4201) // warning C4201: nonstandard extension used: nameless struct/union @@ -53,6 +56,7 @@ extern CPj64Module _Module; #include #include "UserInterface/resource.h" +#include "UserInterface/WTLControls/GetCWindowText.h" #include "UserInterface/WTLControls/EditNumber32.h" #include "UserInterface/WTLControls/ClistCtrl/ListCtrl.h" #include "UserInterface/WTLControls/ModifiedComboBox.h"