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

Keyboardmania support #60

Merged
merged 6 commits into from
Nov 19, 2020
Merged

Conversation

aleksre
Copy link
Contributor

@aleksre aleksre commented Nov 19, 2020

This PR adds support for the Keyboardmania controller to USBqemu. Supported games are Keyboardmania 1 and Keyboardmania 2+3, both of which are now playable for the first time.

Tested and fully working:

  • 1 and 2 player mode.
  • Standard Qwerty keyboards.
  • Official controller (although button mapping is challenging).
  • RockBand 3 keyboard using a MIDI cable and separate MIDI->GamePad software. Same approach can be used for other MIDI keyboards.

@jackun jackun merged commit 16e1886 into jackun:develop Nov 19, 2020
@jackun
Copy link
Owner

jackun commented Nov 24, 2020

@aleksre can you check that this actually works still :D https://github.com/PCSX2/pcsx2/tree/usb-keyboardmania

@aleksre
Copy link
Contributor Author

aleksre commented Nov 26, 2020

Hmm. I can't seem to build PCSX2 locally without errors. I'll verify once it's merged to master at least :)

@aleksre
Copy link
Contributor Author

aleksre commented Nov 28, 2020

@jackun Was able to build it now. Works great! 👍

@987123879113
Copy link

Nice work! Happy to see this supported. The only other way to play Keyboardmania in PCSX2 up until now was a plugin that someone is selling for ~$50 (seriously).

I previously made a branch to make Keyboardmania playable but I took an entirely different approach and it turned out really messy so I never tried upstreaming it. Keyboardmania supports multiple USB devices as input controllers besides the official controller, so I ended up implementing a full on MIDI keyboard that was supported between both of the Keyboardmania releases.

If it's any interest or help at all, here's my old branch: https://github.com/987123879113/USBqemu-wheel/tree/keyboardmania
This is also Windows-only as it relies on WinAPI for MIDI inputs. It emulates the Roland PC-300 MIDI keyboard.

For reference, here's the full list of supported devices pulled from the game's code:

Keyboardmania 1st:
"FastLane" device name? (Mark of the Unicorn MOTU FastLane MIDI Interface??)

Unknown I-O Data device
VID 0x04bb, PID 0x0a06

I-O Data Serial USB-RSAQ1
VID 0x04bb, PID 0x0a03


Roland SC-8850 
VID 0x0582, PID 0x0003

Roland PC-300
VID 0x0582, PID 0x0008



Keyboardmania 2nd & 3rd:
"FastLane" device name? (Mark of the Unicorn MOTU FastLane MIDI Interface??)

Yamaha UX256 MIDI I/F
VID 0x0499, PID 0x1000

Yamaha UX96 MIDI I/F
VID 0x0499, PID 0x1008

Yamaha UX16 MIDI I/F
VID 0x0499, PID 0x1009


Roland SC-8850 
VID 0x0582, PID 0x0003

Roland PC-300
VID 0x0582, PID 0x0008

Roland UM-1(E/S/X)
VID 0x0582, PID 0x0009

@aleksre
Copy link
Contributor Author

aleksre commented Dec 16, 2020

Nice. MIDI emulation would actually be a really nice addition IMO, and probably quite a bit easier for people who want to play using a MIDI keyboard.

There are also other PS2 titles that allow MIDI hardware to be connected over USB so I guess support could be expanded over time to support more games. Guitar Freaks & DrumMania comes to mind, maybe others as well?

@987123879113
Copy link

Guitar Freaks & DrumMania comes to mind, maybe others as well?

I'm not sure what other games use MIDI besides GFDM, but I did have some WIP code that worked with GF4DM3. I stopped short of debugging why later GFDM games didn't accept the emulated UX-16 MIDI adapter. Most likely the faked USB descriptor is my guess. I'll see about cleaning up and fixing the code and maybe sending off a PR after working out some kinks.

@jackun
Copy link
Owner

jackun commented Jan 1, 2021

Started to add Linux support and noticed buttons 7,15,23 are unused?

@aleksre
Copy link
Contributor Author

aleksre commented Jan 1, 2021

Yes, they don't map to anything in-game.

Looks like those buttons would map to hex 80, which in unused.

@Florin9doi
Copy link
Contributor

80 80 80 80 bits are used for padding, they aren't buttons: https://github.com/aleksre/USBqemu-wheel/blob/203df0b523e8fb2411e1807a72df8d27d68768bb/src/usb-pad/usb-pad.h#L1329

@aleksre
Copy link
Contributor Author

aleksre commented Jan 3, 2021

Yeah that's true. In that case I'm not sure, although it's peculiar that the skips are at these exact positions. I only skipped these buttons because I noticed they didn't work and the next index mapped to the expected button.

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.

4 participants