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

WiimoteEmu: Fix drum pads not working in Guitar Hero 5. #7820

Open
wants to merge 1 commit into
base: master
from

Conversation

4 participants
@jordan-woyak
Copy link
Member

jordan-woyak commented Feb 24, 2019

Fixes issue: https://bugs.dolphin-emu.org/issues/10810

Caused by "velocity data" not ever being sent.

Implemented entirely from Wiibrew documentation because I lack the hardware.

Tested and working, though.

I also re-ordered the pads so the UI order matches the physical layout.

// If a pad is hit send velocity data no more than once.
for (auto pad_mask : drum_pad_bitmasks)
{
if ((drum_data.bt & pad_mask) && !(m_velocity_data_sent & pad_mask))

This comment has been minimized.

@BhaaLseN

BhaaLseN Feb 25, 2019

Member

I wonder about the naming of "mask" - if this is really a bitmask, can multiple pads be hit at the same time? I imagine this would be a difficult to hit at exactly the same input-frame, but probably causes a missed input somewhere once in a blue moon (in a TAS perhaps? If anyone ever attempted to do one of those...)

This comment has been minimized.

@JosJuice

JosJuice Feb 25, 2019

Contributor

Each song has maybe a few hundred points where you're supposed to hit two pads at once (at least if you're playing on Expert), so the chance that two hits end up being close enough to each other at least once is not that small in the long run.

This comment has been minimized.

@BhaaLseN

BhaaLseN Feb 25, 2019

Member

VelocityID kinda looks like a bitmask as well (although a very strange one), so I wouldn't be surprised if they could just be mashed together into a single report.

I don't suppose we have someone with hardware and some homebrew to try this out?

This comment has been minimized.

@jordan-woyak

jordan-woyak Feb 25, 2019

Author Member

The "pad" (drum pad) bytes are a mask, simultaneous hits are ORed together.
The velocity ID is not.

The way I coded it is if pads are simultaneously hit the velocity for each will be sent one after the other (in separate input frames) so long as the inputs are held long enough (N frames for N simultaneous inputs).

So if 2 pads are simultaneously pressed and held for exactly 1 input frame then velocity data will not be sent for one of the pads.

I do not know how the real hardware functions.

I should mention much of the game functions without sending any velocity data.
There seem to be certain menu areas that strangely require it though.

This comment has been minimized.

@BhaaLseN

BhaaLseN Feb 26, 2019

Member

Makes sense (re. "mask" naming).

Any other ideas on simultaneous input? I cannot imagine that real hardware would just drop one of the inputs in that case.

This comment has been minimized.

@jordan-woyak

jordan-woyak Feb 26, 2019

Author Member

It doesn't really "drop the input". It just doesn't send velocity data. (which much of the game seems to be fine with.) But I can make the code send velocity data for every hit no matter what.

@Tilka Tilka added the needs testing label Mar 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.