FH-1 separate script for HID configuration.

Discussion and support for Expert Sleepers' Silent Way software and hardware.

Moderators: Kent, os

Post Reply
User avatar
talkboxert
Common Wiggler
Posts: 219
Joined: Thu May 05, 2011 5:11 am
Location: Holland

FH-1 separate script for HID configuration.

Post by talkboxert » Thu Feb 20, 2020 5:47 am

Hi there, just bought an old USB game controller that seems to work connected to my Mac. just the classic console type with 2 small joysticks. I used this to check it: https://vividmachine.com/controllers/
So maybe I am wrong assuming this thing is class compliant, it's really old like from 2005.

The type of controller connected to FH-1 should be configured with a number of HID commands (see below) I'm a bit confused for the moment, if these hid commands are part of the FH-1 script that also maps the cc's etc or that it is a separate script? If anyone would have an example how they got this to work with something else than a mouse that would be great.

Too check it with an FH-1 I read this in the manual:


USB HID configuration
Just as with the MIDI/CV converters, the FH-1 runs a script at startup to configure itself with the default controller mapping. That script is:

HID:0:X:256:0
HID:1:Y:-256:65536
HID:2:Z:256:0
HID:3:RZ:-256:65536
HID:4:RX:128:32768
HID:5:RY:128:32768
HID:6:B5-6
HID:8:HU
HID:9:HD
HID:10:HL
HID:11:HR
HID:12:B1-4
HID:16:B7-14
USAGE:2
HID:2:W:1024:0
HID:3:B1-14

There are two commands relating to HID mapping: HID and USAGE.
USAGE is the counterpart to DEV (see above). Commands after it only apply if the HID usage of the device matches that given in the script. The command 'USAGE:2' matches mice.



So that means I'd have to change "USAGE:"
from 2 (mice) to 5 (game pad) as shown below

# USB HID usage table
# Syntax:
# - lines that do not start with a white space give the number and name of
# a usage page.
# - lines that start with a white space give the number and name of
# a usage with the last given page.
# If the number is * then the line matches all usages and the name
# is a printf formatting string that will be given the usage number.
#
1 Generic Desktop
0x00 Undefined
0x01 Pointer
0x02 Mouse
0x03 Reserved
0x04 Joystick
0x05 Game Pad
0x06 Keyboard
0x07 Keypad
0x08 Multi-axis Controller
etc etc.....

User avatar
talkboxert
Common Wiggler
Posts: 219
Joined: Thu May 05, 2011 5:11 am
Location: Holland

Re: FH-1 separate script for HID configuration.

Post by talkboxert » Thu Feb 20, 2020 5:55 am

could I for instance send this sysex message?

F0 00 21 27 1F 10 00 00 <NULL USAGE:5 HID:2:Z:256:0 HID:3:RZ:-256:65536 > F7

User avatar
os
Super Deluxe Wiggler
Posts: 12533
Joined: Tue Jun 30, 2009 6:55 am
Location: UK
Contact:

Re: FH-1 separate script for HID configuration.

Post by os » Thu Feb 20, 2020 6:03 am

The default script applies to gamepads.

Your first test is to plug it in and see if the FH-1 recognises it at all - does the USB LED come on? Does the activity LED flash when you press buttons on the gamepad?

User avatar
talkboxert
Common Wiggler
Posts: 219
Joined: Thu May 05, 2011 5:11 am
Location: Holland

Re: FH-1 separate script for HID configuration.

Post by talkboxert » Thu Feb 20, 2020 7:52 am

Ah no, that didn't work, probably not class compliant then......

Post Reply

Return to “Expert Sleepers”