spice2x / spice2x.github.io

🌶️ spice2x is a spicier fork of SpiceTools with hundreds of bug fixes and new features 🌶️
https://spice2x.github.io/
GNU General Public License v3.0
87 stars 2 forks source link

Add Chase Chase Jokers support #116

Closed oleg238948234 closed 4 months ago

oleg238948234 commented 4 months ago

patch.txt

sp2xdev commented 4 months ago

Does the game need any special instructions to run, other than this patch?

I modified XML files in prop directory to a point until it boots (side note: it would be immensely helpful for someone to clean this up, whoever is sharing the data), so that part is OK.

What is not OK is that some part of the binary has the wrong idea where the Unity data files are located, depending on what directory you launch from. e.g.,

I:Main: EXECEXE::ReplacePath game/ChaseProject_Data/ F:\ccj\spice64_Data

above seems wrong, because it should be F:\ccj\game\chaseproject_data.

After that, nothing happens (no windows show up).

I:Main: dll_entry_main
I:MODULE ADDRESS: kamunity.dll : 0x0000000180000000
I:CPackageLoader::LoadModeSetting: LoadMode = 2
I:CPackageLoader::Pause: isPause = 0, waitSec = 0, loadThreadPriority = 2
I:Main: EXECEXE::CreateInstance flag : 0x0
W:pkglist: ea3_pkglist_open_internal: no list.
I:Main: EXECEXE::TemporaryDirectory : .\ee_tmp
I:Main: EXECEXE::ReplacePath game/ChaseProject_Data/ F:\ccj\spice64_Data
I:Main: EXECEXE::ReplacePath game/ F:\ccj
I:Main: EXECEXE::HookModule shlwapi.dll 0x3
I:Main: EXECEXE::HookModule windowscodecs.dll 0x3
I:Main: EXECEXE::HookModule d3d11.dll 0x1
I:Main: EXECEXE::HookModule dxgi.dll 0x1
I:Main: EXECEXE::HookModule d3d10warp.dll 0x1
I:Main: EXECEXE::HookModule mfplat.dll 0x1
I:Main: EXECEXE::HookModule rtworkq.dll 0x1
I:Main: EXECEXE::HookModule nvldumdx.dll 0x1
I:Main: EXECEXE::HookModule nvwgf2umx.dll 0x1
I:Main: EXECEXE::HookModule UnityPlayer.dll 0x2
I:Main: EXECEXE::HookModule WinPixEventRuntime.dll 0x2
I:Main: EXECEXE::HookModule mono.dll 0x2
I:Main: EXECEXE::HookModule mono-2.0-bdwgc.dll 0x2
I:Main: EXECEXE::HookModule baselib.dll 0x2
I:Main: EXECEXE::HookModule GameAssembly.dll 0x2
I:Main: command line : "F:\ccj\spice64.exe"  -hp 0000000180000000 -logFile dev/raw/log/output_log.txt
I:Main: EXECEXE::PreLoadLibraries mfplat.dll,dxgi.dll,dcomp.dll
I:Main: UnityPlayer.dll :0x000000000a730000
I:Main: UnityMain :0x000000000ac70c80

the unity log says:

Mono path[0] = 'F:/ccj/spice64_Data/Managed'
Mono config path = 'F:/ccj/MonoBleedingEdge/etc'

There also seems to be an issue with a crash inside the kamunity DLL when you launch the game from command line, so it seems to be some relative path issue (perhaps the game DLL expects it to be launched byh chaseproject.exe and not spice64.exe and ends up being confused).

sp2xdev commented 4 months ago

For the first issue, that's my bad, I missed the part about modifying avs-config.xml

from

<root>
<device __type="str">.</device>
</root>

to

<root>
<device __type="str">.</device>
<option>posix=0</option>
</root>

the second issue is still outstanding; the game crashes if launched from the command line.

There are a handful of other non-critical issues that we can either take care of, or at least document them so people don't ask the same questions over and over.

Thanks.

LupinThidr commented 4 months ago

perhaps the game DLL expects it to be launched byh chaseproject.exe and not spice64.exe and ends up being confused

execexe hooks all file-related functions to change the path _Data to the path specified in ee-config. F:\ccj\spice64_Data would be transparently changed to game/ChaseProject_Data/ it could eventually be replaced entirely, its purpose is to convert win32 filesystem + module to avs calls / manual loading so it'd be compatible with Konami's DRM. I think Bombergirl AC is completely broken on non-Win7 because of it?

side note: it would be immensely helpful for someone to clean this up, whoever is sharing the data There are a handful of other non-critical issues that we can either take care of, or at least document them so people don't ask the same questions over and over.

If you're only referring to the avs-config mount and ea3-config soft, the cleanest way would be doing it inside of the tools, many users can't even edit the correct ea3-config services node... TBS also requires posix=0, a couple of ark engine games do too. It's specified in prop/bootstrap.xml along with default nvram paths, heap size(s) and app configuration (prop/app-config on bemanitools/spicetools), but this file is intentionally removed from most published data.

oleg238948234 commented 4 months ago

What is not OK is that some part of the binary has the wrong idea where the Unity data files are located, depending on what directory you launch from. e.g.,

I:Main: EXECEXE::ReplacePath game/ChaseProject_Data/ F:\ccj\spice64_Data

above seems wrong, because it should be F:\ccj\game\chaseproject_data.

As @LupinThidr said, that's completely normal behaviour for execexe. If path hooks didn't apply properly, the game wouldn't even start.

There also seems to be an issue with a crash inside the kamunity DLL when you launch the game from command line, so it seems to be some relative path issue (perhaps the game DLL expects it to be launched byh chaseproject.exe and not spice64.exe and ends up being confused).

I'm not sure I can recreate this problem. I ran the game through command line multiple times and it worked fine for me. On real hardware the game runs under bootstrap.exe like any other konami game, that's kinda the whole point of execexe.

sp2xdev commented 4 months ago

Thanks for your contribution. This has been merged.