mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-26 23:24:13 +08:00
.
This commit is contained in:
parent
eba5643790
commit
67d9da7f2a
@ -1,10 +1,10 @@
|
||||
include_directories(. util engines)
|
||||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
set(enginessrc BGI MKXPZ Ryujinx livecaptions Kincaid vita3k rpcs3 yuzu TYPEMOON UnrealEngine AGES7 mono Godot 5pb lucasystem LightVN V8 Artemis KiriKiri YOX PPSSPP CMVS Suika2 )
|
||||
set(enginessrc BGI MKXPZ Ryujinx livecaptions Kincaid vita3k rpcs3 yuzu TYPEMOON UnrealEngine AGES7 mono Godot 5pb lucasystem LightVN V8 Artemis KiriKiri YOX CMVS Suika2 )
|
||||
set(enginepath "engine64")
|
||||
set(collector "enginecollection64.cpp")
|
||||
else()
|
||||
set(enginessrc DAC BunBun 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(enginessrc DAC BunBun 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 jukujojidai 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()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
||||
|
||||
|
||||
class PCSX2:public ENGINE{
|
||||
public:
|
||||
PCSX2(){
|
||||
|
||||
check_by=CHECK_BY::FILE;
|
||||
check_by_target=L"pcsx2*.exe"; //PCSX2.exe or PCSX2WX.exe
|
||||
};
|
||||
bool attach_function();
|
||||
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
|
||||
|
||||
class PPSSPPengine:public ENGINE{
|
||||
public:
|
||||
PPSSPPengine(){
|
||||
|
||||
check_by=CHECK_BY::FILE;
|
||||
check_by_target=L"PPSSPP*.exe";
|
||||
is_engine_certain=false;
|
||||
};
|
||||
bool attach_function();
|
||||
|
||||
};
|
@ -1,7 +0,0 @@
|
||||
#include "PPSSPP.h"
|
||||
#include "ppsspp/psputils.hpp"
|
||||
|
||||
bool PPSSPPengine::attach_function()
|
||||
{
|
||||
return InsertPPSSPPcommonhooks();
|
||||
}
|
@ -1,6 +1,4 @@
|
||||
#include "engine32/PPSSPP.h"
|
||||
#include "engine32/LovaGame.h"
|
||||
#include "engine32/PCSX2.h"
|
||||
#include "engine32/VanillawareGC.h"
|
||||
#include "engine32/V8.h"
|
||||
#include "engine32/cef.h"
|
||||
@ -188,12 +186,12 @@
|
||||
#include "NoEngine.h"
|
||||
#include "engines/lua/lua51.h"
|
||||
#include "engines/python/Renpy.h"
|
||||
#include "engines/ppsspp/ppsspp.h"
|
||||
std::vector<ENGINE *> check_engines()
|
||||
{
|
||||
return {
|
||||
new LovaGame,
|
||||
new PPSSPPengine,
|
||||
new PCSX2,
|
||||
new PPSSPPWindows,
|
||||
new VanillawareGC,
|
||||
new V8,
|
||||
new cef,
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include "engine64/PPSSPP.h"
|
||||
#include "engine64/Godot.h"
|
||||
#include "engine64/V8.h"
|
||||
#include "engine64/mono.h"
|
||||
@ -23,6 +22,7 @@
|
||||
#include "engine64/MKXPZ.h"
|
||||
#include "engines/lua/lua51.h"
|
||||
#include "engines/python/Renpy.h"
|
||||
#include "engines/ppsspp/ppsspp.h"
|
||||
std::vector<ENGINE *> check_engines()
|
||||
{
|
||||
return {
|
||||
@ -32,7 +32,7 @@ std::vector<ENGINE *> check_engines()
|
||||
new mono,
|
||||
new yuzu,
|
||||
new Ryujinx,
|
||||
new PPSSPPengine,
|
||||
new PPSSPPWindows,
|
||||
new vita3k,
|
||||
new rpcs3,
|
||||
new livecaptions,
|
||||
|
@ -1,5 +1,4 @@
|
||||
|
||||
#include "psputils.hpp"
|
||||
#include "ppsspp.h"
|
||||
#include "specialgames.hpp"
|
||||
// See: https://github.com/hrydgard/ppsspp
|
||||
|
||||
@ -591,9 +590,9 @@ namespace ppsspp
|
||||
return NewHook(hp, "PPSSPPDoJit");
|
||||
}
|
||||
}
|
||||
bool InsertPPSSPPcommonhooks()
|
||||
bool PPSSPPWindows::attach_function()
|
||||
{
|
||||
auto succ = ppsspp::hookPPSSPPDoJit();
|
||||
succ |= InsertPPSSPPHLEHooks();
|
||||
return succ;
|
||||
}
|
||||
}
|
@ -1,11 +1,9 @@
|
||||
|
||||
|
||||
class PPSSPPengine : public ENGINE
|
||||
class PPSSPPWindows : public ENGINE
|
||||
{
|
||||
public:
|
||||
PPSSPPengine()
|
||||
PPSSPPWindows()
|
||||
{
|
||||
|
||||
check_by = CHECK_BY::FILE;
|
||||
is_engine_certain = false;
|
||||
check_by_target = L"PPSSPP*.exe";
|
@ -1,61 +0,0 @@
|
||||
#ifndef __LUNA_PSPUILTS_H
|
||||
#define __LUNA_PSPUILTS_H
|
||||
namespace ppsspp
|
||||
{
|
||||
|
||||
struct emfuncinfo
|
||||
{
|
||||
uint64_t type;
|
||||
int offset;
|
||||
int padding;
|
||||
decltype(HookParam::text_fun) hookfunc;
|
||||
decltype(HookParam::filter_fun) filterfun;
|
||||
const char *_id;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
bool InsertPPSSPPcommonhooks();
|
||||
|
||||
#ifndef _WIN64
|
||||
namespace
|
||||
{
|
||||
int PPSSPP_VERSION[4] = {0, 9, 8, 0}; // 0.9.8 by default
|
||||
|
||||
enum : DWORD
|
||||
{
|
||||
PPSSPP_MEMORY_SEARCH_STEP_98 = 0x01000000,
|
||||
PPSSPP_MEMORY_SEARCH_STEP_99 = 0x00050000
|
||||
//, step = 0x1000 // step must be at least 0x1000 (offset in SearchPattern)
|
||||
//, step = 0x00010000 // crash otoboku PSP on 0.9.9 since 5pb is wrongly inserted
|
||||
};
|
||||
|
||||
ULONG SafeMatchBytesInPSPMemory(LPCVOID pattern, DWORD patternSize, DWORD start = MemDbg::MappedMemoryStartAddress, DWORD stop = MemDbg::MemoryStopAddress)
|
||||
{
|
||||
|
||||
ULONG step = PPSSPP_VERSION[1] == 9 && PPSSPP_VERSION[2] == 8 ? PPSSPP_MEMORY_SEARCH_STEP_98 : PPSSPP_MEMORY_SEARCH_STEP_99;
|
||||
return _SafeMatchBytesInMappedMemory(pattern, patternSize, XX, start, stop, step);
|
||||
}
|
||||
|
||||
ULONG SafeMatchBytesInPS2Memory(LPCVOID pattern, DWORD patternSize)
|
||||
{
|
||||
// PCSX2 memory range
|
||||
// ds: begin from 0x20000000
|
||||
// cs: begin from 0x30000000
|
||||
enum : ULONG
|
||||
{
|
||||
// start = MemDbg::MappedMemoryStartAddress // 0x01000000
|
||||
start = 0x30000000 // larger than PSP to skip the garbage memory
|
||||
,
|
||||
stop = 0x40000000 // larger than PSP as PS2 has larger memory
|
||||
,
|
||||
step = 0x00010000 // smaller than PPS
|
||||
//, step = 0x00050000 // the same as PPS
|
||||
//, step = 0x1000 // step must be at least 0x1000 (offset in SearchPattern)
|
||||
};
|
||||
return _SafeMatchBytesInMappedMemory(pattern, patternSize, XX, start, stop, step);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,5 +1,19 @@
|
||||
#include <queue>
|
||||
#include "emujitarg.hpp"
|
||||
namespace ppsspp
|
||||
{
|
||||
|
||||
struct emfuncinfo
|
||||
{
|
||||
uint64_t type;
|
||||
int offset;
|
||||
int padding;
|
||||
decltype(HookParam::text_fun) hookfunc;
|
||||
decltype(HookParam::filter_fun) filterfun;
|
||||
const char *_id;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace ppsspp
|
||||
{
|
||||
@ -10,7 +24,23 @@ namespace ppsspp
|
||||
result = std::regex_replace(result, std::regex(R"((\\d$|^\@[a-z]+|#.*?#|\$))"), "");
|
||||
buffer->from(result);
|
||||
}
|
||||
|
||||
void ULJS00124_1(hook_context *context, HookParam *hp, TextBuffer *buffer, uintptr_t *split)
|
||||
{
|
||||
auto a2 = (char *)PPSSPP::emu_arg(context)[1];
|
||||
auto len = *(BYTE *)(PPSSPP::emu_arg(context)[1] - 2);
|
||||
std::string collect;
|
||||
std::string hex;
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
if (*(char *)(a2 + i))
|
||||
collect += *(char *)(a2 + i);
|
||||
}
|
||||
strReplace(collect, "\n", "");
|
||||
strReplace(collect, "\r", "");
|
||||
strReplace(collect, "\x01-", "");
|
||||
strReplace(collect, "\x01<", "");
|
||||
buffer->from(collect);
|
||||
}
|
||||
void ULJS00339(hook_context *context, HookParam *hp, TextBuffer *buffer, uintptr_t *split)
|
||||
{
|
||||
auto a2 = PPSSPP::emu_arg(context)[0];
|
||||
@ -262,6 +292,19 @@ namespace ppsspp
|
||||
std::string s = (char *)PPSSPP::emu_arg(context)[1];
|
||||
buffer->from(ULJM06143Code(s));
|
||||
}
|
||||
void ULJM06220(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
auto s = buffer->strA();
|
||||
s = s.substr(s.find("#n"));
|
||||
strReplace(s, "#n", "");
|
||||
s = std::regex_replace(s, std::regex(R"((#[A-Za-z]+\[(\d*[.,])?\d+\])+)"), "");
|
||||
buffer->from(s);
|
||||
}
|
||||
void ULJM06266(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
auto s = buffer->strA();
|
||||
buffer->from(s.substr(0, s.find("#n")));
|
||||
}
|
||||
void ULJM05943F(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
StringFilter(buffer, "#n", 2);
|
||||
@ -748,21 +791,11 @@ namespace ppsspp
|
||||
}
|
||||
last = s;
|
||||
}
|
||||
namespace
|
||||
void ULJM05823_2(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
void ULJM05823_1(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
StringFilter(buffer, "#n", 2);
|
||||
auto s = buffer->strA();
|
||||
s = std::regex_replace(s, std::regex("(#[A-Za-z]+\\[(\\d*[.])?\\d+\\])+"), "");
|
||||
buffer->from(s);
|
||||
}
|
||||
void ULJM05823_2(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
auto s = buffer->viewA();
|
||||
if (s.find("#n") != s.npos)
|
||||
return buffer->clear();
|
||||
}
|
||||
auto s = buffer->viewA();
|
||||
if (s.find("#n") != s.npos)
|
||||
return buffer->clear();
|
||||
}
|
||||
void ULJM05725(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
@ -888,7 +921,7 @@ namespace ppsspp
|
||||
// アーメン・ノワール ポータブル
|
||||
{0x883b6a8, {0, 0, 0, 0, ULJM05943F, "ULJM06064"}},
|
||||
// デス・コネクション ポータブル
|
||||
{0x882AEF4, {0, 0, 0, 0, ULJM05823_1, "ULJM05823"}},
|
||||
{0x882AEF4, {0, 0, 0, 0, ULJM05943F, "ULJM05823"}},
|
||||
{0x88B2464, {0, 0, 0, 0, ULJM05823_2, "ULJM05823"}}, // text+name->name
|
||||
// しらつゆの怪
|
||||
{0x888A26C, {0, 0, 0, 0, ULJM06289, "ULJM06289"}},
|
||||
@ -904,19 +937,19 @@ namespace ppsspp
|
||||
{0x886B610, {0, 1, 0, 0, 0, "ULJM06332"}},
|
||||
// S・Y・K ~新説西遊記~ ポータブル
|
||||
{0x88DD918, {0, 0, 0, 0, ULJM05823_2, "ULJM05697"}}, // text+name->name
|
||||
{0x88DA420, {0, 4, 0, 0, ULJM05823_1, "ULJM05697"}},
|
||||
{0x88DA420, {0, 4, 0, 0, ULJM05943F, "ULJM05697"}},
|
||||
// Glass Heart Princess
|
||||
{0x885FA30, {0, 0, 0, 0, ULJM05823_1, "ULJM06196"}},
|
||||
{0x885FA30, {0, 0, 0, 0, ULJM05943F, "ULJM06196"}},
|
||||
// Glass Heart Princess:PLATINUM
|
||||
{0x885D4F0, {0, 0, 0, 0, ULJM05823_1, "ULJM06309"}},
|
||||
{0x885D4F0, {0, 0, 0, 0, ULJM05943F, "ULJM06309"}},
|
||||
// ウィル・オ・ウィスプ ポータブル
|
||||
{0x885DD04, {0, 0, 0, 0, ULJM05823_1, "ULJM05447"}},
|
||||
{0x885DD04, {0, 0, 0, 0, ULJM05943F, "ULJM05447"}},
|
||||
// 華鬼 ~恋い初める刻 永久の印~
|
||||
{0x8829F14, {0, 4, 0, 0, ULJM05823_1, "ULJM05847"}},
|
||||
{0x8829F14, {0, 4, 0, 0, ULJM05943F, "ULJM05847"}},
|
||||
{0x886D270, {0, 0, 0, 0, ULJM05823_2, "ULJM05847"}},
|
||||
// 華鬼 ~夢のつづき~
|
||||
{0x88406CC, {0, 0, 0, 0, ULJM05823_1, "ULJM06048"}}, // text
|
||||
{0x885B7BC, {0, 0, 0, 0, ULJM05823_1, "ULJM06048"}}, // name+text
|
||||
{0x88406CC, {0, 0, 0, 0, ULJM05943F, "ULJM06048"}}, // text
|
||||
{0x885B7BC, {0, 0, 0, 0, ULJM05943F, "ULJM06048"}}, // name+text
|
||||
// サモンナイト3
|
||||
{0x89DCF90, {0, 6, 0, 0, NPJH50380, "NPJH50380"}},
|
||||
// サモンナイト4
|
||||
@ -1055,6 +1088,16 @@ namespace ppsspp
|
||||
// いざ、出陣!恋戦 第二幕 ~甲斐編~
|
||||
{0x8945C20, {CODEC_UTF16, 1, 0, 0, ULJM06346, "ULJM06346"}},
|
||||
{0x8804950, {CODEC_UTF16, 1, 0, 0, ULJM06346, "ULJM06347"}},
|
||||
// AMNESIA CROWD
|
||||
{0x8912D30, {0, 0, 0, 0, ULJM06266, "ULJM06266"}},
|
||||
{0x890088C, {0, 1, 0, 0, ULJM05943F, "ULJM06266"}},
|
||||
// 宵夜森ノ姫
|
||||
{0x884C7C8, {0, 1, 0, ULJS00124_1, 0, "ULJM06394"}},
|
||||
// CLOCK ZERO ~終焉の一秒~ Portable
|
||||
{0x886F114, {0, 3, 0, 0, ULJM06289, "ULJM05945"}},
|
||||
// BLACK WOLVES SAGA -Last Hope-
|
||||
{0x883131C, {0, 1, 0, 0, ULJM06220, "ULJM06220"}},
|
||||
{0x8831324, {0, 1, 0, 0, ULJM06266, "ULJM06220"}},
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
set(VERSION_MAJOR 6)
|
||||
set(VERSION_MINOR 11)
|
||||
set(VERSION_PATCH 4)
|
||||
set(VERSION_PATCH 5)
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user