Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger: copy PSP memory base to clipboard #16994

Merged
merged 2 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Windows/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.VC.VC.opendb
*.VC.db
*.txt
enc_temp_folder
8 changes: 8 additions & 0 deletions Windows/MainWindowMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ namespace MainWindow {
EnableMenuItem(menu, ID_DEBUG_TAKESCREENSHOT, menuEnable);
EnableMenuItem(menu, ID_DEBUG_SHOWDEBUGSTATISTICS, menuInGameEnable);
EnableMenuItem(menu, ID_DEBUG_EXTRACTFILE, menuEnable);
EnableMenuItem(menu, ID_DEBUG_MEMORYBASE, menuInGameEnable);

// While playing, this pop up doesn't work - and probably doesn't make sense.
EnableMenuItem(menu, ID_OPTIONS_LANGUAGE, state == UISTATE_INGAME ? MF_GRAYED : MF_ENABLED);
Expand Down Expand Up @@ -221,6 +222,7 @@ namespace MainWindow {
TranslateMenuItem(menu, ID_DEBUG_GEDEBUGGER, g_Config.bSystemControls ? L"\tCtrl+G" : L"");
TranslateMenuItem(menu, ID_DEBUG_EXTRACTFILE);
TranslateMenuItem(menu, ID_DEBUG_LOG, g_Config.bSystemControls ? L"\tCtrl+L" : L"");
TranslateMenuItem(menu, ID_DEBUG_MEMORYBASE);
TranslateMenuItem(menu, ID_DEBUG_MEMORYVIEW, g_Config.bSystemControls ? L"\tCtrl+M" : L"");

// Options menu
Expand Down Expand Up @@ -822,6 +824,12 @@ namespace MainWindow {
memoryWindow->Show(true);
break;

case ID_DEBUG_MEMORYBASE:
{
W32Util::CopyTextToClipboard(hWnd, ConvertUTF8ToWString(StringFromFormat("%016llx", (uintptr_t)Memory::base)));
break;
}

case ID_DEBUG_EXTRACTFILE:
{
std::string filename;
Expand Down
1 change: 1 addition & 0 deletions Windows/ppsspp.rc
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ BEGIN
MENUITEM "GE Debugger...", ID_DEBUG_GEDEBUGGER
MENUITEM "Extract File...", ID_DEBUG_EXTRACTFILE
MENUITEM "Log Console", ID_DEBUG_LOG
MENUITEM "Copy PSP memory base pointer", ID_DEBUG_MEMORYBASE
MENUITEM "Memory View...", ID_DEBUG_MEMORYVIEW
END

Expand Down
1 change: 1 addition & 0 deletions Windows/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define ID_DEBUG_DISASSEMBLY 119
#define WHEEL_DELTA 120
#define ID_DEBUG_LOG 121
#define ID_DEBUG_MEMORYBASE 122
#define ID_FILE_OPEN_NEW_INSTANCE 123
#define ID_FILE_LOADSTATEFILE 126
#define ID_FILE_SAVESTATEFILE 127
Expand Down