Clean up tech notes

This commit is contained in:
Neale Pickett 2024-01-07 21:28:02 -07:00
parent a43acf4604
commit cf4537b3bd
1 changed files with 43 additions and 33 deletions

View File

@ -70,11 +70,33 @@ Here's what each bit means:
* 0o13: Cymbal modifier
* 0o14: Select
Hats
----
hatAndConstant
--------------
I guess "hats" are what I would have called "joysticks and dpads".
The HAT switch reports its position like a clock.
### Hat 0: unknown
This doesn't appear to be sent or used.
### Hat 1: guitar analog controls
The X axis is the position of the wammy bar.
The Y axis is the pickup selector.
I believe this was a 5-position switch on some guitars.
Only Rock Band 1 seems to use this.
### Hat 2: navigation
Sent by the dpad on the controller,
as `hatAndConstant`.
Guitars send up/down for the up/down strum buttons.
Drums send up/down on the blue/yellow cymbal pads.
The position of this digital input is reported in only 3 bits:
7 0 1
@ -102,20 +124,19 @@ Sending these values does not seem to cause problems with my Wii games.
Product ID (PID)
----------------
Nicholas,
who did the initial work on the guitar,
suggested that PID 0x0005 would get the sketch working as drums.
And that was correct:
this works great on
Wii Rock Band 1 and
Wii LEGO Rock Band.
The following USB PIDs are recognized by various things:
But it fails in frustrating ways on
Wii Rock Band 3:
the yellow and blue pads don't navigate menus,
and cymbals aren't detected.
* 0x0003: XBox Drum
* 0x0004: Wii Guitar
* 0x0005: Wii Drums - Rock Band 1
* 0x3110: Wii Drums - Rock Band 2
The fix was setting the USB PID to 0x3110.
There are some quirks to note:
* Rock Band 3 won't recognize cymbal hits on PID=0x0005,
but the same program with PID=0x3110 works fine.
* Wii games don't appear to recognized PID=0x0003.
Maybe Rock Band 3 does: I didn't test that one.
Drum Velocity
@ -123,7 +144,8 @@ Drum Velocity
I split the 12 "reserved" bytes from Nicholas's
`struct InstrumentButtonState`
into 4 bytes of I-Don't-Know, 4 bytes of velocity,
into 4 bytes of I-Don't-Know,
4 bytes of velocity,
and 4 more bytes of I-Don't-Know.
Whenever a pad is hit,
I send 127 on the corresponding velocity.
@ -134,29 +156,17 @@ and looks only at the velocity values.
None of the Wii games I have
seem to care what these values are set to.
Clone Hero also does not care.
Clone Hero
==========
This controller doesn't have a dpad (currently),
so we're using 12 buttons to represent the state of 9 inputs.
Sometimes software is just weird!
Clone Hero wants Hat 2 up on yellow cymbal hit,
and Hat 2 down on blue cymbal hit.
Clone Hero has two undocumented CymExt1 and CymExt2 mappings.
It talks about what they should be set to (on Windows) in the wiki,
but doesn't explain what they're used for.
It seems that Clone Hero expects the Yellow and Blue cymbals
to send dpad inputs, in addition to the pad color and cymbal modifier.
If the controller doesn't send these,
then every drum pad hit plays that color's drum and cymbal at the same time,
and every cymbal pad hit does the same thing.
I'm not exactly sure why Clone Hero does this,
but in any case,
Mockband sends the right things now,
so the drum controller should work correctly after you map everything.
If it doesn't see these while mapping drum pads,
then hitting any color bad will trigger both drum and cymbal for that color.
References