Skip to content
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
161 changes: 105 additions & 56 deletions PJ64.rc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,59 @@ IDB_BITMAP3 BITMAP "PJ64_3.bmp"

IDR_ABOUT_TXT TEXT "About.txt"


/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_MEM_BOOKMARK_EDIT DIALOGEX 0, 0, 239, 105
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Edit Bookmark"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,127,84,50,14
PUSHBUTTON "Cancel",IDCANCEL,182,84,50,14
EDITTEXT IDC_NAME,61,7,171,12,ES_MULTILINE | ES_AUTOHSCROLL
EDITTEXT IDC_START,62,23,170,12,ES_AUTOHSCROLL
EDITTEXT IDC_END,62,39,170,12,ES_AUTOHSCROLL
CONTROL "Virtual Address",IDC_BOOKMARK_VADDR,"Button",BS_AUTORADIOBUTTON,62,54,170,10
CONTROL "Physical Address",IDC_BOOKMARK_PADDR,"Button",BS_AUTORADIOBUTTON,62,66,170,10
LTEXT "Name:",IDC_STATIC,7,9,49,11,0,WS_EX_RIGHT
LTEXT "Start Address:",IDC_STATIC,7,24,49,11,0,WS_EX_RIGHT
LTEXT "End Address:",IDC_STATIC,7,40,49,11,0,WS_EX_RIGHT
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_MEM_BOOKMARK_EDIT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 232
TOPMARGIN, 7
BOTTOMMARGIN, 98
END
END
#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// AFX_DIALOG_LAYOUT
//

IDD_MEM_BOOKMARK_EDIT AFX_DIALOG_LAYOUT
BEGIN
0
END

#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -744,6 +797,57 @@ END
#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// AFX_DIALOG_LAYOUT
//

IDD_Settings_Rom AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_Settings_Options AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_Cheats_CodeEx AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_About AFX_DIALOG_LAYOUT
BEGIN
0
END

MEMORY AFX_DIALOG_LAYOUT
BEGIN
0
END

ROM_INFO_DIALOG AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_Debugger_MemDump AFX_DIALOG_LAYOUT
BEGIN
0
END

BLANK AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_TLB AFX_DIALOG_LAYOUT
BEGIN
0
END


/////////////////////////////////////////////////////////////////////////////
//
// Icon
Expand Down Expand Up @@ -798,7 +902,7 @@ BEGIN
MENUITEM "&Save\tF5", ID_CPU_SAVE, GRAYED
MENUITEM "Save As...\tCtrl+S", ID_CPU_SAVEAS, GRAYED
MENUITEM "&Restore\tF7", ID_CPU_RESTORE, GRAYED
MENUITEM "Restore From\tCtrl+L", ID_CPU_LOAD, GRAYED
MENUITEM "Restore From\tCtrl+L", ID_CPU_LOAD, GRAYED
MENUITEM SEPARATOR
POPUP "Current Save S&tate", GRAYED
BEGIN
Expand All @@ -813,8 +917,6 @@ BEGIN
MENUITEM "Slot 7\t7", ID_CURRENTSAVE_7
MENUITEM "Slot 8\t8", ID_CURRENTSAVE_8
MENUITEM "Slot 9\t9", ID_CURRENTSAVE_9
// Removed this as we now have 0 to 9 - Gent
// MENUITEM "Slot 10\t0", ID_CURRENTSAVE_0
END
MENUITEM SEPARATOR
MENUITEM "Cheats...\tCtrl+C", ID_OPTIONS_CHEATS, GRAYED
Expand Down Expand Up @@ -981,8 +1083,6 @@ BEGIN
VK_F1, ID_CPU_RESET, VIRTKEY, NOINVERT
VK_F7, ID_CPU_RESTORE, VIRTKEY, NOINVERT
VK_F5, ID_CPU_SAVE, VIRTKEY, NOINVERT
// Removed this as we now have 0 to 9 - Gent
// "0", ID_CURRENTSAVE_0, VIRTKEY, NOINVERT
"1", ID_CURRENTSAVE_1, VIRTKEY, NOINVERT
"2", ID_CURRENTSAVE_2, VIRTKEY, NOINVERT
"3", ID_CURRENTSAVE_3, VIRTKEY, NOINVERT
Expand All @@ -1002,57 +1102,6 @@ BEGIN
VK_F4, ID_SYSTEM_LIMITFPS, VIRTKEY, NOINVERT
END


/////////////////////////////////////////////////////////////////////////////
//
// AFX_DIALOG_LAYOUT
//

IDD_Settings_Rom AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_Settings_Options AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_Cheats_CodeEx AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_About AFX_DIALOG_LAYOUT
BEGIN
0
END

MEMORY AFX_DIALOG_LAYOUT
BEGIN
0
END

ROM_INFO_DIALOG AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_Debugger_MemDump AFX_DIALOG_LAYOUT
BEGIN
0
END

BLANK AFX_DIALOG_LAYOUT
BEGIN
0
END

IDD_TLB AFX_DIALOG_LAYOUT
BEGIN
0
END

#endif // English (Australia) resources
/////////////////////////////////////////////////////////////////////////////

Expand Down
7 changes: 6 additions & 1 deletion Project64.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<ObjectFileName>.\Debug\</ObjectFileName>
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<ExceptionHandling>false</ExceptionHandling>
<ExceptionHandling>Sync</ExceptionHandling>
<CompileAs>Default</CompileAs>
<TreatWarningAsError>false</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
Expand Down Expand Up @@ -285,6 +285,7 @@
<ClCompile Include="r4300i Registers.c" />
<ClCompile Include="Real-Time Clock.c" />
<ClCompile Include="RomTools_Common.cpp" />
<ClCompile Include="Sessions.cpp" />
<ClCompile Include="Settings Api.c" />
<ClCompile Include="TLB Display.c" />
<ClCompile Include="Cheat.c" />
Expand Down Expand Up @@ -321,6 +322,8 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="BreakPoints.h" />
<ClInclude Include="cbor-lite\codec-fp.h" />
<ClInclude Include="cbor-lite\codec.h" />
<ClInclude Include="CheatSearch.h" />
<ClInclude Include="CheatSearch_Dev.h" />
<ClInclude Include="CheatSearch_Input.h" />
Expand Down Expand Up @@ -354,6 +357,8 @@
<ClInclude Include="Real-Time Clock.h" />
<ClInclude Include="resource_cheat.h" />
<ClInclude Include="RomTools_Common.h" />
<ClInclude Include="SessionMemBookmarks.h" />
<ClInclude Include="Sessions.h" />
<ClInclude Include="Settings Api.h" />
<ClInclude Include="Settings Common Defines.h" />
<ClInclude Include="tlb Display.h" />
Expand Down
18 changes: 18 additions & 0 deletions Project64.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
<Filter Include="Lib Files">
<UniqueIdentifier>{e8877f6e-d284-4c15-84e8-18cf809faa07}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\cbor-lite Headers">
<UniqueIdentifier>{c59b946f-43e7-4676-8b2b-840d70c41937}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="BreakPoints.c">
Expand Down Expand Up @@ -279,6 +282,9 @@
<ClCompile Include="WatchPoints.cpp">
<Filter>Source Files\Debugger Source</Filter>
</ClCompile>
<ClCompile Include="Sessions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="BreakPoints.h">
Expand Down Expand Up @@ -491,6 +497,18 @@
<ClInclude Include="WatchPoints.h">
<Filter>Header Files\Debugger Headers</Filter>
</ClInclude>
<ClInclude Include="cbor-lite\codec.h">
<Filter>Header Files\cbor-lite Headers</Filter>
</ClInclude>
<ClInclude Include="cbor-lite\codec-fp.h">
<Filter>Header Files\cbor-lite Headers</Filter>
</ClInclude>
<ClInclude Include="SessionMemBookmarks.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Sessions.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PJ64.rc">
Expand Down
40 changes: 40 additions & 0 deletions SessionMemBookmarks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Project 64 - A Nintendo 64 emulator.
*
* (c) Copyright 2023 parasyte (jay@kodewerx.org)
*
* pj64 homepage: www.pj64.net
*
* Permission to use, copy, modify and distribute Project64 in both binary and
* source form, for non-commercial purposes, is hereby granted without fee,
* providing that this license information and copyright notice appear with
* all copies and any derived work.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event shall the authors be held liable for any damages
* arising from the use of this software.
*
* Project64 is freeware for PERSONAL USE only. Commercial users should
* seek permission of the copyright holders first. Commercial use includes
* charging money for Project64 or software derived from Project64.
*
* The copyright holders request that bug fixes and improvements to the code
* should be forwarded to them so if they want them.
*
*/

#include <windows.h>

#pragma once

#define MAX_MEM_BOOKMARKS 1000

struct MEM_BOOKMARK {
char name[100];
unsigned int width_required;
DWORD selection_range[2];
BOOL is_virtual;
};

BOOL Session_Load_MemBookmarks(unsigned int *num_bookmarks, struct MEM_BOOKMARK *bookmarks, unsigned int max_bookmarks, char *filename);
BOOL Session_Save_MemBookmarks(char *filename, struct MEM_BOOKMARK *bookmarks, unsigned int num_bookmarks);
Loading