Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Bakufuu Slash!! Kizna Arashi #4125

Closed
seta-san opened this issue Jan 10, 2021 · 16 comments · Fixed by #4225
Closed

[BUG] Bakufuu Slash!! Kizna Arashi #4125

seta-san opened this issue Jan 10, 2021 · 16 comments · Fixed by #4225
Assignees
Labels

Comments

@seta-san
Copy link
Contributor

seta-san commented Jan 10, 2021

Describe the bug
corrupted video from the camera. i can confirm that at least some of the video stream is from the camera because it reacts to the brightness in the room.

To Reproduce
just run the game and it comes to a screen asking you to plugin the eyetoy. you can press start and music will start/stop playing
corrupted video from camera

Expected behavior
the game shouldn't even show a screen asking for the eyetoy to be plugged in because it is
clear mpeg2 video from camera

GS Settings
default: software renderer

Emulation Settings
all defaults

System Info (please complete the following information):

@Florin9doi
Copy link
Contributor

Florin9doi commented Jan 10, 2021

First issue is that pcsx2 sends stall for a set interface request. The attached patch avoid this issue, however the game isn't playable due to video corruption

diff --git a/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp b/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp
index 32a1ff8a7..b79cb6d3c 100644
--- a/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp
+++ b/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp
@@ -338,6 +338,8 @@ namespace usb_eyetoy

                switch (request)
                {
+                       case InterfaceOutRequest | USB_REQ_SET_INTERFACE:
+                               return;
                        case VendorDeviceRequest | 0x1: //Read register
                                data[0] = s->regs[index & 0xFF];
                                p->actual_length = 1;

@jackun
Copy link
Contributor

jackun commented Jan 10, 2021

Hmm, usb_desc_handle_control ->usb_desc_set_interface should do it already

@Florin9doi
Copy link
Contributor

The request is made for an invalid interface (0xff??) and usb_desc_set_interface returns error

@seta-san
Copy link
Contributor Author

after struggling to get the freemcboot and opl loaded on my ps2 i've found that having music play when you press the start button on the "please plugin the eyetoy screen" is totally normal behavior.

unfortunately i can't get past it because the game doesn't like having to compete being loaded on a usb drive and reading from the usb camera.

@seta-san
Copy link
Contributor Author

First issue is that pcsx2 sends stall for a set interface request. The attached patch avoid this issue, however the game isn't playable due to video corruption

diff --git a/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp b/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp
index 32a1ff8a7..b79cb6d3c 100644
--- a/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp
+++ b/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp
@@ -338,6 +338,8 @@ namespace usb_eyetoy

                switch (request)
                {
+                       case InterfaceOutRequest | USB_REQ_SET_INTERFACE:
+                               return;
                        case VendorDeviceRequest | 0x1: //Read register
                                data[0] = s->regs[index & 0xFF];
                                p->actual_length = 1;

i wanted to see this. it actually does something really interesting. if you make the room dark the bottom half of the screen gets steady but the top half remains freaking out.

@Florin9doi
Copy link
Contributor

#3953

@seta-san
Copy link
Contributor Author

Fuck. I forgot i made one a while ago

@Florin9doi
Copy link
Contributor

Florin9doi commented Jan 12, 2021

The invalid set_interface request is no longer received if we respond with a correct config descriptor : jackun/USBqemu-wheel#30 (comment)
This should be recommended than sending a bad descriptor and then ignoring a bad request.

@jackun
Copy link
Contributor

jackun commented Jan 12, 2021

Uh, oops. Seems to work for me now. Maybe enough to fix the invalid descriptor:

diff --git a/pcsx2/USB/qemu-usb/desc.cpp b/pcsx2/USB/qemu-usb/desc.cpp
index c72254abb..c1ff13a48 100644
--- a/pcsx2/USB/qemu-usb/desc.cpp
+++ b/pcsx2/USB/qemu-usb/desc.cpp
@@ -491,6 +491,7 @@ int usb_desc_parse_config(const uint8_t* data, int len, USBDescDevice& dev)
                                        ep.bRefresh = d->u.endpoint.bRefresh;
                                        ep.bSynchAddress = d->u.endpoint.bSynchAddress;
                                        ep.extra = data + pos + d->bLength;
+                                       pos += ep.extra[0];
                                }
                                iface->eps.push_back(ep);
                        }

@refractionpcsx2
Copy link
Member

Can we retest with master please, see if this is resolved now?

@Florin9doi
Copy link
Contributor

It progressed from «Intro» to «Menus», but the video is still corrupted

@Florin9doi
Copy link
Contributor

Florin9doi commented Jan 17, 2021

First I suspected that this game uses a different format but after I configured the hardware camera for this game, I captured some packets and I injected them into PCSX2, nothing was changed.
After more tests, I observed the following pattern: the EyeToy games that use DMA_MODE_NORMAL work, but the EyeToy games that use DMA_MODE_CHAIN doesn't work. This issue may be similar to #3432.

@refractionpcsx2
Copy link
Member

I honestly doubt it's much of an issue with chain mode, it's probably just down to the IPU library it uses, the broken one happens to chain things in. Lots of games send video the IPU via chain mode (and even pause/resume it mid transfer) and they work absolutely fine.

@seta-san
Copy link
Contributor Author

Was jackun/USBqemu-wheel#55 ever figured out?

@refractionpcsx2
Copy link
Member

Was jackun/USBqemu-wheel#55 ever figured out?

does it have an impact on this issue?

@seta-san
Copy link
Contributor Author

Was jackun/USBqemu-wheel#55 ever figured out?

does it have an impact on this issue?

That's what I was wondering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants