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

Add Xbox Live Communicator Support #1188

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ryzee119
Copy link
Contributor

@Ryzee119 Ryzee119 commented Jul 17, 2022

This adds support for the Xbox Live Communicator peripheral. As there's no GUI element yet, you connect this within the xemu monitor:

stop
device_add usb-xblc,port=1.x.2
cont
where x = 3,4,1,2 for player 1,2,3,4 respectively.

See #1126 for details regarding the device's protocol.

It uses qemu's audios backend (AUD_*) API to read, resample and playback audio. It will just get microphone audio from the default input device. I reenabled audiodev for windows builds. I didnt notice log spam in current xemu master.

The game N.U.D.E has this simple loopback test screen in the options menu. I also tested in Rainbow Six 3 (voice commands) and Phantasy Star Online (loopback test in character creation screen). Ive tested all the supported sample rates.

basic

Currently in draft due to a couple issues:

  • Main issue is that there's some backend timing issue that causing schedule overruns in OHCI. Falls over here:
    https://github.com/mborgerson/xemu/blob/8d274e5f9a9dbe777ffba6a8b3d269adbf682690/hw/usb/hcd-ohci.c#L689
    If we hit this overrun ~3 USB frames in a row, XDK seems to just stop polling the USB endpoints so the device will stop working and needs to be re-connected. Its unclear why this should happen as all the clocks should be in sync? It is worse if you pause the emulation and resume it or drag the xemu window around etc.
  • Should be able to set different audio outputs for headset and normal game output.
  • Not tested, but it will likely break if using VM savestates. We would need to remember atleast the currently set sample rate.

@Ryzee119 Ryzee119 changed the title Add Xbox Live Communitor Support Add Xbox Live Communicator Support Jul 17, 2022
@MasonT8198
Copy link
Contributor

Could this be added as a page on the website as well?

@Ryzee119
Copy link
Contributor Author

There a few potentially related commits in upstream qemu. Not sure if this will fix the issues or not but some are atleast specific to OHCI isochronous transfers which is promising.
I tried cherry picking these but hit alot of merge conflicts so may take some time to digest

@mborgerson
Copy link
Member

mborgerson commented Aug 25, 2022

There a few potentially related commits in upstream qemu. Not sure if this will fix the issues or not but some are atleast specific to OHCI isochronous transfers which is promising. I tried cherry picking these but hit alot of merge conflicts so may take some time to digest

We are overdue for a merge if you want to take a stab at it

@Fabxx
Copy link
Contributor

Fabxx commented Dec 25, 2022

When it is confirmed that this feature works without issues please notify me, i would like to integrate a UI for those monitor commands.

@mborgerson
Copy link
Member

mborgerson commented Jan 23, 2023

@Ryzee119 I've merged latest QEMU release updates in #1366, if you were interested in seeing if that resolves your issues

@GXTX
Copy link
Contributor

GXTX commented Jan 26, 2023

Decided to play around with this. In Manhunt the narrator speaks through the headset speakers when it's attached, however it's not doing that with this PR.

@GXTX
Copy link
Contributor

GXTX commented Jan 26, 2023

And using the microphone in Karaoke Revolution Party is not functional at all although it does detect it.

@Ryzee119
Copy link
Contributor Author

@Ryzee119 I've merged latest QEMU release updates in #1366, if you were interested in seeing if that resolves your issues

Unfortunately seems like the issue is still present. Will try work out whats happening

@HadetTheUndying
Copy link

@Ryzee119 I've merged latest QEMU release updates in #1366, if you were interested in seeing if that resolves your issues

Unfortunately seems like the issue is still present. Will try work out whats happening

Could you provide some steps for what to look for? I was able to play about 45-60 minutes of PSO with a player using the PR and it worked the entire time until he had to go. My copy of N.U.D.E. got here today too so I have a better test game to use. I was able to loop Audio through the test screen for that for about 30 minutes, and also play some of the opening but I had to stop to work on something else.

@Ryzee119
Copy link
Contributor Author

Ryzee119 commented Feb 5, 2023

What OS? It basically just stops working for me. it can be encouraged to fail by dragging the window in short quick bursts to make it pauses/resume alot

@HadetTheUndying
Copy link

What OS? It basically just stops working for me. it can be encouraged to fail by dragging the window in short quick bursts to make it pauses/resume alot

Linux. I'll try dragging the window around a bunch.

@Ryzee119
Copy link
Contributor Author

Ryzee119 commented Feb 5, 2023

Maybe a windows thing. I'll try repeat it on Linux soon

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

Successfully merging this pull request may close these issues.

6 participants