Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55324bb5a8 | |||
| 211f40ae53 | |||
| deddf93d3f | |||
| c37d0e92f4 | |||
| fa3a3aa9cc | |||
| 186471508f | |||
| 1f0a6bc016 | |||
| da08b565f8 | |||
| ead6489e63 | |||
| 19d6139e13 | |||
| 0047d7b64f | |||
| 264cdc2528 | |||
| ab4615dfe9 | |||
| cf34ac6e01 | |||
| 6c7bbabced | |||
| 81ddaeeda7 | |||
| b9cae22212 | |||
| 8201e29e26 | |||
| 71144b4cd1 | |||
| 5af8d2463a |
13
README.md
13
README.md
@ -1,14 +1,12 @@
|
|||||||
### Games and regions
|
### Games and regions
|
||||||
- **3rd**: glb/sea/tw/kr/jp **v6.9.0+**, cn **v7.0.0+**
|
- **3rd**: glb/sea/tw/kr/jp **v7.1.0+**, cn **v7.2.0+**
|
||||||
- **SR**: os/cn **v1.4.0** (potentially unsafe, but no bans were reported since v1.1.0)
|
- **SR**: os/cn **v1.6.0** (potentially unsafe, but no bans were reported since v1.1.0)
|
||||||
|
|
||||||
You can expect newer versions to work immediately after release with the same jadeite binary if the version is specified with a + above (currently none).
|
You can expect newer versions to work immediately after release with the same jadeite binary if the version is specified with a + above.
|
||||||
|
|
||||||
### Information
|
### Information
|
||||||
The anticheat the games use is fundamentally incompatible with Wine in multiple ways. This tool launches the game without it (`injector`) and imitates it's behaviour (`game_payload`).
|
The anticheat the games use is fundamentally incompatible with Wine in multiple ways. This tool launches the game without it (`injector`) and imitates it's behaviour (`game_payload`).
|
||||||
|
|
||||||
**SR-specific**: this tool disables the use of DirectX shared resources in a rather hacky way. It is required, as there is no (and most likely never will be) shared resources support in DirectX translation layers (WineD3D/DXVK). Refer to [configuration](#configuration) if you wish to run the game without the fix.
|
|
||||||
|
|
||||||
**Using third-party software (such as this tool) with the games violates their Terms of Service**. Therefore, **you may receive a ban**. No bans were ever reported with 3rd, however the legacy patch for SR did cause many. **Use at your own risk and only if you understand all the possible consequences**.
|
**Using third-party software (such as this tool) with the games violates their Terms of Service**. Therefore, **you may receive a ban**. No bans were ever reported with 3rd, however the legacy patch for SR did cause many. **Use at your own risk and only if you understand all the possible consequences**.
|
||||||
|
|
||||||
**This is not a cheating tool**. Using it with Windows is not possible, and Windows support is not planned or intended in any way. However, as it does not perform any on-disk file modifications, you may reuse the same game install for Windows if you have a dual-boot setup.
|
**This is not a cheating tool**. Using it with Windows is not possible, and Windows support is not planned or intended in any way. However, as it does not perform any on-disk file modifications, you may reuse the same game install for Windows if you have a dual-boot setup.
|
||||||
@ -19,7 +17,7 @@ The anticheat the games use is fundamentally incompatible with Wine in multiple
|
|||||||
**Wine 8.0+ is recommended**, as lower versions leak "The Wine project" as the device identifier. Not critical, but taking a precaution never hurt anyone. **DXVK is strongly recommended.**
|
**Wine 8.0+ is recommended**, as lower versions leak "The Wine project" as the device identifier. Not critical, but taking a precaution never hurt anyone. **DXVK is strongly recommended.**
|
||||||
|
|
||||||
**3rd-specific**:
|
**3rd-specific**:
|
||||||
- ~~In some cases, and if you're not using Proton GE, a fix for Media Foundation may be required to play videos. The Game may crash without it. You can download it from [here](https://github.com/z0z0z/mf-install).~~ **Unfortunately, it appears like the fix is no longer available, please use [Wine-GE-Proton](https://github.com/GloriousEggroll/wine-ge-custom) instead.**
|
- **Wine 8.21+ or [Wine-GE-Proton](https://github.com/GloriousEggroll/wine-ge-custom) is required to play videos. The game may show a black screen or crash on lower versions.**
|
||||||
- You might need to [limit the number of cores available to the game](https://github.com/z0z0z/mf-install/issues/44) if your CPU has more than 8.
|
- You might need to [limit the number of cores available to the game](https://github.com/z0z0z/mf-install/issues/44) if your CPU has more than 8.
|
||||||
|
|
||||||
Manual usage instructions:
|
Manual usage instructions:
|
||||||
@ -38,9 +36,6 @@ These environment variables can be used to configure the behaviour of the tool.
|
|||||||
|
|
||||||
- `WAIT_BEFORE_RESUME=1` - show a messagebox and wait for user input before resuming the game process. Useful on my side for debugging
|
- `WAIT_BEFORE_RESUME=1` - show a messagebox and wait for user input before resuming the game process. Useful on my side for debugging
|
||||||
|
|
||||||
**SR-exclusive**:
|
|
||||||
- `SRFIX_DISABLE=1` - disable shared resources fix. Not recommended. Doing so will most likely cause the game to not run at all
|
|
||||||
|
|
||||||
### Internals
|
### Internals
|
||||||
This tool consists of three parts: the main injector (`injector/src/exe.c`), the launcher payload (`injector/src/dll.c`) and the game payload (`game_payload`).
|
This tool consists of three parts: the main injector (`injector/src/exe.c`), the launcher payload (`injector/src/dll.c`) and the game payload (`game_payload`).
|
||||||
|
|
||||||
|
|||||||
@ -9,11 +9,13 @@ sources = [
|
|||||||
'src/ace.c',
|
'src/ace.c',
|
||||||
'src/pe.c',
|
'src/pe.c',
|
||||||
'src/game.c',
|
'src/game.c',
|
||||||
'src/hi3.c',
|
|
||||||
'src/hsr.c',
|
|
||||||
'src/utils.c',
|
'src/utils.c',
|
||||||
'src/msg.c',
|
'src/msg.c',
|
||||||
'src/tx.c'
|
'src/tx.c',
|
||||||
|
|
||||||
|
'src/hi3/hi3.c',
|
||||||
|
|
||||||
|
'src/hsr/hsr.c'
|
||||||
]
|
]
|
||||||
|
|
||||||
if fs.exists('src/core.c')
|
if fs.exists('src/core.c')
|
||||||
|
|||||||
@ -1,36 +0,0 @@
|
|||||||
#include <utils.h>
|
|
||||||
#include <msg.h>
|
|
||||||
#include <pe.h>
|
|
||||||
#include <main.h>
|
|
||||||
|
|
||||||
#include <game.h>
|
|
||||||
|
|
||||||
const char *HI3_TXS_SECTION_NAME_OLD = ".bh3";
|
|
||||||
const char *HI3_TXS_SECTION_NAME_NEW = ".ace";
|
|
||||||
|
|
||||||
const char *HI3_BASE_MODULE_NAME = "BH3Base.dll";
|
|
||||||
const char *HI3_ASSEMBLY_PATH = "BH3_Data\\Native\\UserAssembly.dll";
|
|
||||||
const char *HI3_TVM_SECTION_NAME = ".tvm0";
|
|
||||||
|
|
||||||
|
|
||||||
void hi3_fill_data(struct game_data *buf) {
|
|
||||||
// !!! TEMPORARY WORKAROUND
|
|
||||||
// Name in exe matches name in base module
|
|
||||||
HMODULE exe = GetModuleHandleA(NULL);
|
|
||||||
if (pe_find_section(exe, HI3_TXS_SECTION_NAME_OLD)) {
|
|
||||||
// Old name
|
|
||||||
buf->txs_section_name = HI3_TXS_SECTION_NAME_OLD;
|
|
||||||
} else if (pe_find_section(exe, HI3_TXS_SECTION_NAME_NEW)) {
|
|
||||||
// New name
|
|
||||||
buf->txs_section_name = HI3_TXS_SECTION_NAME_NEW;
|
|
||||||
} else {
|
|
||||||
// This should not happen
|
|
||||||
msg_err_a("Could not determine region-specific section name. " ISSUE_SUFFIX);
|
|
||||||
}
|
|
||||||
|
|
||||||
buf->base_module_name = HI3_BASE_MODULE_NAME;
|
|
||||||
buf->assembly_path = HI3_ASSEMBLY_PATH;
|
|
||||||
buf->tvm_section_name = HI3_TVM_SECTION_NAME;
|
|
||||||
|
|
||||||
buf->unityplayer_callback = NULL;
|
|
||||||
}
|
|
||||||
21
game_payload/src/hi3/hi3.c
Normal file
21
game_payload/src/hi3/hi3.c
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#include <utils.h>
|
||||||
|
#include <msg.h>
|
||||||
|
#include <pe.h>
|
||||||
|
#include <main.h>
|
||||||
|
|
||||||
|
#include <game.h>
|
||||||
|
|
||||||
|
const char *HI3_BASE_MODULE_NAME = "BH3Base.dll";
|
||||||
|
const char *HI3_ASSEMBLY_PATH = "BH3_Data\\Native\\UserAssembly.dll";
|
||||||
|
const char *HI3_TXS_SECTION_NAME = ".ace";
|
||||||
|
const char *HI3_TVM_SECTION_NAME = ".tvm0";
|
||||||
|
|
||||||
|
|
||||||
|
void hi3_fill_data(struct game_data *buf) {
|
||||||
|
buf->base_module_name = HI3_BASE_MODULE_NAME;
|
||||||
|
buf->assembly_path = HI3_ASSEMBLY_PATH;
|
||||||
|
buf->txs_section_name = HI3_TXS_SECTION_NAME;
|
||||||
|
buf->tvm_section_name = HI3_TVM_SECTION_NAME;
|
||||||
|
|
||||||
|
buf->unityplayer_callback = NULL;
|
||||||
|
}
|
||||||
@ -9,7 +9,7 @@ const char *HSR_ASSEMBLY_PATH = "GameAssembly.dll";
|
|||||||
const char *HSR_TXS_SECTION_NAME = ".ace";
|
const char *HSR_TXS_SECTION_NAME = ".ace";
|
||||||
const char *HSR_TVM_SECTION_NAME = ".tvm0";
|
const char *HSR_TVM_SECTION_NAME = ".tvm0";
|
||||||
|
|
||||||
#define HSR_VERSION "1.4.0"
|
#define HSR_VERSION "1.6.0"
|
||||||
|
|
||||||
enum hsr_region {
|
enum hsr_region {
|
||||||
HSR_INVALID,
|
HSR_INVALID,
|
||||||
@ -23,15 +23,15 @@ struct crc_region_pair {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const struct crc_region_pair HSR_REGIONS[] = {
|
const struct crc_region_pair HSR_REGIONS[] = {
|
||||||
{ 0xbae3646f, HSR_OS }, // os v1.4.0
|
{ 0x5741ce50, HSR_OS }, // os v1.6.0
|
||||||
{ 0x9e5c2f80, HSR_CN } // cn v1.4.0
|
{ 0xce891f97, HSR_CN } // cn v1.6.0
|
||||||
};
|
};
|
||||||
|
|
||||||
#define JUMP_SIZE (6 + sizeof(void*))
|
#define JUMP_SIZE (6 + sizeof(void*))
|
||||||
|
|
||||||
// Temporarily hardcoded offset
|
// Temporarily hardcoded offset
|
||||||
// v1.4.0, same for os and cn
|
// v1.6.0, same for os and cn
|
||||||
#define WTSUD_PATCH_OFFSET 0x16430
|
#define WTSUD_PATCH_OFFSET 0x16510
|
||||||
|
|
||||||
char wtsud_original_bytes[JUMP_SIZE];
|
char wtsud_original_bytes[JUMP_SIZE];
|
||||||
char *wtsud_patch_addr;
|
char *wtsud_patch_addr;
|
||||||
@ -49,12 +49,12 @@ static void _wtsud_stub() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void _unityplayer_callback(HMODULE unityModule) {
|
static void _unityplayer_callback(HMODULE unityModule) {
|
||||||
if (utils_env_enabled("SRFIX_DISABLE")) {
|
if (utils_env_enabled("CHECKSUM_PATCH_DISABLE")) {
|
||||||
msg_info_a("Shared resources fix disabled. The game may not work");
|
msg_info_a("DirectX library verification patch disabled. The game will not work");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove dependency on shared resources by patching WriteTextureStatisticUserData
|
// Remove check by patching WriteTextureStatisticUserData
|
||||||
unload_ctr_inc();
|
unload_ctr_inc();
|
||||||
|
|
||||||
wtsud_patch_addr = ((char*)unityModule) + WTSUD_PATCH_OFFSET;
|
wtsud_patch_addr = ((char*)unityModule) + WTSUD_PATCH_OFFSET;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
project('jadeite', 'c', version: '3.0.9')
|
project('jadeite', 'c', version: '3.0.12')
|
||||||
|
|
||||||
nasm = find_program('nasm')
|
nasm = find_program('nasm')
|
||||||
gen_res = find_program('gen_resources.sh')
|
gen_res = find_program('gen_resources.sh')
|
||||||
|
|||||||
@ -1,42 +1,42 @@
|
|||||||
{
|
{
|
||||||
"jadeite": {
|
"jadeite": {
|
||||||
"version": "3.0.8"
|
"version": "3.0.12"
|
||||||
},
|
},
|
||||||
"games": {
|
"games": {
|
||||||
"hi3rd": {
|
"hi3rd": {
|
||||||
"global": {
|
"global": {
|
||||||
"status": "verified",
|
"status": "verified",
|
||||||
"version": "6.9.0"
|
"version": "7.1.0"
|
||||||
},
|
},
|
||||||
"sea": {
|
"sea": {
|
||||||
"status": "verified",
|
"status": "verified",
|
||||||
"version": "6.9.0"
|
"version": "7.1.0"
|
||||||
},
|
},
|
||||||
"china": {
|
"china": {
|
||||||
"status": "verified",
|
"status": "verified",
|
||||||
"version": "7.0.0"
|
"version": "7.2.0"
|
||||||
},
|
},
|
||||||
"taiwan": {
|
"taiwan": {
|
||||||
"status": "verified",
|
"status": "verified",
|
||||||
"version": "6.9.0"
|
"version": "7.1.0"
|
||||||
},
|
},
|
||||||
"korea": {
|
"korea": {
|
||||||
"status": "verified",
|
"status": "verified",
|
||||||
"version": "6.9.0"
|
"version": "7.1.0"
|
||||||
},
|
},
|
||||||
"japan": {
|
"japan": {
|
||||||
"status": "verified",
|
"status": "verified",
|
||||||
"version": "6.9.0"
|
"version": "7.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hsr": {
|
"hsr": {
|
||||||
"global": {
|
"global": {
|
||||||
"status": "verified",
|
"status": "unverified",
|
||||||
"version": "1.3.0"
|
"version": "1.6.0"
|
||||||
},
|
},
|
||||||
"china": {
|
"china": {
|
||||||
"status": "verified",
|
"status": "unverified",
|
||||||
"version": "1.3.0"
|
"version": "1.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user