USBqemu-wheel
USBqemu-wheel copied to clipboard
Eyetoy Support
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?
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.
Notes:
- The develop branch (and others?) has a issue: it reorders the endpoints and descriptors:
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.
-
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. -
EyeToyPlay(1)(SCES_515.13) and his OV driver are unstripped.
it reorders the endpoints and descriptors:
Is there any difference? Seemed to "work" anyway.
Is there any difference? Seemed to "work" anyway.
I haven't seen any difference. It is getting stuck the same
- 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
- 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. -
[69 70 75 6D](magic number) 00 00 00 00 [40 01](width) [F0 00](height) 01 00 00 00
EyeToy Kinetic Combat works with pre-recorded data 😛
So the data was still MJPG, just different header or some huffman compressed raw?
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:
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
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.
Frames conversion works now: https://github.com/Florin9doi/USBqemu-wheel/commit/85ffc3c259ab47028d2f940c6e26f21c75ec764a example: https://i.imgur.com/2MZJcEM.mp4
You guys are amazing
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)
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.
The eye toy has a couple led lights on the front of it that it controls. Might it be trying to access those?
Doh, it's the led.
In this case, it's the misLED.
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
I pushed a new commit to capture video from a real webcam (v4l) but is noisy with many corrupted frames:
https://github.com/Florin9doi/USBqemu-wheel/commits/eyetoy Works only if the webcam supports native: 320x240/YUYV. No resize/format conversion.
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)
It doesn't. The frames should be decompressed.
I fixed the frames corruption and I added jpeg support for EyeToy cams:
What's left :
- [x] check if the image should be mirrored ?
- [x] support for windows
- [ ] speed and quality optimizations ?
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.
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
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?
yes
yes
Tried that
works for me
@jackun, I tried to integrate it with videodev but now my device list combobox is empty. You know why?
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
I found the issue, USBinit
/ RegisterDevice::Register()
are not called until a game is loaded or a new usb plugin is selected.
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),
Probably, I've been testing the develop on linux mostly.
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
What was the deal in the end with headers/footer so I won't forget? Frame size was in there somewhere.
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.
Here is a program which can dump frames from a hardware camera : https://pastebin.com/461GCy2D
Can someone post the latest dll with eyetoy support so it can be tested?
@prafullpcsx2 : USBqemu-wheel-0.9.1-eye.zip
@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.
I tried downloading that dll and I can't select my webcam. The only Device API is DirectShow and pressing Configure does nothing.
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.
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.
Looks like camera is not getting detected in games like Eyetoy play and Eyetoy play sports.
@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???)
Man, I really seem to attract all the tech issues. I wish I could use this plugin, but my issue...
@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
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
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?).
anything else?
WIA?
Seriously, though, WIA isn't the way, it appears that DirectShow likely is.
Or not...
I'm going to start testing eyetoy enabled games
@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.
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?
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
@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 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.
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.
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
No idea how to use it with OBS. It supports RGB24, but the lowest resolution is 640x360. What webcam would you recommend?
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
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?
Oh my gosh, my LifeCam Studio works with EyeToy - Kinetic! Also face reveal.
https://imgur.com/a/kwY6lTy
https://www.youtube.com/watch?v=Ng600T6Y6RI
Now Antigrav needs to be figured out. My dream is finally within reach!
Any idea why Antigrav isn't detecting webcam input?
@jackun @Florin9doi hey. I'm looking for something to test. You guys have a recent build?
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 .
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 .
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.
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 .
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`
No, port 0 is player 2
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?
Because there's no device selected for Player 2. Also it is a string in ini so should be 'eyetoy'.
i think Eyetoy - Play is the best candidate for figuring out why eyetoy functionality isn't working because the game came with debug symbols
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 https://www.youtube.com/watch?v=oW4YexlmuCM curious?
Any progress on this? Still waiting for a fix for Antigrav. I also don't see the eyetoy branch anywhere.
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.
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.
The problem seems to be in pcsx2's ipu code around certain color spaces
You have more information ?
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.
where is the patch ?
I'll send it to you when I get home
Basically I sent the emulator from the ypbpr function to the rgb function
where is the patch ?
Again. This is the video of it "working" https://www.youtube.com/watch?v=oW4YexlmuCM
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
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:
- "IPU1 running when IPU1 DMA disabled" isn't observed while the patch is applied.
- ipu_decompressRGB function is 3 times shorter than ipu_decompressYCrCb : 0x1A8 bytes vs 0x4F4 bytes
- ipu_decompressRGB contains a single sceIpuSync call, but ipu_decompressYCrCb contains 6 sceIpuSync calls
- GameIndex.dbf contains a few sceIpuSync patches; sceIpuSync isn't properly emulated??
there's something there. the plugin IS sending the data. I have no idea why the emulator isn't doing anything with it.
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
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 just try opening/closing config dialog or pausing/resuming PCSX2. There's some weirdness with DShow currently.
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.
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
Hm, that one doesn't have EyeToy. Isn't develop the branch with EyeToy?
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
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
I downloaded that develop version and EyeToy wasn't an option.
here's the latest develop builds for 32 and 64bit USBqemu-wheel-0.10.0- OCT 31 2020.zip