add gamename

This commit is contained in:
恍兮惚兮 2024-04-02 00:27:08 +08:00
parent 275c661b7d
commit 2d1edde1a7
2 changed files with 81 additions and 70 deletions

View File

@ -160,9 +160,8 @@ bool yuzusuyu::attach_function()
if(!entrypoint)return;
jitaddraddr(em_address,entrypoint,JITTYPE::YUZU);
[&](){
auto em_address_off=em_address- 0x80004000;
if(emfunctionhooks.find(em_address_off)==emfunctionhooks.end())return;
auto op=emfunctionhooks.at(em_address_off);
if(emfunctionhooks.find(em_address)==emfunctionhooks.end())return;
auto op=emfunctionhooks.at(em_address);
if(!(checkiscurrentgame(op)))return;
HookParam hpinternal;
@ -472,74 +471,76 @@ bool F0100936018EB4000(void* data, size_t* len, HookParam* hp){
namespace{
auto _=[](){
emfunctionhooks={
{0x8003eeac - 0x80004000,{CODEC_UTF16,0,0,_0100978013276000,0,"0100978013276000","1.0.0"}},
{0x8003eebc - 0x80004000,{CODEC_UTF16,0,0,_0100978013276000,0,"0100978013276000","1.0.1"}},
//Memories Off
{0x8003eeac,{CODEC_UTF16,0,0,_0100978013276000,0,"0100978013276000","1.0.0"}},
{0x8003eebc,{CODEC_UTF16,0,0,_0100978013276000,0,"0100978013276000","1.0.1"}},
// Shiro to Kuro no Alice
{0x80013f20 - 0x80004000,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x80013f94 - 0x80004000,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x8001419c - 0x80004000,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x80013f20,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x80013f94,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x8001419c,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
// Shiro to Kuro no Alice -Twilight line-
{0x80014260 - 0x80004000,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x800142d4 - 0x80004000,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x800144dc - 0x80004000,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x80014260,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x800142d4,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
{0x800144dc,{CODEC_UTF8,0,0,0,NewLineCharFilterW,"0100A460141B8000","1.0.0"}},
//CLANNAD
{0x80072d00,{CODEC_UTF16|FULL_STRING,1,0,0, F0100A3A00CC7E000,"0100A3A00CC7E000","1.0.0"}},
{0x80072d30,{CODEC_UTF16|FULL_STRING,1,0,0,F0100A3A00CC7E000,"0100A3A00CC7E000","1.0.7"}},
//VARIABLE BARRICADE NS
{0x800e3424,{CODEC_UTF8,0,0,0,F010045C0109F2000,"010045C0109F2000","1.0.1"}},//"System Messages + Choices"), //Also includes the names of characters,
{0x800fb080,{CODEC_UTF8,3,0,0,F010045C0109F2000,"010045C0109F2000","1.0.1"}},//Main Text
//AMNESIA for Nintendo Switch
{0x805bba5c,{CODEC_UTF16,0,0,T0100A1E00BFEA000<2>,F0100A1E00BFEA000,"0100A1E00BFEA000","1.0.1"}},//dialogue
{0x805e9930,{CODEC_UTF16,0,0,T0100A1E00BFEA000<2>,F0100A1E00BFEA000,"0100A1E00BFEA000","1.0.1"}},//choice
{0x805e7fd8,{CODEC_UTF16,0,0,T0100A1E00BFEA000<2>,F0100A1E00BFEA000,"0100A1E00BFEA000","1.0.1"}},//name
//Chou no Doku Hana no Kusari Taishou Tsuya Koi Ibun
{0x80095010,{CODEC_UTF16,1,0,0,F0100A1200CA3C000,"0100A1200CA3C000","2.0.1"}},//Main Text + Names
//Live a Live
{0x80a05170,{CODEC_UTF16,0,0,0,F0100C29017106000,"0100C29017106000","1.0.0"}},
//Sakura no Kumo * Scarlet no Koi
{0x8049d968,{CODEC_UTF8,0,1,0,F01006590155AC000,"01006590155AC000","1.0.0"}},//name
{0x8049d980,{CODEC_UTF8,0,0,0,F01006590155AC000,"01006590155AC000","1.0.0"}},//dialogue
//Majestic Majolical
{0x80557408,{CODEC_UTF8,0,0,0,F01000200194AE000,"01000200194AE000","1.0.0"}},//name
{0x8059ee94,{CODEC_UTF8,3,0,0,F01000200194AE000,"01000200194AE000","1.0.0"}},//player name
{0x80557420,{CODEC_UTF8,0,0,0,F01000200194AE000,"01000200194AE000","1.0.0"}},//dialogue
//Matsurika no Kei
{0x8017ad54,{CODEC_UTF32,1,0,0,F0100EA001A626000,"0100EA001A626000","1.0.0"}},// text
{0x80174d4c,{CODEC_UTF32,1,0,0,F0100EA001A626000,"0100EA001A626000","1.0.0"}},// name
//Cupid Parasite
{0x80057910,{CODEC_UTF32,2,0,0,F0100F7E00DFC8000,"0100F7E00DFC8000","1.0.1"}},// name + text
{0x80169df0,{CODEC_UTF32,0,0,0,F0100F7E00DFC8000,"0100F7E00DFC8000","1.0.1"}},// choice
//Radiant Tale
{0x80075190,{CODEC_UTF8,1,0,0,F0100925014864000,"0100925014864000","1.0.0"}},// prompt
{0x8002fb18,{CODEC_UTF8,0,0,0,F0100925014864000,"0100925014864000","1.0.0"}},// name
{0x8002fd7c,{CODEC_UTF8,0,0,0,F0100925014864000,"0100925014864000","1.0.0"}},// text
//MUSICUS
{0x80462DD4,{CODEC_UTF8,0,1,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// name
{0x80462DEC,{CODEC_UTF8,0,0,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// dialogue 1
{0x80480d4c,{CODEC_UTF8,0,0,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// dialogue 2
{0x804798e0,{CODEC_UTF8,0,0,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// choice
//CHAOS;HEAD NOAH
{0x80046700,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},
{0x8003A2c0,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// choice
{0x8003EAB0,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// TIPS list (menu)
{0x8004C648,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// system message
{0x80050374,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// TIPS (red)
{0x80072d00 - 0x80004000,{CODEC_UTF16|FULL_STRING,1,0,0, F0100A3A00CC7E000,"0100A3A00CC7E000","1.0.0"}},
{0x80072d30 - 0x80004000,{CODEC_UTF16|FULL_STRING,1,0,0,F0100A3A00CC7E000,"0100A3A00CC7E000","1.0.7"}},
{0x800e3424 - 0x80004000,{CODEC_UTF8,0,0,0,F010045C0109F2000,"010045C0109F2000","1.0.1"}},//"System Messages + Choices"), //Also includes the names of characters,
{0x800fb080 - 0x80004000,{CODEC_UTF8,3,0,0,F010045C0109F2000,"010045C0109F2000","1.0.1"}},//Main Text
{0x805bba5c - 0x80004000,{CODEC_UTF16,0,0,T0100A1E00BFEA000<2>,F0100A1E00BFEA000,"0100A1E00BFEA000","1.0.1"}},//dialogue
{0x805e9930 - 0x80004000,{CODEC_UTF16,0,0,T0100A1E00BFEA000<2>,F0100A1E00BFEA000,"0100A1E00BFEA000","1.0.1"}},//choice
{0x805e7fd8 - 0x80004000,{CODEC_UTF16,0,0,T0100A1E00BFEA000<2>,F0100A1E00BFEA000,"0100A1E00BFEA000","1.0.1"}},//name
{0x80095010 - 0x80004000,{CODEC_UTF16,1,0,0,F0100A1200CA3C000,"0100A1200CA3C000","2.0.1"}},//Main Text + Names
{0x80a05170 - 0x80004000,{CODEC_UTF16,0,0,0,F0100C29017106000,"0100C29017106000","1.0.0"}},
{0x8049d968 - 0x80004000,{CODEC_UTF8,0,1,0,F01006590155AC000,"01006590155AC000","1.0.0"}},//name
{0x8049d980 - 0x80004000,{CODEC_UTF8,0,0,0,F01006590155AC000,"01006590155AC000","1.0.0"}},//dialogue
{0x80557408 - 0x80004000,{CODEC_UTF8,0,0,0,F01000200194AE000,"01000200194AE000","1.0.0"}},//name
{0x8059ee94 - 0x80004000,{CODEC_UTF8,3,0,0,F01000200194AE000,"01000200194AE000","1.0.0"}},//player name
{0x80557420 - 0x80004000,{CODEC_UTF8,0,0,0,F01000200194AE000,"01000200194AE000","1.0.0"}},//dialogue
{0x8017ad54 - 0x80004000,{CODEC_UTF32,1,0,0,F0100EA001A626000,"0100EA001A626000","1.0.0"}},// text
{0x80174d4c - 0x80004000,{CODEC_UTF32,1,0,0,F0100EA001A626000,"0100EA001A626000","1.0.0"}},// name
{0x80057910 - 0x80004000,{CODEC_UTF32,2,0,0,F0100F7E00DFC8000,"0100F7E00DFC8000","1.0.1"}},// name + text
{0x80169df0 - 0x80004000,{CODEC_UTF32,0,0,0,F0100F7E00DFC8000,"0100F7E00DFC8000","1.0.1"}},// choice
{0x80075190 - 0x80004000,{CODEC_UTF8,1,0,0,F0100925014864000,"0100925014864000","1.0.0"}},// prompt
{0x8002fb18 - 0x80004000,{CODEC_UTF8,0,0,0,F0100925014864000,"0100925014864000","1.0.0"}},// name
{0x8002fd7c - 0x80004000,{CODEC_UTF8,0,0,0,F0100925014864000,"0100925014864000","1.0.0"}},// text
{0x80462DD4 - 0x80004000,{CODEC_UTF8,0,1,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// name
{0x80462DEC - 0x80004000,{CODEC_UTF8,0,0,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// dialogue 1
{0x80480d4c - 0x80004000,{CODEC_UTF8,0,0,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// dialogue 2
{0x804798e0 - 0x80004000,{CODEC_UTF8,0,0,0,F01006590155AC000,"01000130150FA000","1.0.0"}},// choice
{0x80046700 - 0x80004000,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},
{0x8003A2c0 - 0x80004000,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// choice
{0x8003EAB0 - 0x80004000,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// TIPS list (menu)
{0x8004C648 - 0x80004000,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// system message
{0x80050374 - 0x80004000,{CODEC_UTF16,0,0,_0100978013276000,0,"0100957016B90000","1.0.0"}},// TIPS (red)
{0x80ac4d88 - 0x80004000,{CODEC_UTF32,0,0,F0100936018EB4000,"0100936018EB4000","1.0.3"}},// Main text
{0x808f7e84 - 0x80004000,{CODEC_UTF32,0,0,F0100936018EB4000,"0100936018EB4000","1.0.3"}},// Item name
{0x80bdf804 - 0x80004000,{CODEC_UTF32,0,0,F0100936018EB4000,"0100936018EB4000","1.0.3"}},// Item description
{0x81e75940 - 0x80004000,{CODEC_UTF16,0,0,T0100982015606000,F0100982015606000,"0100982015606000","1.0.0"}},// Hamekai.TalkPresenter$$AddMessageBacklog
{0x81c9ae60 - 0x80004000,{CODEC_UTF16,0,0,T0100982015606000,F0100982015606000,"0100982015606000","1.0.0"}},// Hamekai.ChoicesText$$SetText
{0x81eb7dc0 - 0x80004000,{CODEC_UTF16,0,0,T0100982015606000,F0100982015606000,"0100982015606000","1.0.0"}},// Hamekai.ShortStoryTextView$$AddText
{0x80225C3C - 0x80004000,{CODEC_UTF8,8,0,0,F010001D015260000,"010001D015260000","1.0.0"}},
{0x80241088 - 0x80004000,{CODEC_UTF8,8,0,0,F0100AEC013DDA000,"0100AEC013DDA000","1.0.0"}},//english ver
//Story of Seasons a Wonderful Life
{0x80ac4d88,{CODEC_UTF32,0,0,F0100936018EB4000,"0100936018EB4000","1.0.3"}},// Main text
{0x808f7e84,{CODEC_UTF32,0,0,F0100936018EB4000,"0100936018EB4000","1.0.3"}},// Item name
{0x80bdf804,{CODEC_UTF32,0,0,F0100936018EB4000,"0100936018EB4000","1.0.3"}},// Item description
//Hamefura Pirates
{0x81e75940,{CODEC_UTF16,0,0,T0100982015606000,F0100982015606000,"0100982015606000","1.0.0"}},// Hamekai.TalkPresenter$$AddMessageBacklog
{0x81c9ae60,{CODEC_UTF16,0,0,T0100982015606000,F0100982015606000,"0100982015606000","1.0.0"}},// Hamekai.ChoicesText$$SetText
{0x81eb7dc0,{CODEC_UTF16,0,0,T0100982015606000,F0100982015606000,"0100982015606000","1.0.0"}},// Hamekai.ShortStoryTextView$$AddText
//Death end re;Quest 2
{0x80225C3C,{CODEC_UTF8,8,0,0,F010001D015260000,"010001D015260000","1.0.0"}},
//Death end re;Quest
{0x80241088,{CODEC_UTF8,8,0,0,F0100AEC013DDA000,"0100AEC013DDA000","1.0.0"}},//english ver
};
return 1;

View File

@ -254,30 +254,40 @@ void QNPJH50909(hook_stack* stack, HookParam* hp, uintptr_t* data, uintptr_t* sp
}
namespace ppsspp{
std::unordered_map<uintptr_t,emfuncinfo>emfunctionhooks= {
//Shinigami to Shoujo
{0x883bf34,{0,1,0,0,ULJS00403_filter,"ULJS00403"}},
//Amagami
{0x0886775c,{0,0,0,ULJS00339,0,"ULJS00339"}},// String.length()
//Sekai de Ichiban Dame na Koi
{0x8814adc,{0,0,0,0,NPJH50909_filter,"ULJM05878"}},// name + dialouge
{0x8850b2c,{0,0,0,0,NPJH50909_filter,"ULJM05878"}},// onscreen toast
//Dunamis15
{0x0891D72C,{CODEC_UTF8,0,0,0,ULJM06119_filter,"ULJM06119"}},
//Princess Evangile Portable
{0x88506d0,{CODEC_UTF16,2,0,0,ULJM06036_filter,"ULJM06036"}},// [0x88506d0(2)...0x088507C0(?)] // name text text (line doubled)
//Kin'iro no Corda 2f
{0x89b59dc,{0,0,0,ULJM05428,0,"ULJM05428"}},
//Kin'iro no Corda
{0x886162c,{0,0,0,ULJM05054,0,"ULJM05054"}},// dialogue: 0x886162c (x1), 0x889d5fc-0x889d520(a2) fullLine
{0x8899e90,{0,0,0,ULJM05054,0,"ULJM05054"}},// name 0x88da57c, 0x8899ca4 (x0, oneTime), 0x8899e90
//Sol Trigger
{0x8952cfc,{CODEC_UTF8,0,0,0,NPJH50619F,"NPJH50619"}},//dialog
{0x884aad4,{CODEC_UTF8,0,0,0,NPJH50619F,"NPJH50619"}},//description
{0x882e1b0,{CODEC_UTF8,0,0,0,NPJH50619F,"NPJH50619"}},//system
{0x88bb108,{CODEC_UTF8,2,0,0,NPJH50619F,"NPJH50619"}},//battle tutorial
{0x89526a0,{CODEC_UTF8,0,0,0,NPJH50619F,"NPJH50619"}},//battle info
{0x88bcef8,{CODEC_UTF8,1,0,0,NPJH50619F,"NPJH50619"}},//battle talk
//Fate/EXTRA CCC
{0x8958490,{0,0,0,0,NPJH50505F,"NPJH50505"}},
//Kamigami no Asobi InFinite
{0x088630f8,{0,0,0,QNPJH50909,0,"NPJH50909"}}, // text, choice (debounce trailing 400ms), TODO: better hook
{0x0887813c,{0,3,4,0,0,"NPJH50909"}}, // Question YN
//Gekka Ryouran Romance
{0x88eeba4,{0,0,0,0,ULJM05943F,"ULJM05943"}},// a0 - monologue text
{0x8875e0c,{0,1,6,0,ULJM05943F,"ULJM05943"}},// a1 - dialogue text
//My Merry May with be
{0x886F014,{0,3,0,0,FULJM05603,"ULJM05603"}},
//Corpse Party -The Anthology- Sachiko no Ren'ai Yuugi ♥ Hysteric Birthday 2U - Regular Edition
{0x88517C8,{0,1,0,0,FULJM05603,"ULJM06114"}},
};