From ff25455062394a88f82edcf81cc046d108d7b35f Mon Sep 17 00:00:00 2001 From: tomvita <68505331+tomvita@users.noreply.github.com> Date: Wed, 2 Sep 2020 14:57:55 +0800 Subject: [PATCH] show save for last title used only --- .vscode/c_cpp_properties.json | 2 +- Makefile | 2 +- include/guis/gui_guide.hpp | 2 +- include/helpers/config.hpp | 1 + romfs/guide/1/1/config.json | 13 +++---------- romfs/guide/1/1/text.txt | 26 +++++++++++++++++++------- source/guis/gui_about.cpp | 26 +++++++++++++------------- source/guis/gui_cheats.cpp | 6 ++++-- source/guis/gui_main.cpp | 2 +- source/helpers/save.cpp | 11 ++++++++++- source/main.cpp | 2 +- 11 files changed, 55 insertions(+), 38 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 6898775e..640e03bc 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -14,7 +14,7 @@ "DEBUG", "SWITCH", "__SWITCH__", - "VERSION_STRING=\"3.1.0\"" + "VERSION_STRING=\"3.7.3\"" ], "compilerPath": "F:/devkitPro/devkitA64/bin/aarch64-none-elf-g++", "cStandard": "c11", diff --git a/Makefile b/Makefile index 6ee5306c..21d1de1e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules #--------------------------------------------------------------------------------- VERSION_MAJOR := 3 VERSION_MINOR := 7 -VERSION_MICRO := 2 +VERSION_MICRO := 3 NIGHTLY := APP_TITLE := EdiZon SE diff --git a/include/guis/gui_guide.hpp b/include/guis/gui_guide.hpp index 62c76999..a7e2849c 100644 --- a/include/guis/gui_guide.hpp +++ b/include/guis/gui_guide.hpp @@ -6,7 +6,7 @@ #include #include -#define GUIDE_PAGE_CNT 10 +#define GUIDE_PAGE_CNT 1 class GuiGuide : public Gui { public: diff --git a/include/helpers/config.hpp b/include/helpers/config.hpp index 26a5e8b5..f3d93fa7 100644 --- a/include/helpers/config.hpp +++ b/include/helpers/config.hpp @@ -12,6 +12,7 @@ namespace Config { char magic[8]; bool hideSX; char latestCommit[40]; + u64 lasttitle = 0; } config_data_t; void readConfig(); diff --git a/romfs/guide/1/1/config.json b/romfs/guide/1/1/config.json index 68aa04bd..c52ce309 100644 --- a/romfs/guide/1/1/config.json +++ b/romfs/guide/1/1/config.json @@ -1,20 +1,13 @@ { "images" : [ - { - "title" : "", - "path" : "banner.bin", - "x" : 0, - "y" : 50, - "w" : 1280, - "h" : 348 - } + ], "text" : [ { - "title" : "Introduction", + "title" : "Introduction to EdiZon SE", "path" : "text.txt", "x" : 50, - "y" : 410 + "y" : 100 } ] } \ No newline at end of file diff --git a/romfs/guide/1/1/text.txt b/romfs/guide/1/1/text.txt index ccbb52e8..956e20d4 100644 --- a/romfs/guide/1/1/text.txt +++ b/romfs/guide/1/1/text.txt @@ -1,7 +1,19 @@ -EdiZon is a all-in-one Homebrew for save file management, save file editing, -memory manipulation and cheat management. This quick start guide will guide you -through all of the features EdiZon has to offer. - -If you have any questions about a topic that isn't covered in this guide (like for example -how to create your own save file editors or cheats) please visit EdiZon's GitHub -Readme and Wiki or join our Discord server. \ No newline at end of file +This fork is based on the foundation of EdiZon 3.1 nightly. The changes made are on the game memory hack aspect. + +Here are the added features: + Range search. + Compare with previous value search. + Bookmark memory location found. + Speed enhancement to make small integer value in first search practicle. + Bookmark adjust to changing main and heap start address on subsequent launch of the game. + Bookmark with pointer chain attached updates memory address dynamically when the chain is able to resolve into a valid memory address. + Extract memory address from dmnt cheat code and add it to bookmark for exploration of the memory location. + Rebase feature to extract potential pointer chain form dmnt cheat code made for previous version of the game. + In app pointer chain search for address on bookmark. + Export dump to PC app (forked from pointersearcher 0.4) for more powerful pointer chain search. + Import PC app search result for validation and testing. + Create dmnt cheat code from pointer chain found. + Ability to detach dmnt from game process. + Adding/Removing conditional button to cheat code. + +Please refer to https://github.com/tomvita/EdiZon-SE/wiki for instructions on how to use the app. \ No newline at end of file diff --git a/source/guis/gui_about.cpp b/source/guis/gui_about.cpp index 7bb21a0c..d1d0469a 100644 --- a/source/guis/gui_about.cpp +++ b/source/guis/gui_about.cpp @@ -50,28 +50,28 @@ void GuiAbout::draw() { else Gui::drawTextAligned(font20, Gui::g_framebuffer_width - 50, Gui::g_framebuffer_height - 51, currTheme.textColor, "\uE0E1 Back \uE0E0 OK", ALIGNED_RIGHT); - Gui::drawTextAligned(fontHuge, 100, 180, Gui::makeColor(0xFB, 0xA6, 0x15, 0xFF), "EdiZon v" VERSION_STRING, ALIGNED_LEFT); - Gui::drawTextAligned(font20, 130, 190, currTheme.separatorColor, "by WerWolv", ALIGNED_LEFT); + Gui::drawTextAligned(fontHuge, 100, 180, Gui::makeColor(0xFB, 0xA6, 0x15, 0xFF), "EdiZon SE v" VERSION_STRING, ALIGNED_LEFT); + Gui::drawTextAligned(font20, 130, 190, currTheme.separatorColor, "by Tomvita", ALIGNED_LEFT); - Gui::drawTextAligned(font14, 120, 250, currTheme.textColor, "Special thank to anybody who got involved into this project.", ALIGNED_LEFT); - Gui::drawTextAligned(font14, 120, 270, currTheme.textColor, "Especially to all the config/cheat developers that brought this project to life!", ALIGNED_LEFT); + Gui::drawTextAligned(font14, 120, 250, currTheme.textColor, "Special thank to WerWolv who made the original EdiZon and the help and advise he gave.", ALIGNED_LEFT); + // Gui::drawTextAligned(font14, 120, 270, currTheme.textColor, "Especially to all the config/cheat developers that brought this project to life!", ALIGNED_LEFT); - Gui::drawTextAligned(font14, 900, 250, Gui::makeColor(0x51, 0x97, 0xF0, 0xFF), "Twitter: https://twitter.com/WerWolv", ALIGNED_LEFT); - Gui::drawTextAligned(font14, 900, 275, Gui::makeColor(0x1A, 0x5E, 0xA7, 0xFF), "PayPal: https://werwolv.net/donate", ALIGNED_LEFT); + // Gui::drawTextAligned(font14, 900, 250, Gui::makeColor(0x51, 0x97, 0xF0, 0xFF), "Twitter: https://twitter.com/WerWolv", ALIGNED_LEFT); + // Gui::drawTextAligned(font14, 900, 275, Gui::makeColor(0x1A, 0x5E, 0xA7, 0xFF), "PayPal: https://werwolv.net/donate", ALIGNED_LEFT); Gui::drawRectangled(50, 350, Gui::g_framebuffer_width - 100, 250, currTheme.textColor); Gui::drawRectangled(51, 351, Gui::g_framebuffer_width - 102, updateAvailable ? 190 : 248, currTheme.backgroundColor); Gui::drawShadow(52, 352, Gui::g_framebuffer_width - 104, 248); - if (updateAvailable) - Gui::drawTextAligned(font20, Gui::g_framebuffer_width / 2, 555, currTheme.backgroundColor, "A update for EdiZon, save editor or cheat is available!", ALIGNED_CENTER); +// if (updateAvailable) +// Gui::drawTextAligned(font20, Gui::g_framebuffer_width / 2, 555, currTheme.backgroundColor, "A update for EdiZon SE is available!", ALIGNED_CENTER); - Gui::drawTextAligned(font20, 60, 360, currTheme.selectedColor, "EdiZon Update", ALIGNED_LEFT); +// Gui::drawTextAligned(font20, 60, 360, currTheme.selectedColor, "EdiZon SE Update", ALIGNED_LEFT); - Gui::drawTextAligned(font14, 80, 400, currTheme.textColor, std::string("Latest EdiZon version: " + (remoteVersion == "" ? "..." : remoteVersion)).c_str(), ALIGNED_LEFT); - Gui::drawTextAligned(font14, 80, 425, currTheme.textColor, std::string("Latest database commit: [ " + (remoteCommitSha == "" ? "..." : remoteCommitSha) + " ] ").c_str(), ALIGNED_LEFT); - Gui::drawTextAligned(font14, 90, 450, currTheme.separatorColor, (remoteCommitMessage == "" ? "..." : remoteCommitMessage.c_str()), ALIGNED_LEFT); +// Gui::drawTextAligned(font14, 80, 400, currTheme.textColor, std::string("Latest EdiZon SE version: " + (remoteVersion == "" ? "..." : remoteVersion)).c_str(), ALIGNED_LEFT); +// Gui::drawTextAligned(font14, 80, 425, currTheme.textColor, std::string("Latest database commit: [ " + (remoteCommitSha == "" ? "..." : remoteCommitSha) + " ] ").c_str(), ALIGNED_LEFT); +// Gui::drawTextAligned(font14, 90, 450, currTheme.separatorColor, (remoteCommitMessage == "" ? "..." : remoteCommitMessage.c_str()), ALIGNED_LEFT); Gui::endDraw(); } @@ -164,5 +164,5 @@ static void getVersionInfoAsync(void* args) { curl_easy_cleanup(curl); - updateAvailable = (strcmp(remoteCommitSha.c_str(), Config::getConfig()->latestCommit) != 0 && strcmp(remoteCommitSha.c_str(), "???") != 0); + // updateAvailable = (strcmp(remoteCommitSha.c_str(), Config::getConfig()->latestCommit) != 0 && strcmp(remoteCommitSha.c_str(), "???") != 0); } diff --git a/source/guis/gui_cheats.cpp b/source/guis/gui_cheats.cpp index f57dcabf..4e268e52 100644 --- a/source/guis/gui_cheats.cpp +++ b/source/guis/gui_cheats.cpp @@ -8,7 +8,7 @@ #include #include "helpers/util.h" - +#include "helpers/config.hpp" #include "edizon_logo_bin.h" // #define checkheap // #define printpointerchain @@ -127,6 +127,8 @@ GuiCheats::GuiCheats() : Gui() // reloadcheatsfromfile(m_buildID, m_debugger->getRunningApplicationTID()); // dumpcodetofile(); iconloadcheck(); + Config::getConfig()->lasttitle = m_debugger->getRunningApplicationTID(); + Config::writeConfig(); dmntchtGetCheatCount(&m_cheatCnt); @@ -594,7 +596,7 @@ void GuiCheats::draw() Gui::drawTextAligned(font14, 700, 142, currTheme.textColor, "Others", ALIGNED_LEFT); ss.str(""); - ss << "EdiZon SE : 3.7.2"; + ss << "EdiZon SE : 3.7.3"; if (m_32bitmode) ss << " 32 bit pointer mode"; Gui::drawTextAligned(font14, 900, 62, currTheme.textColor, ss.str().c_str(), ALIGNED_LEFT); diff --git a/source/guis/gui_main.cpp b/source/guis/gui_main.cpp index e21b66a0..f1d59100 100644 --- a/source/guis/gui_main.cpp +++ b/source/guis/gui_main.cpp @@ -133,7 +133,7 @@ void GuiMain::draw() { Gui::drawTextAligned(font14, Gui::g_framebuffer_width - 8, 3, currTheme.separatorColor, timeBuffer, ALIGNED_RIGHT); Gui::drawTextAligned(font14, Gui::g_framebuffer_width - 80, 3, currTheme.separatorColor, batteryBuffer, ALIGNED_RIGHT); - Gui::drawTextAligned(font14, 8, 3, currTheme.separatorColor, "EdiZon v" VERSION_STRING, ALIGNED_LEFT); + Gui::drawTextAligned(font14, 8, 3, currTheme.separatorColor, "EdiZon SE v" VERSION_STRING, ALIGNED_LEFT); Gui::drawRectangled(Gui::g_framebuffer_width - 72, 5, 7, 18, currTheme.separatorColor); Gui::drawRectangled(Gui::g_framebuffer_width - 75, 8, 13, 18, currTheme.separatorColor); diff --git a/source/helpers/save.cpp b/source/helpers/save.cpp index 0e25e800..6ef461d3 100644 --- a/source/helpers/save.cpp +++ b/source/helpers/save.cpp @@ -7,6 +7,7 @@ #include "helpers/account.hpp" #include "helpers/title.hpp" #include "helpers/debugger.hpp" +#include "helpers/config.hpp" using json = nlohmann::json; s32 deleteDirRecursively(const char *path, bool isSave) @@ -182,10 +183,18 @@ Result _getSaveList(std::vector &saveInfoList) saveInfoList.push_back(info); break; } + else if ((info.save_data_type == FsSaveDataType_Account) && (Config::getConfig()->lasttitle) != 0 ) + { + if (info.application_id == Config::getConfig()->lasttitle) + { + saveInfoList.push_back(info); + break; + } + } else if ((info.save_data_type == FsSaveDataType_Account) && (l_debugger->getRunningApplicationTID() == 0)) // hacked to get only the running title { saveInfoList.push_back(info); - } + } } fsSaveDataInfoReaderClose(&iterator); diff --git a/source/main.cpp b/source/main.cpp index 40e66b87..8c869b7a 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -214,13 +214,13 @@ int main(int argc, char **argv) currGui->draw(); } + Config::readConfig(); initTitles(); printf("%s\n", EDIZON_DIR); createFolders(); - Config::readConfig(); if (isServiceRunning("tx") && !isServiceRunning("rnx") && !Config::getConfig()->hideSX)