USBqemu-wheel icon indicating copy to clipboard operation
USBqemu-wheel copied to clipboard

Eyetoy Support

Open seta-san opened this issue 4 years ago • 106 comments

i see there is at least some preliminary support for eyetoy in the code even if it isn't active. is there plans to make that available?

seta-san avatar May 03 '20 22:05 seta-san

Yes, please. No one seems to have attempted to get into EyeToy emulation, but all EyeToy titles would most likely jump directly to the Playable category if there was full EyeToy emulation. It's just a camera, it can't be that hard, right? Heck, the EyeToy can be used as a PC webcam.

SlyCooperReloadCoded avatar May 10 '20 09:05 SlyCooperReloadCoded

Notes:

  1. The develop branch (and others?) has a issue: it reorders the endpoints and descriptors: wheelErr

Patch 1: try to resolve it but SuperSpeed endpoints are disabled: usb_desc1.txt. Untested Patch 2: avoid the issue only for EyeToy: eyetoy.txt. This patch also clears a reserved bit from bmAttributes which is not present in a hardware device.

  1. The Windows and linux (a windows clone) drivers are configuring the camera to transfer jpeg pictures. PS2, or at least EyeToyPlay(1), is using a different format/compression. Immediately after OV header, partially documented by the linux driver, it sends an additional constant header: 69 70 75 6D 00 00 00 00 40 01 F0 00 01 00 00 00 and then compressed(?) data.

  2. EyeToyPlay(1)(SCES_515.13) and his OV driver are unstripped.

Florin9doi avatar May 27 '20 22:05 Florin9doi

it reorders the endpoints and descriptors:

Is there any difference? Seemed to "work" anyway.

jackun avatar May 27 '20 22:05 jackun

Is there any difference? Seemed to "work" anyway.

I haven't seen any difference. It is getting stuck the same

Florin9doi avatar May 27 '20 22:05 Florin9doi

  1. At the bytes [5:8] from header: ff ff ff 50 00 [ef bb ba bc] 00 01 00 00 00 14 00 is present an little-endian increasing counter. Between SOP (ff ff ff 50) and EOP (ff ff ff 51) it increases with ~320k, and between EOP (ff ff ff 51) and SOP (ff ff ff 50) it increases with ~10k: counter.txt

Florin9doi avatar May 28 '20 07:05 Florin9doi

  1. I modified the plugin to send a few frames captured from a hardware camera. The frames are received and then sent to the image processing unit (IPU) to decode them: ipu_decompressYCrCb(void *, void *, sceImage *, sceImage *, sceImage *), but the decoding fails and this message is observed in console: IPU1 running when IPU1 DMA disabled! CHCR 1 QWC 126. It seems that the PCSX2 decoding is bugged too.
  2. [69 70 75 6D](magic number) 00 00 00 00 [40 01](width) [F0 00](height) 01 00 00 00

Florin9doi avatar May 31 '20 07:05 Florin9doi

EyeToy Kinetic Combat works with pre-recorded data 😛 Untitled

Florin9doi avatar May 31 '20 09:05 Florin9doi

So the data was still MJPG, just different header or some huffman compressed raw?

jackun avatar May 31 '20 10:05 jackun

I have no idea yet. I saved the usb isoc packets using a linux test program. But because the decoder is already implemented in PCSX2 and not in game's driver, I think that it cannot be something very custom. //LE: something MPEG with these tables: snap3

Florin9doi avatar May 31 '20 10:05 Florin9doi

Thank you guys for working g so hard on this. I think peripheral emulation is going to be one of the last biggest compatibility boosters!

I also have an eyetoy and singstar. If doing some sort of straight passthrough would help figure out what's the plugin issue and what's a core issue I'm here to test

seta-san avatar May 31 '20 20:05 seta-san

Yes, thank you. I'm looking forward to this, this is most likely the only thing keeping all the EyeToy games from immediately jumping to the Playable category.

SlyCooperReloadCoded avatar Jun 02 '20 17:06 SlyCooperReloadCoded

Frames conversion works now: https://github.com/Florin9doi/USBqemu-wheel/commit/85ffc3c259ab47028d2f940c6e26f21c75ec764a example: https://i.imgur.com/2MZJcEM.mp4

Florin9doi avatar Jun 09 '20 16:06 Florin9doi

You guys are amazing

seta-san avatar Jun 09 '20 18:06 seta-san

Play 2 is still just green background and keeps spamming reg 0x71 which i don't remember what it was for

[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x01 (1)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)
[USBqemu] [eyetoy_handle_control]:360	*** WRITE reg 0x71 = 0x00 (0)

jackun avatar Jun 09 '20 19:06 jackun

I know and I made a ticket @https://github.com/PCSX2/pcsx2/issues/3432 but no reply so far. The game receives the usb packets and send them to IPU for decoding, but the IPU fails.

Florin9doi avatar Jun 09 '20 20:06 Florin9doi

The eye toy has a couple led lights on the front of it that it controls. Might it be trying to access those?

seta-san avatar Jun 10 '20 00:06 seta-san

Doh, it's the led.

jackun avatar Jun 10 '20 04:06 jackun

In this case, it's the misLED.

SlyCooperReloadCoded avatar Jun 10 '20 19:06 SlyCooperReloadCoded

Play 2 is still just green background and keeps spamming reg 0x71 which i don't remember what it was for

so it's basically bitching at you for a brighter room

seta-san avatar Jun 10 '20 20:06 seta-san

I pushed a new commit to capture video from a real webcam (v4l) but is noisy with many corrupted frames: Screenshot_2020-06-13_18-23-22

https://github.com/Florin9doi/USBqemu-wheel/commits/eyetoy Works only if the webcam supports native: 320x240/YUYV. No resize/format conversion.

Florin9doi avatar Jun 13 '20 15:06 Florin9doi

Extend/modify the API in videodev.h as needed as if this actually starts to work then the plan is to hide platform specific stuff in VideoDevice-inheriting classes.

Eyetoy v4l driver itself support YUYV? Keeps sending JPEG :D I guess not

ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'JPEG' (JFIF JPEG, compressed)

jackun avatar Jun 13 '20 16:06 jackun

It doesn't. The frames should be decompressed.

Florin9doi avatar Jun 13 '20 16:06 Florin9doi

I fixed the frames corruption and I added jpeg support for EyeToy cams: Screenshot_2020-06-17_19-19-49

Florin9doi avatar Jun 17 '20 16:06 Florin9doi

What's left :

  • [x] check if the image should be mirrored ?
  • [x] support for windows
  • [ ] speed and quality optimizations ?

Florin9doi avatar Jun 17 '20 16:06 Florin9doi

What's left :

  • [ ] check if the image should be mirrored ?
  • [ ] support for windows
  • [ ] speed and quality optimizations ?

I can test on hardware to see if it needs to be mirrored. It might also be nice to have a working driver for the actual eyetoy on windows 10.

seta-san avatar Jun 17 '20 16:06 seta-san

It might also be nice to have a working driver for the actual eyetoy on windows 10.

it works disabling testsigning, installing the old driver and enabling testsigning again

Florin9doi avatar Jun 17 '20 17:06 Florin9doi

It might also be nice to have a working driver for the actual eyetoy on windows 10.

it works disabling testsigning, installing the old driver and enabling testsigning again

You mean driver signing?

seta-san avatar Jun 17 '20 17:06 seta-san

yes

Florin9doi avatar Jun 17 '20 17:06 Florin9doi

yes

Tried that

seta-san avatar Jun 17 '20 17:06 seta-san

works for me

Florin9doi avatar Jun 17 '20 17:06 Florin9doi

@jackun, I tried to integrate it with videodev but now my device list combobox is empty. You know why?

Florin9doi avatar Jun 20 '20 06:06 Florin9doi

Works for me. device_init.cpp registers the devices to a std::map in RegisterDevice in deviceproxy.h and config dialog takes them from there. Trying to be clever but it just doesn't want to work with "plugins" getting loaded/unloaded into memory constantly :P

    Message:   Unhandled page fault @ 0x00000068
[00] 0x0x56a30101                                
[01] __kernel_rt_sigreturn                       
[02] 0x0xf6befbb9                                
[03] pthread_join                                
[04] usb_eyetoy::linux_api::V4L2::Close()        
[05] usb_eyetoy::eyetoy_close(USBDevice*)        
[06] USBclose                                    
[07] 0x0x566ec392                           

jackun avatar Jun 20 '20 06:06 jackun

I found the issue, USBinit / RegisterDevice::Register() are not called until a game is loaded or a new usb plugin is selected. Untitled patch:

diff --git a/src/Win32/Config.cpp b/src/Win32/Config.cpp
index 509760e..1129317 100644
--- a/src/Win32/Config.cpp
+++ b/src/Win32/Config.cpp
@@ -227,6 +227,7 @@ EXPORT_C_(BOOL) AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) {
 }

 EXPORT_C_(void) USBconfigure() {
+    RegisterDevice::Register();
     RegisterAPIs();
     DialogBox(hInst,
               MAKEINTRESOURCE(IDD_CONFIG),

Florin9doi avatar Jun 20 '20 16:06 Florin9doi

Probably, I've been testing the develop on linux mostly.

jackun avatar Jun 20 '20 16:06 jackun

I sent a PR for Linux/V4L and Windows/DirectShow. It works with EyeToy - Kinetic Combat and cameras with native support for 320x240 YUYV or JPEG. Tested with Sony EyeToy and C922. Should be enough for now

Florin9doi avatar Jun 21 '20 12:06 Florin9doi

What was the deal in the end with headers/footer so I won't forget? Frame size was in there somewhere.

jackun avatar Jun 21 '20 13:06 jackun

I posted my findings related to header and then I stopped investigating the remaining bytes when I realized they may not be used. Some may be used only by a few games? No idea. What I not posted is the format for intermediate data.

Every isoc packet is 896 bytes. It doesn't need a complete frame to start sending it, the USB packets may be sent as it is compressed (MPEG2). If no data is available, it will fill the isoc packet with 0xFF. The valid data and 0xFF padding may alternate in 16 bytes chunks.

Untitled

Florin9doi avatar Jun 21 '20 13:06 Florin9doi

Here is a program which can dump frames from a hardware camera : https://pastebin.com/461GCy2D

Florin9doi avatar Jun 21 '20 13:06 Florin9doi

Can someone post the latest dll with eyetoy support so it can be tested?

prafullpcsx2 avatar Jun 22 '20 09:06 prafullpcsx2

@prafullpcsx2 : USBqemu-wheel-0.9.1-eye.zip

Florin9doi avatar Jun 22 '20 19:06 Florin9doi

@Florin9doi Thanks. That seems to be working pretty well with the games that I tried. Had lots of fun with sega superstars. I was using my mobile phone camera as webcam and it seemed to work surprisingly better than my expectations.

prafullpcsx2 avatar Jun 22 '20 20:06 prafullpcsx2

I tried downloading that dll and I can't select my webcam. The only Device API is DirectShow and pressing Configure does nothing.

SlyCooperReloadCoded avatar Jun 23 '20 03:06 SlyCooperReloadCoded

Also, launching games with the plugin enabled causes PCSX2 to crash with this error:

https://imgur.com/a/NcPCFPU

Edit: that error only appears if "EyeToy" is selected. If I change it to "None" then the game boots. If I change it to "EyeToy" after it boots, it still crashes with that error.

SlyCooperReloadCoded avatar Jun 23 '20 03:06 SlyCooperReloadCoded

It works fantastic

Sent via the Samsung Galaxy A10e, an AT&T 4G LTE smartphone


From: Florin9doi [email protected] Sent: Monday, June 22, 2020 2:00:37 PM To: jackun/USBqemu-wheel [email protected] Cc: seta-san [email protected]; Comment [email protected] Subject: Re: [jackun/USBqemu-wheel] Eyetoy Support (#30)

@prafullpcsx2https://github.com/prafullpcsx2 : USBqemu-wheel-0.9.1-eye.ziphttps://github.com/jackun/USBqemu-wheel/files/4815097/USBqemu-wheel-0.9.1-eye.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/jackun/USBqemu-wheel/issues/30#issuecomment-647714600, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACDRBRKL7B23VSF724V66LLRX6S5LANCNFSM4MYKAAEQ.

seta-san avatar Jun 23 '20 04:06 seta-san

Looks like camera is not getting detected in games like Eyetoy play and Eyetoy play sports.

prafullpcsx2 avatar Jun 23 '20 07:06 prafullpcsx2

@prafullpcsx2 seems like PCSX2 bug

but the decoding fails and this message is observed in console: IPU1 running when IPU1 DMA disabled! CHCR 1 QWC 126. It seems that the PCSX2 decoding is bugged too.

https://github.com/PCSX2/pcsx2/issues/3432 (or not???)

jackun avatar Jun 23 '20 07:06 jackun

Man, I really seem to attract all the tech issues. I wish I could use this plugin, but my issue...

SlyCooperReloadCoded avatar Jun 23 '20 11:06 SlyCooperReloadCoded

@SlyCooperReloadCoded , you can start by writing a detailed report: OS, pcsx2 version, hardware, games tested, webcam model, resolutions supported by webcam (https://bustatech.com/webcam-viewer-v3-5-released/), pcsx2 logs, etc

Florin9doi avatar Jun 23 '20 12:06 Florin9doi

Windows 10 Pro 64-bit Intel Core i7-6700K NVIDIA GTX 1080

Trying with EyeToy - Antigrav (that's the only game I want to play)

The webcam is a "Microsoft LifeCam Studio". Trying to use it in the Webcam Viewer software you linked shows that the only "Resolution" option is "Not supported" and clicking Start crashes the software.

emulog is attatched, but I don't see anything referencing the plugin in there. emulog.txt

SlyCooperReloadCoded avatar Jun 23 '20 12:06 SlyCooperReloadCoded

Your webcam's driver isn't supporting DirectShow API. Unless there is a different driver for it, you may try it on linux, search a different webcam or wait until someone implements support for a different API (media foundation, anything else?).

Florin9doi avatar Jun 23 '20 12:06 Florin9doi

anything else?

WIA?

Seriously, though, WIA isn't the way, it appears that DirectShow likely is.

Or not...

jackun avatar Jun 23 '20 12:06 jackun

I'm going to start testing eyetoy enabled games

seta-san avatar Jun 23 '20 13:06 seta-san

@jackun @Florin9doi

Sega superstars also throws ipu1 dma disabled message but it works fine so I believe that bug isn't the reason why eye toy isn't getting detected with eyetoy play games.

prafullpcsx2 avatar Jun 23 '20 15:06 prafullpcsx2

From the Microsoft website:

"And if you're running Windows 8.1 or later, no updated software is required"

Device Manager sees it as a LifeCam Studio, so I guess I don't have a working webcam. I have an actual EyeToy, would that work?

Edit: After running Windows Update, the webcam software gave me resolution options and the plugin no longer crashes PCSX2. However the webcam software and the game still have no picture.

Edit 2: It stopped working again, now the plugin keeps crashing and the webcam software no longer detects any resolution options. Is a real EyeToy going to work?

SlyCooperReloadCoded avatar Jun 23 '20 16:06 SlyCooperReloadCoded

From the Microsoft website:

"And if you're running Windows 8.1 or later, no updated software is required"

Device Manager sees it as a LifeCam Studio, so I guess I don't have a working webcam. I have an actual EyeToy, would that work?

Edit: After running Windows Update, the webcam software gave me resolution options and the plugin no longer crashes PCSX2. However the webcam software and the game still have no picture.

Edit 2: It stopped working again, now the plugin keeps crashing and the webcam software no longer detects any resolution options. Is a real EyeToy going to work?

If you can get an old unsigned driver to work

seta-san avatar Jun 23 '20 16:06 seta-san

@prafullpcsx2 How did you get your phone camera to show up as a webcam? My Samsung Galaxy doesn't seem to be capable of doing that.

I also looked up my LifeCam. It is capable of using DirectShow.

SlyCooperReloadCoded avatar Jun 23 '20 17:06 SlyCooperReloadCoded

@SlyCooperReloadCoded Install ivcam from playstore and downlod the pc application for the same from Internet. Now run the two and make sure pc is getting video. Select directshow in eye toy plugin settings and it should work.

prafullpcsx2 avatar Jun 23 '20 17:06 prafullpcsx2

Okay, I've got iVCam all up and running, I can see my phone's camera view on my PC. Still not working with PCSX2. Screenshot:

https://imgur.com/a/j7SsAgR

Webcam Viewer DOES work with this, too.

SlyCooperReloadCoded avatar Jun 23 '20 17:06 SlyCooperReloadCoded

Does it work in OBS studio? And what formats does it list? Afaik currently it needs to be able to set resolution to 320x240 and YUYV or MJPEG format. E: ok, Dshow version uses RGB24

jackun avatar Jun 23 '20 17:06 jackun

No idea how to use it with OBS. It supports RGB24, but the lowest resolution is 640x360. What webcam would you recommend?

SlyCooperReloadCoded avatar Jun 23 '20 18:06 SlyCooperReloadCoded

EyeToy - Antigrav doesn't work. The only games I found to work (in-game, not perfect) are the following:

Bob the Builder
Clumsy Shumsy
EyeToy - Kinetic
EyeToy - Kinetic Combat
Nickelodeon SpongeBob SquarePants - Movin' with Friends
Sega Superstars

Florin9doi avatar Jun 23 '20 18:06 Florin9doi

Well then, that's the only game I wanted to play with this. I'll wait until it gets support. What webcam should I get in the meantime?

SlyCooperReloadCoded avatar Jun 23 '20 18:06 SlyCooperReloadCoded

Oh my gosh, my LifeCam Studio works with EyeToy - Kinetic! Also face reveal.

https://imgur.com/a/kwY6lTy

SlyCooperReloadCoded avatar Jun 23 '20 18:06 SlyCooperReloadCoded

https://www.youtube.com/watch?v=Ng600T6Y6RI

Now Antigrav needs to be figured out. My dream is finally within reach!

SlyCooperReloadCoded avatar Jun 23 '20 19:06 SlyCooperReloadCoded

Any idea why Antigrav isn't detecting webcam input?

SlyCooperReloadCoded avatar Jun 27 '20 18:06 SlyCooperReloadCoded

@jackun @Florin9doi hey. I'm looking for something to test. You guys have a recent build?

seta-san avatar Jul 24 '20 18:07 seta-san

I have no construction The Pcsx2 emulator with the g29, its not working, I saw in a video The German software MMos force feed back, in fact nothing is detailed in the videos, even to calibrate the steering wheel, its still complicated, I'm there practically every day on it, it's frustrating to see some play GranTurismo4 on the emulator and others not able to, its would be a big step of good detailed from start to finish! It is well recognized usbqemu-wheels, when I setting the steering wheel, nothing, thank you

Le ven. 24 juil. 2020 à 20:42, seta-san [email protected] a écrit :

@jackun https://github.com/jackun @Florin9doi https://github.com/Florin9doi hey. I'm looking for something to test. You guys have a recent build?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jackun/USBqemu-wheel/issues/30#issuecomment-663679262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLBB4C4OFDNPKEE6IFRB33R5HI2FANCNFSM4MYKAAEQ .

luke5416 avatar Jul 24 '20 19:07 luke5416

Hello, I can't run my G29 on Pcsx2 on GranTurismo 4, it's very frustrating and hard with all the settings there's to know! Thank you

Le ven. 24 juil. 2020 à 20:42, seta-san [email protected] a écrit :

@jackun https://github.com/jackun @Florin9doi https://github.com/Florin9doi hey. I'm looking for something to test. You guys have a recent build?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jackun/USBqemu-wheel/issues/30#issuecomment-663679262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLBB4C4OFDNPKEE6IFRB33R5HI2FANCNFSM4MYKAAEQ .

luke5416 avatar Jul 24 '20 19:07 luke5416

Hello, I can't run my G29 on Pcsx2 on GranTurismo 4, it's very frustrating and hard with all the settings there's to know! Thank you Le ven. 24 juil. 2020 à 20:42, seta-san [email protected] a écrit : @jackun https://github.com/jackun @Florin9doi https://github.com/Florin9doi hey. I'm looking for something to test. You guys have a recent build? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#30 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLBB4C4OFDNPKEE6IFRB33R5HI2FANCNFSM4MYKAAEQ .

This thread is specifically for Sony Eyetoy, not steering wheels.

seta-san avatar Jul 24 '20 19:07 seta-san

Ok, thanks

Le ven. 24 juil. 2020 à 21:23, seta-san [email protected] a écrit :

Hello, I can't run my G29 on Pcsx2 on GranTurismo 4, it's very frustrating and hard with all the settings there's to know! Thank you Le ven. 24 juil. 2020 à 20:42, seta-san [email protected] a écrit : … <#m_-6602215162773318946_> @jackun https://github.com/jackun https://github.com/jackun @Florin9doi https://github.com/Florin9doi https://github.com/Florin9doi hey. I'm looking for something to test. You guys have a recent build? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#30 (comment) https://github.com/jackun/USBqemu-wheel/issues/30#issuecomment-663679262>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLBB4C4OFDNPKEE6IFRB33R5HI2FANCNFSM4MYKAAEQ .

This thread is specifically for Sony Eyetoy, not steering wheels.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jackun/USBqemu-wheel/issues/30#issuecomment-663695179, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLBB4B46TT2YAGRU2DYZZTR5HNUXANCNFSM4MYKAAEQ .

luke5416 avatar Jul 24 '20 19:07 luke5416

USBqemu: failed to create device '' on port 0 could this be why eyetoy isn't always working? @Florin9doi @jackun @prafullpcsx2

`usbqemu wheel mod plugin version 0.10.0 USBinit USBopen USBqemu: failed to create device '' on port 0

  • Known 32bit write at address 1f801614 value ffffffff
  • Known 32bit read at address 1f801604: 0
  • Known 32bit write at address 1f801604 value 0
  • Known 32bit write at address 1f801608 value 1`

seta-san avatar Jul 29 '20 02:07 seta-san

No, port 0 is player 2

jackun avatar Jul 29 '20 07:07 jackun

No, port 0 is player 2

do you know why the device being created is labeled as two single quote marks ''. Shouldn't it have been a 9 for eyetoy?

seta-san avatar Jul 29 '20 11:07 seta-san

Because there's no device selected for Player 2. Also it is a string in ini so should be 'eyetoy'.

jackun avatar Jul 29 '20 11:07 jackun

i think Eyetoy - Play is the best candidate for figuring out why eyetoy functionality isn't working because the game came with debug symbols

seta-san avatar Aug 27 '20 19:08 seta-san

We know: https://github.com/jackun/USBqemu-wheel/issues/30#issuecomment-634974769

3. EyeToyPlay(1)(SCES_515.13) and his OV driver are unstripped

Florin9doi avatar Aug 30 '20 18:08 Florin9doi

@Florin9doi https://www.youtube.com/watch?v=oW4YexlmuCM curious?

seta-san avatar Aug 31 '20 02:08 seta-san

Any progress on this? Still waiting for a fix for Antigrav. I also don't see the eyetoy branch anywhere.

SlyCooperReloadCoded avatar Oct 30 '20 21:10 SlyCooperReloadCoded

Any progress on this? Still waiting for a fix for Antigrav. I also don't see the eyetoy branch anywhere.

The two active branches are master and develop. Eye toy support is there. The problem seems to be in pcsx2's ipu code around certain color spaces and no one seems terribly anxious to fix it.

seta-san avatar Oct 30 '20 21:10 seta-san

Dang, that's the only reason I wanted EyeToy support honestly. If knew anything about programming I'd look into it, but I couldn't script or program to save my life.

SlyCooperReloadCoded avatar Oct 30 '20 21:10 SlyCooperReloadCoded

The problem seems to be in pcsx2's ipu code around certain color spaces

You have more information ?

Florin9doi avatar Oct 30 '20 22:10 Florin9doi

The problem seems to be in pcsx2's ipu code around certain color spaces

You have more information ?

I made a patch that got eyetoy play to show a picture by activating the rgb functions. The picture is fucked up and because of that the game isn't playable.

seta-san avatar Oct 30 '20 22:10 seta-san

where is the patch ?

Florin9doi avatar Oct 30 '20 22:10 Florin9doi

I'll send it to you when I get home

seta-san avatar Oct 30 '20 22:10 seta-san

Basically I sent the emulator from the ypbpr function to the rgb function

seta-san avatar Oct 30 '20 22:10 seta-san

where is the patch ?

Again. This is the video of it "working" https://www.youtube.com/watch?v=oW4YexlmuCM

seta-san avatar Oct 30 '20 22:10 seta-san

i can't find the patch anymore. it's just a straight jump from 0015DE80 to 0015EB30 in Eyetoy Play NTSC.

All i'm doing is moving the game from this function. ipu_decompressYCrCb__FPvPvP8sceImageP8sceImageP8sceImage

to this one. ipu_decompressRGB__FPvPvP8sceImageP8sceImageP8sceImage Untitled

seta-san avatar Oct 31 '20 08:10 seta-san

Ok, I made a patch as you said for PAL :

Serial = SCES-51513
[patches = C0FCD1CE]
	// replace decompressYCrCb with decompressRGB
	patch=0,EE,0015cc80,word,16620033
[/patches]

The color issue is expected considering that it uses an incorrect function to decode the frames. My observations are that:

  1. "IPU1 running when IPU1 DMA disabled" isn't observed while the patch is applied.
  2. ipu_decompressRGB function is 3 times shorter than ipu_decompressYCrCb : 0x1A8 bytes vs 0x4F4 bytes
  3. ipu_decompressRGB contains a single sceIpuSync call, but ipu_decompressYCrCb contains 6 sceIpuSync calls
  4. GameIndex.dbf contains a few sceIpuSync patches; sceIpuSync isn't properly emulated??

Florin9doi avatar Oct 31 '20 10:10 Florin9doi

there's something there. the plugin IS sending the data. I have no idea why the emulator isn't doing anything with it.

seta-san avatar Oct 31 '20 10:10 seta-san

i also found an eyetoy game that currently works and has debug symbols. it's Boboboubo Boubobo: Shuumare! Taikan Boubobo

https://wiki.pcsx2.net/Boboboubo_Boubobo:_Shuumare!_Taikan_Boubobo

seta-san avatar Oct 31 '20 10:10 seta-san

For some reason this no longer works on the latest PCSX2 builds, specifically the 1.7.0 dev builds. It detects my webcam like the 1.5.0 builds, but just gives this weird static color image instead of using the webcam: https://imgur.com/a/p8gGeeS

SlyCooperReloadCoded avatar Oct 31 '20 16:10 SlyCooperReloadCoded

@SlyCooperReloadCoded just try opening/closing config dialog or pausing/resuming PCSX2. There's some weirdness with DShow currently.

jackun avatar Oct 31 '20 16:10 jackun

Also, where's the latest plugin in the develop branch? I tried downloading an artifact, but it wasn't detected as a plugin in PCSX2.

Edit: tried pausing, resuming, and messing with the config menu. Still getting that weird screen.

SlyCooperReloadCoded avatar Oct 31 '20 16:10 SlyCooperReloadCoded

FFS why can't you still trigger a branch build from appveyor ui, gaaah

@SlyCooperReloadCoded try these https://github.com/jackun/USBqemu-wheel/releases/tag/0.10.0-10

jackun avatar Oct 31 '20 16:10 jackun

Hm, that one doesn't have EyeToy. Isn't develop the branch with EyeToy?

SlyCooperReloadCoded avatar Oct 31 '20 20:10 SlyCooperReloadCoded

Uh? I have only 32bit version installed and that works fine so check that you actually selected USBqemu-wheel-0.10.0-Win32 or USBqemu-wheel-0.10.0-x64

jackun avatar Oct 31 '20 20:10 jackun

0.10.0 release version has eyetoy in it but so do the master and develop branches. develop has the most up to date code in it and it works on 32 bit but crashes on 64bit

seta-san avatar Oct 31 '20 20:10 seta-san

I downloaded that develop version and EyeToy wasn't an option.

SlyCooperReloadCoded avatar Oct 31 '20 21:10 SlyCooperReloadCoded

here's the latest develop builds for 32 and 64bit USBqemu-wheel-0.10.0- OCT 31 2020.zip

seta-san avatar Oct 31 '20 21:10 seta-san