From b2d215adb7094f4ec3e39912c7190eb281ccef5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Wed, 11 Dec 2024 22:13:34 +0800 Subject: [PATCH] . --- cpp/LunaHook/LunaHook/CMakeLists.txt | 2 +- .../LunaHook/engine32/CoffeeMaker.cpp | 1 - cpp/LunaHook/LunaHook/engine32/antique.cpp | 48 +++++++++++++++++++ cpp/LunaHook/LunaHook/engine32/antique.h | 14 ++++++ cpp/LunaHook/LunaHook/enginecollection32.cpp | 4 +- .../LunaHook/engines/ppsspp/specialgames.hpp | 2 + cpp/version.cmake | 2 +- 7 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 cpp/LunaHook/LunaHook/engine32/antique.cpp create mode 100644 cpp/LunaHook/LunaHook/engine32/antique.h diff --git a/cpp/LunaHook/LunaHook/CMakeLists.txt b/cpp/LunaHook/LunaHook/CMakeLists.txt index 17084b3b..1f154501 100644 --- a/cpp/LunaHook/LunaHook/CMakeLists.txt +++ b/cpp/LunaHook/LunaHook/CMakeLists.txt @@ -4,7 +4,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) set(enginepath "engine64") set(collector "enginecollection64.cpp") else() - set(enginessrc T2U Moonstone Aromarie Winters Cage AGE_System AksysGames RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY Erogos godot A98SYS GuruGuruSMF4 TeethingRing Fizz CoffeeMaker VALKYRIA mirage CisLugI tamasoft FrontWing solfasys Diskdream splushwave ransel akatombo GASTRO GSX Aksys ScrPlayer SYSD KISS IGScript Jellyfish BKEngine Overflow SRPGStudio Suika2 FVP LCScript Ohgetsu RPGMakerRGSS3 ONScripterru OVERDRIVE HXP Palette Purple Ruf RUNE Tarte Tomato Sakuradog Troy VitaminSoft UnknownEngine TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono PONScripter Bishop sakanagl Lightvn KiriKiri SideB BGI Bootup morning shyakunage Regista NNNConfig Eushully Majiro littlecheese Elf Silkys CMVS Wolf Circus1 Circus2 Cotopha Artemis CatSystem Atelier Tenco QLIE Pal AIL NeXAS LunaSoft Unicorn Rejet Interlude AdobeAir Retouch Malie Live Nexton Lucifen Waffle TinkerBell SystemAoi Yuris Nitroplus2 Bruns EME RRE Candy Speed ApricoT Triangle AB2Try MBLMED GameMaker DxLib CodeX Minori Sprite RpgmXP Eagls Debonosu C4 WillPlus Tanuki GXP AOS Mink YukaSystem2 sakusesu Exp Syuntada Pensil Anim hibiki Nitroplus Reallive Siglus Taskforce2 RUGP IronGameSystem Anex86 ShinyDaysGame MarineHeart ShinaRio CaramelBox UnisonShift Escude Ryokucha Alice Footy2 utawarerumono System4x Abalone Abel 5pb HorkEye XUSE Leaf Nekopack AXL AGS AdobeFlash10 FocasLens Tamamo Ages3ResT) + set(enginessrc antique T2U Moonstone Aromarie Winters Cage AGE_System AksysGames RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY Erogos godot A98SYS GuruGuruSMF4 TeethingRing Fizz CoffeeMaker VALKYRIA mirage CisLugI tamasoft FrontWing solfasys Diskdream splushwave ransel akatombo GASTRO GSX Aksys ScrPlayer SYSD KISS IGScript Jellyfish BKEngine Overflow SRPGStudio Suika2 FVP LCScript Ohgetsu RPGMakerRGSS3 ONScripterru OVERDRIVE HXP Palette Purple Ruf RUNE Tarte Tomato Sakuradog Troy VitaminSoft UnknownEngine TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono PONScripter Bishop sakanagl Lightvn KiriKiri SideB BGI Bootup morning shyakunage Regista NNNConfig Eushully Majiro littlecheese Elf Silkys CMVS Wolf Circus1 Circus2 Cotopha Artemis CatSystem Atelier Tenco QLIE Pal AIL NeXAS LunaSoft Unicorn Rejet Interlude AdobeAir Retouch Malie Live Nexton Lucifen Waffle TinkerBell SystemAoi Yuris Nitroplus2 Bruns EME RRE Candy Speed ApricoT Triangle AB2Try MBLMED GameMaker DxLib CodeX Minori Sprite RpgmXP Eagls Debonosu C4 WillPlus Tanuki GXP AOS Mink YukaSystem2 sakusesu Exp Syuntada Pensil Anim hibiki Nitroplus Reallive Siglus Taskforce2 RUGP IronGameSystem Anex86 ShinyDaysGame MarineHeart ShinaRio CaramelBox UnisonShift Escude Ryokucha Alice Footy2 utawarerumono System4x Abalone Abel 5pb HorkEye XUSE Leaf Nekopack AXL AGS AdobeFlash10 FocasLens Tamamo Ages3ResT) set(enginepath "engine32") set(collector "enginecollection32.cpp") endif() diff --git a/cpp/LunaHook/LunaHook/engine32/CoffeeMaker.cpp b/cpp/LunaHook/LunaHook/engine32/CoffeeMaker.cpp index 4ec8cbcb..bc1f445a 100644 --- a/cpp/LunaHook/LunaHook/engine32/CoffeeMaker.cpp +++ b/cpp/LunaHook/LunaHook/engine32/CoffeeMaker.cpp @@ -32,7 +32,6 @@ bool CoffeeMaker_attach_function() return; auto sub_429050 = (int(__stdcall *)(signed int a1))hp->user_value; static int idx = 0; - idx += 1; if (idx++ % 2) buffer->from_t((wchar_t)sub_429050(a2)); }; diff --git a/cpp/LunaHook/LunaHook/engine32/antique.cpp b/cpp/LunaHook/LunaHook/engine32/antique.cpp new file mode 100644 index 00000000..42be7af2 --- /dev/null +++ b/cpp/LunaHook/LunaHook/engine32/antique.cpp @@ -0,0 +1,48 @@ +#include "antique.h" + +bool antique::attach_function() +{ + // https://vndb.org/v3122 + // あそび塾 + const BYTE bytes[] = { + /* + .text:00409809 mov eax, dword_43E5B4 + .text:0040980E cmp byte ptr [eax], 81h + .text:00409811 jnz short loc_409856 + .text:00409813 mov al, [eax+1] + .text:00409816 cmp al, 41h ; 'A' + .text:00409818 jl short loc_409856 + .text:0040981A cmp al, 44h ; 'D' + .text:0040981C jg short loc_409856 + */ + /* + if ( *(_BYTE *)dword_43E5B4 == 0x81 && (v14 = *(_BYTE *)(dword_43E5B4 + 1), v14 >= 65) && v14 <= 68 ) + */ + 0x80, 0x38, 0x81, + 0x75, XX, + 0x8a, 0x40, 0x01, + 0x3c, 0x41, + 0x7c, XX, + 0x3c, 0x44, + 0x7f, XX}; + auto addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress); + if (!addr) + return false; + addr = MemDbg::findEnclosingAlignedFunction(addr); + if (!addr) + return false; + HookParam hp; + hp.address = addr; + hp.type = USING_STRING | DATA_INDIRECT | USING_SPLIT | SPLIT_INDIRECT; + hp.offset = stackoffset(1); + hp.split = stackoffset(3); + hp.filter_fun = [](TextBuffer *buffer, auto *) + { + static int i = 0; + if (i++ % 2) + return buffer->clear(); + StringFilter(buffer, "\\n", 2); + }; + hp.embed_hook_font = F_GetGlyphOutlineA; + return NewHook(hp, "antique"); +} \ No newline at end of file diff --git a/cpp/LunaHook/LunaHook/engine32/antique.h b/cpp/LunaHook/LunaHook/engine32/antique.h new file mode 100644 index 00000000..eb0ea32d --- /dev/null +++ b/cpp/LunaHook/LunaHook/engine32/antique.h @@ -0,0 +1,14 @@ + + +class antique : public ENGINE +{ +public: + antique() + { + + check_by = CHECK_BY::FILE_ALL; + check_by_target = check_by_list{L"*.VMC", L"vorbis.acm", L"SE.DAT", L"PACK.DAT"}; + is_engine_certain = false; + }; + bool attach_function(); +}; \ No newline at end of file diff --git a/cpp/LunaHook/LunaHook/enginecollection32.cpp b/cpp/LunaHook/LunaHook/enginecollection32.cpp index 9cdedea2..e43778cc 100644 --- a/cpp/LunaHook/LunaHook/enginecollection32.cpp +++ b/cpp/LunaHook/LunaHook/enginecollection32.cpp @@ -26,6 +26,7 @@ #include "engine32/Fizz.h" #include "engine32/Aromarie.h" #include "engine32/Ruf.h" +#include "engine32/antique.h" #include "engine32/SYSD.h" #include "engine32/Diskdream.h" #include "engine32/RPGMakerRGSS3.h" @@ -418,5 +419,6 @@ std::vector check_engines() new Winters, new Aromarie, new Moonstone, - new T2U}; + new T2U, + new antique,}; } \ No newline at end of file diff --git a/cpp/LunaHook/LunaHook/engines/ppsspp/specialgames.hpp b/cpp/LunaHook/LunaHook/engines/ppsspp/specialgames.hpp index 4efc11da..9a0b220e 100644 --- a/cpp/LunaHook/LunaHook/engines/ppsspp/specialgames.hpp +++ b/cpp/LunaHook/LunaHook/engines/ppsspp/specialgames.hpp @@ -891,6 +891,8 @@ namespace ppsspp {0x885B7BC, {0, 0, 0, 0, ULJM05823_1, "ULJM06048"}}, // name+text // サモンナイト3 {0x89DCF90, {0, 6, 0, 0, NPJH50380, "NPJH50380"}}, + // サモンナイト4 + {0x89E7760, {0, 6, 0, 0, NPJH50380, "NPJH50410"}}, // Steins;Gate 比翼恋理のだーりん {0x8856968, {0, 4, 0, 0, ULJM06040_1, "ULJM06040"}}, {0x889AD70, {0, 1, 0, 0, ULJM06040_2, "ULJM06040"}}, diff --git a/cpp/version.cmake b/cpp/version.cmake index 409bf90a..035260f5 100644 --- a/cpp/version.cmake +++ b/cpp/version.cmake @@ -1,7 +1,7 @@ set(VERSION_MAJOR 6) set(VERSION_MINOR 11) -set(VERSION_PATCH 2) +set(VERSION_PATCH 3) set(VERSION_REVISION 0) set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}") add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)