pumpitupdev / pumptools

A collection of tools to run Pump It Up games.
The Unlicense
22 stars 7 forks source link

Pro/Pro2: patch.piuio_exit.test_serv=1 Not working #43

Closed concubidated closed 2 years ago

concubidated commented 2 years ago

Bug report

Description

Trying to use the piuio_exit.test.serv hook option is not working in pro/pro2. Works in every other game.

Affected games and versions

Pro Pro2 Jump (same as prohook)

Pumptools versions tested

Master Branch

OS and hardware specs

Linux pumpos 4.15.0-177-generic #186-Ubuntu SMP Thu Apr 14 20:23:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Real PIUIO Emulated PIUIO with joystick

concubidated commented 2 years ago

I added some logging to see if it was even making it to the module, and noticed some weird behavior.

[I][2022/5/18-17:19:7:245][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:7:245][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 0
[I][2022/5/18-17:19:7:245][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:7:245][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 1
[I][2022/5/18-17:19:7:245][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:7:245][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:7:848][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:7:849][piuio-khack.c][piuio-khack.c:44] Detected PIUIO
[I][2022/5/18-17:19:7:849][patch-piuio][piuio.c:94] Opening PIUIO: lxio
[I][2022/5/18-17:19:7:858][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:7:858][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:8:457][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:8:457][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:8:457][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:9:57][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:9:107][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:9:107][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:9:709][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:9:759][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:9:759][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:10:369][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:10:419][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:10:419][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:11:21][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:11:71][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:11:71][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:11:673][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:11:723][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:11:723][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:12:333][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:12:383][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:12:384][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:12:985][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:13:35][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:13:36][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:19:13:641][patch-piuio][piuio.c:86] Enumerating PIUIO emulation
[I][2022/5/18-17:19:13:692][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:19:13:692][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2

I do not see this Enumerating PIUIO emulation loop on other games. and the irp->op never seems to make it to CNH_USBHOOK_IRP_OP_CTRL_MSG = 9 where the test+serv check is.

NX for example

[I][2022/5/18-17:29:38:493][piuio-exit.c][piuio-exit.c:15] Initialized
[I][2022/5/18-17:29:38:624][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:38:624][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 0
[I][2022/5/18-17:29:38:624][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:38:624][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 1
[I][2022/5/18-17:29:38:624][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:38:624][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 2
[I][2022/5/18-17:29:39:225][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:39:225][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 3
[I][2022/5/18-17:29:39:225][piuio-exit.c][piuio-exit.c:33] Step 3: OP_OPEN
[I][2022/5/18-17:29:39:225][piuio-exit.c][piuio-exit.c:41] Detected PIUIO
[I][2022/5/18-17:29:39:232][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:39:232][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 7
[I][2022/5/18-17:29:39:232][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:39:232][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 8
[I][2022/5/18-17:29:39:247][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:39:247][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 9
[I][2022/5/18-17:29:39:247][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:39:247][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 9
[I][2022/5/18-17:29:39:264][piuio-exit.c][piuio-exit.c:21] Step 1: patch_piuio_exit_usbhook
[I][2022/5/18-17:29:39:264][piuio-exit.c][piuio-exit.c:27] Step 2: irp->op: 9

Update: I think its all related to the khack, still investigating

concubidated commented 2 years ago

https://github.com/concubidated/pumptools/commit/2202aa2f857bc5ce46937b8581642d38c7452944

Hacky fix, moving the piuio-exit patch before khack.

I think it has to do with the cnh_usbhook_invoke_next_reset_advance() in khack, and it not being able to make it correctly to the next patch. I assume you probably want a real solution, but I can also PR this if you want.

concubidated commented 2 years ago

I am dumb, much easier fix https://github.com/pumpitupdev/pumptools/pull/44

voidderef commented 2 years ago

Thanks for digging into this and using the issue to dump your thoughts and debug logs. Even your PR fixes that already, it might be useful in the future to come back to this.

Therefore, I consider this done and close the issue.