forked from Hay1tsme/segatools
Kemono Friends support / 32-bit CHC300 support #36
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Haruka/segatools:kemonofr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds support for Kemono Friends 3: Planet Tours.
The only thing that does not work is LED support (however, implemented), as the game seems to be loading that DLL twice/threaded which causes an instant crash on appling the file hooks. (See the FIXME comment)
Notable design choices or changes:
Hey,
thanks again for your awesome PR. I just reviewed it and noticed seome improvements and some missing parts. Please make sure to add kemono also to the
Package.mk
file otherwise it won't get published inside the segatools.zip.So the only QoL features which are still missing are:
Not sure if 2. is easily doable as I also struggled with that on my local kemono version, which is not that polsihed so I would prefer your PR ;)
Also don't forget to update the readme.md to list support for Kemono Friends 3 ;)
@ -0,0 +54,4 @@
; The /24 LAN subnet that the emulated keychip will tell the game to expect.
; If you disable netenv then you must set this to your LAN's IP subnet, and
; that subnet must start with 192.168.
subnet=192.168.172.0
The real keychip subnet for this game is
192.168.179.0
.woops, copy-paste
@ -0,0 +2,4 @@
pushd %~dp0
start "AM Daemon" /min cmd /C timeout 10 ^& inject_x64 -d -k kemonohook_x64.dll ../amdaemon.exe -f -c ../config.json"
Ok that is a really cursed way of avoiding AM Daemon from closing due to a missing hook :D
oh my god lmao I totally forgot to update that, yeah that was while the hook was broken
It should be
kemonohook_x64.dll
and also please remove-f
as it is not needed.On the other hand, is it needed to actually excecute the game inside the folder
UnityApp
? I would prefer to set all scripts so that you can launch the game from the normal folder instead ofUnityApp
.Fixed. I had issues getting BepInEx to run from the root folder, but eventually that resolved by placing BepInEx inside the root folder instead of UnityApp, so I added a note to the ini file about that.
@ -76,3 +64,1 @@
int fwdlusb_ReleaseThread(uint16_t *rResult);
int fwdlusb_AttachThreadCount(uint16_t *rCount, uint16_t *rMaxCount);
int fwdlusb_getErrorLog(uint16_t index, uint8_t *rData, uint16_t *rResult);
__stdcall int fwdlusb_open(uint16_t *rResult);
I would actually prefer
WINAPI
instead of__stdcall
, looks nicer to read ;)Fixed
Ah and it should be
int WINAPI
instead ofWINAPI int
;)@ -0,0 +13,4 @@
assert(cfg != NULL);
assert(filename != NULL);
cfg->vk_test = GetPrivateProfileIntW(L"io3", L"test", '1', filename);
Maybe also change this to 0x71, 0x72 and 0x73 (F1, F2, F3) so it matches all other segatools games. (And you won't accidentally enter test menu while typing numbers lol)
The reason I intentionally changed this is that the Configuration Manager for BepInEx takes F1, so I got really annoyed always getting kicked out of the session to test menu if I just wanted to flip a mod setting.
I have absolutely no issues with reverting for consistency sake
@ -0,0 +50,4 @@
need to persist beyond the lifetime of the process.
Minimum API version: 0x0100 */
void kemono_io_jvs_read_coin_counter(uint16_t *out);
You missed the deinition of
fixed
@ -145,2 +149,4 @@
clock_hook_insert_hooks(result);
proc_addr_insert_hooks(result);
if (hook_load_callback != NULL){
hook_load_callback(result, target_module);
That's a nice idea! I like it!
Awesome, you still missed the part where you have to add the zip file to the
segatools.zip
file:I actually fixed LEDs by just pre-loading the SerialPortAPI.dll lmao
The LED mappings have been added, plus another function for the button LEDs that I missed.
About the environment variable, sure can just hook the entirety of GetEnvironmentVariableA/W but since they're per process anyways I would personally think it's fine but /shrug
Rest is done.
Also, I am not sure if
3eef5dd209
is breaking, because that was definetly wrong, compared with the official definition, it's supposed to be a ushort:woops, my bad, can't really test this, fixed
@ -0,0 +124,4 @@
[io3]
; Test button virtual-key code. Default is the 1 key.
test=0x31
Would it be possible to set them as F1, F2 and F3 as well?
Hmm, wasn't that fine w.r.t. this?
#36 (comment)
Oh nice I was able to figure out how to correctly read the firmware version in game but I noticed that no FWDL function is being hooked, normally it should start updating the printer when the firmware version is
0.00
:Either the data has been tampered with or SEGA disabled something via code, because in 2.02, it reads this:
so the entire fwdlusb process is skipped and no functions are called to begin with.
Hmm I also see this check in my game data but still cannot figure out how to trigger the pinter update properly. Btw you have to define the number of firmwares correctly liek this:
Firmware pregeneration was added for Kemono and FGO was also fixed now by correcting the signature for imageformat for CHC330.
Removed the WIP tag.
WIP: Kemono Friends support / 32-bit CHC300 supportto Kemono Friends support / 32-bit CHC300 supportThank you for fixing FGO printer support as well. As all question and suggestions have been answered, I'm going to merge it now :)