USB4MAPLE adapter

Place for discussing homebrew games, development, new releases and emulation.
kuja2053
shadow
Posts: 6

Re: USB4MAPLE adapter

Post by kuja2053 »

Hi everyone, what a great project, easy to make and works well. I would like to add new joysticks but I don't really understand how the logs work. I have a USB-UART cable (C232HD from FTDI Chip) that I connected to GPIO0, GPIO1, GND. When I connect the whole thing, I receive the VID and PID from the joystick but when I press the buttons on the joystick, I don't receive any data in the terminal. I tried with TeraTerm and Hercule. Do I need to send a special command to the Pi Pico ? In my terminal, I get the following:

"HID device address = 1, instance = 0 is mounted
HID Interface Protocol = None VID = 0E8F PID = 0041
HID has 1 reports
VID = 0e8f, PID = 0041
Protocol 0"

but nothing else when I press buttons on the joystick. I would be very grateful if someone could help me :D .
Attachments
IMG_20240525_170207.jpg
IMG_20240525_170121.jpg
IMG_20240525_170113.jpg

User avatar
rpf16rj
Developer
Posts: 47
Contact:

Re: USB4MAPLE adapter

Post by rpf16rj »

kuja2053 wrote: Sun May 26, 2024 2:55 pm Hi everyone, what a great project, easy to make and works well. I would like to add new joysticks but I don't really understand how the logs work. I have a USB-UART cable (C232HD from FTDI Chip) that I connected to GPIO0, GPIO1, GND. When I connect the whole thing, I receive the VID and PID from the joystick but when I press the buttons on the joystick, I don't receive any data in the terminal. I tried with TeraTerm and Hercule. Do I need to send a special command to the Pi Pico ? In my terminal, I get the following:

"HID device address = 1, instance = 0 is mounted
HID Interface Protocol = None VID = 0E8F PID = 0041
HID has 1 reports
VID = 0e8f, PID = 0041
Protocol 0"

but nothing else when I press buttons on the joystick. I would be very grateful if someone could help me :D .
Apply firmware debug version, download here: viewtopic.php?p=185262&hilit=debug#p185262
Don't connect VID cable from USB-UART to rp2040, only RX and GND.

Scheme:
UART-USB | RP2040
RX => Pin 0
GND => GND

After this, connect UARt-USB on PC and connect any serial log on COM port of UART-USB and baud 115200.
Connect USB4MAPLE on Dreamcast normally and see the logs.

Collect the log for even button pressed and post it here. If possible, will add support.
Curious tester of old games and software and electronic modder sometimes.

Youtube channel: https://www.youtube.com/@rpf16rj1

User avatar
megavolt85
Developer
Posts: 2180

Re: USB4MAPLE adapter

Post by megavolt85 »

kuja2053 wrote: Sun May 26, 2024 2:55 pm
but nothing else when I press buttons on the joystick. I would be very grateful if someone could help me :D .
Use firmware with enabled debug.
Link in previous post

User avatar
Vespa
undertow
Posts: 28

Re: USB4MAPLE adapter

Post by Vespa »

Raphnet N64/Gamecube to USB adapter - V3
raphUSBdc.jpg
raphUSBdc.jpg (43.07 KiB) Viewed 2343 times
Not sure I've captured this right, a lot of jitter on the analog inputs.

Nice job on the DualSense, megavolt85!
Attachments
Raphnet N64 GCN v3.txt
(2.45 KiB) Downloaded 131 times

User avatar
RazorX
Prince of Persia
Posts: 352

Re: USB4MAPLE adapter

Post by RazorX »

since we still have many people playing and enjoying phantasy star online, myself included,
is there anyway to add the ability/controller scheme for it so the camera auto rotates to some extent with your player?
right now if you want the camera to do that as you turn, you basically have to spam press the R trigger or you can change it to the L trigger and that's it, would it be possible to have an option where that's automatic? not sure how viable it is but it would be really nice if it's possible without messing anything else up.

User avatar
robinhoodie
undertow
Posts: 32

Re: USB4MAPLE adapter

Post by robinhoodie »

For DIY controller builders, in my latest testing the USB4Maple adapter (on the latest firmware) works with the Brook UFB-Fusion board in both Xbox 360 and Genesis Mini modes. It sees the adapter as the full controller in 360 mode and as a fight stick in Genesis Mini mode.

This should give me everything I need to finalize my Twin Stick build, but I have a question. Could the adapter be set to default to Twin Stick mode instead of requiring a button combo? My plan is to have the USB4Maple adapter inside the body of the Twin Stick build and a Nuetrik plug on the outside that would connect to the Dreamcast. But in general I want this build to function seamlessly as a plug and play Twin stick. No worries if not.

kuja2053
shadow
Posts: 6

Re: USB4MAPLE adapter

Post by kuja2053 »

rpf16rj wrote: Sun May 26, 2024 11:08 pm
kuja2053 wrote: Sun May 26, 2024 2:55 pm Hi everyone, what a great project, easy to make and works well. I would like to add new joysticks but I don't really understand how the logs work. I have a USB-UART cable (C232HD from FTDI Chip) that I connected to GPIO0, GPIO1, GND. When I connect the whole thing, I receive the VID and PID from the joystick but when I press the buttons on the joystick, I don't receive any data in the terminal. I tried with TeraTerm and Hercule. Do I need to send a special command to the Pi Pico ? In my terminal, I get the following:

"HID device address = 1, instance = 0 is mounted
HID Interface Protocol = None VID = 0E8F PID = 0041
HID has 1 reports
VID = 0e8f, PID = 0041
Protocol 0"

but nothing else when I press buttons on the joystick. I would be very grateful if someone could help me :D .
Apply firmware debug version, download here: viewtopic.php?p=185262&hilit=debug#p185262
Don't connect VID cable from USB-UART to rp2040, only RX and GND.

Scheme:
UART-USB | RP2040
RX => Pin 0
GND => GND

After this, connect UARt-USB on PC and connect any serial log on COM port of UART-USB and baud 115200.
Connect USB4MAPLE on Dreamcast normally and see the logs.

Collect the log for even button pressed and post it here. If possible, will add support.

Hello,

Thank you very much rpf16rj, it it worked !

Sorry for only answering now but I couldn't test before this weekend.

I'll be doing a post for the PS2 controller soon.

Bye

kuja2053
shadow
Posts: 6

Re: USB4MAPLE adapter

Post by kuja2053 »

Hi,

I did the work for the Dualshock 2 of the Playstation. I used a Smart Joypad adapter with the ps2 controller.
IMG-20240602-WA0001.jpg
All buttons on this controller are analog, but with the USB adapter, it seems that only the left and right sticks are analog, the other buttons becoming digital.


HID device address = 1, instance = 0 is unmounted
HID device address = 1, instance = 0 is mounted
HID Interface Protocol = None VID = 6666 PID = 0667
HID has 1 reports
VID = 6666, PID = 0667
Protocol 0
HID receive desc report:
05 01 09 04 A1 01 09 01 A1 00 05 09 19 01 29 10
15 00 25 01 35 00 45 01 75 01 95 10 81 02 05 01
09 30 09 31 15 00 26 FF 00 35 00 46 FF 00 66 00
00 75 08 95 02 81 02 05 01 09 32 09 35 15 00 26
FF 00 35 00 46 FF 00 66 00 00 75 08 95 02 81 02
C0 C0
HID device address = 1, instance = 0 is unmounted

-------------------------------------------------------------

Idle state :
00 00 80 7F 7F 80

The last four bytes are for the analog sticks.

------------------------------------------------------------

Left analog stick :
Top => 4th byte set to 00
Bottom => 4th byte set to FF
Left => 3rd byte set to 00
Right => 3rd byte set to FF
IDLE for Top-Bottom direction => 4th byte set to 7F or 80
IDLE for left-right direction => 3rd byte set to 7F or 80

-----------------------------------------------

Right analog stick :
Top => 6th byte set to 00
Bottom => 6th byte set to FF
Left => 5rd byte set to 00
Right => 5rd byte set to FF
IDLE for Top-Bottom direction => 6th byte set to 7F or 80
IDLE for left-right direction => 5rd byte set to 7F or 80

---------------------------------------------

Numeric top => 2nd byte pass from 00 to 10
Numeric bottom => 2nd byte pass from 00 to 40
Numeric left => 2nd byte pass from 00 to 80
Numeric right => 2nd byte pass from 00 to 20

--------------------------------------------

Cross => 1st byte pass from 00 to 04
Square => 1st byte pass from 00 to 08
Triangle => 1st byte pass from 00 to 01
Circle => 1st byte pass from 00 to 02

-------------------------------------------

Select => 2nd byte pass from 00 to 01
Start => 2nd byte pass from 00 to 08

----------------------------------------

L1 => 1st byte pass from 00 to 40
L2 => 1st byte pass from 00 to 10
R1 => 1st byte pass from 00 to 80
R2 => 1st byte pass from 00 to 20

---------------------------------

L3 (press left stick) => 2nd byte pass from 00 to 02
R3 (press right stick) => 2nd stick pass from 00 to 04

---------------------------------

I think the settings should be :

Standard controller mode :
A = X
B = O
X = square
Y = triangle
L trigger = L1, L2
R trigger = R1, R2

Vs fighting game mode (as ps2 vs fighting games) :

A = X
B = O
X = square
Y = triangle
L trigger = R1
R trigger = R2
X+Y+L trigger = L1
A+B+R trigger = L2

I think the select button on the PS2 controller should be used to change modes.

User avatar
megavolt85
Developer
Posts: 2180

Re: USB4MAPLE adapter

Post by megavolt85 »

robinhoodie wrote: Tue Jun 04, 2024 11:38 am Could the adapter be set to default to Twin Stick mode instead of requiring a button combo?
I can't do this, it will break the controller that emulates Brook UFB-Fusion
Vespa wrote: Fri May 31, 2024 3:08 pm Raphnet N64/Gamecube to USB adapter - V3
kuja2053 wrote: Wed Jun 05, 2024 4:05 pm I did the work for the Dualshock 2 of the Playstation. I used a Smart Joypad adapter with the ps2 controller.
added this two adapters and dance mat VID 0079 PID 0011
hotkey for Smart Joypad adapter - select+start
usb4maple(06.06.24).7z
(53.66 KiB) Downloaded 109 times

raffraff
noob
Posts: 4

Re: USB4MAPLE adapter

Post by raffraff »

megavolt85 wrote: Fri May 17, 2024 1:01 pm
raffraff wrote: Fri May 17, 2024 10:43 am Would it be possible to have a mode on 360 controllers (etc) where the right analog stick is mapped to the d-pad?
I made the right stick duplicate the d-pad in standard mode
Thanks again for this. I've built two for simultaneous 360 controller and keyboard and they are working well.

Please could a small amount of dead zone be added to the right analog stick when mapped to the d-pad? This is just to improve the action as it's currently quite twitchy.

  • Similar Topics
    Replies
    Views
    Last post