|
Post by jj0 on Sept 23, 2022 8:57:04 GMT
OK, so I ran the GUID Discovery tool, and got the following GUID:I tried adding this, but it did not work.
The gamepad tool however gives me this GUID:Why are they different? I tried adding this as well, but it does not work.
And why does the REV version in windows device manager say "REV_0107"? Why is this number not reflected in the GUID from the Discovery tool?
If I google for SHANWAN USB Gamepad I see a SNES gamepad-style controller and if I google for G-Shark GS-GP702 I see a Playstation PS2-style controller. Do you have both of these connected to THE64 and if so which one are you trying to add? The GUID discovery tool only looks for the last USB device plugged in so you have to make sure that the one you are trying to add is not plugged in until you are in the Carousel already. [EDIT] I've updated the tool to list all connected controllers, so you might want to try again. Regarding the Revision version, this (I think) is just a difference between Windows an Linux.
|
|
|
Post by jj0 on Sept 23, 2022 9:05:38 GMT
Regarding lag I don't know, it's mostly due the the LCD I believe and not so much due to THE64. You can add the joystick and map keys and functions that are used on the standard joystick to it using PCUAE or manually but not a reset function. There's a long thread about adding joysticks, I suggest you start here. I'll move your question to that thread.
|
|
|
Post by jj0 on Sept 23, 2022 10:36:24 GMT
Updated the ID discovery fake update to list all controllers instead of just the last one that was connected. A lot of issues with adding joysticks start with getting the right ID string to put in the gamecontrollerdb.txt file. The attached fake update tries to help with this by getting the ID string info for connected USB devices on the Mini/Maxi itself. To use: - Extract the contents of this View Attachment file to a USB stick you know works withe the Mini/Maxi
- Insert it in the Mini/Maxi
- Connect the joystick you want to try out to the Mini/Maxi and also connect the standard joystick so you can control the Carousel
- Switch on the Mini/Maxi and wait until the Carousel is displayed
- Run the fake update (using the standard Mini/Maxi joystick to navigate to the System information menu)
- The fake update doesn't display anything but just returns to the System information menu
- The USB stick should now have a file 'usbid.txt' that contains the ID string and joystick manufacturer/name string for each connected USB controller like
03000000790000001c18000011010000,SPEEDLINK COMPETITION PRO Game Controller for Android
- If the ID string is already in the gamecontrollerdb.txt it will also show the current mapping, for example
03000000591c00002400000010010000, THEC64 Joystick THEC64 Joystick 03000000591c00002400000010010000 already in /usr/share/the64/ui/data/gamecontrollerdb.txt: 03000000591c00002400000010010000,Retro Games LTD THEC64 MS Joystick,a:b4,b:b5,back:b6,lefttrigger:b0,leftx:a0,lefty:a1,righttrigger:b1,start:b7,x:b3,y:b2,platform:Linux,
03000000591c00002700000010010000,Retro Games LTD THEMouse 03000000591c00002700000010010000 not found in /usr/share/the64/ui/data/gamecontrollerdb.txt
03000000591c00002600000010010000,Retro Games LTD THEGamepad 03000000591c00002600000010010000 already in /usr/share/the64/ui/data/gamecontrollerdb.txt: 03000000591c00002600000010010000,Retro Games LTD THEGamepad,x:b0,y:b3,a:b4,b:b5,back:b6,start:b7,lefttrigger:b2,righttrigger:b1,leftx:a0,lefty:a1,platform:Linux,
- The file usbid.txt also lists the 'raw' data of the devices it found at the end
I haven't tested this a lot so feedback would be welcome. Also, you can of course edit the name part to your liking. The fake update script iterates over the 'generic-usb' messages from the dmesg log and then manipulates it to get the various parts of the ID string: #!/bin/sh
# Make USB drive rw mount -o remount,rw /mnt # Set separator to newline OLDIFS=$IFS IFS=$'\n' rm /mnt/usbid.txt for USBINFO in $(dmesg | grep generic-usb | sed 's/\[[ 0123456789.]*\]/\n/g') do echo $USBINFO USBID=$(echo "$USBINFO" | cut -d ' ' -f 3) echo $USBID HIDVER=$(echo "$USBINFO" | cut -d ' ' -f 7) echo $HIDVER SDLID=$(echo ${USBID:2:2}${USBID:0:2}0000${USBID:7:2}${USBID:5:2}0000${USBID:12:2}${USBID:10:2}0000${HIDVER:3:2}0${HIDVER:1:1}0000 | awk '{ print tolower($0) }') echo $SDLID JSNAME=$(echo "$USBINFO" | cut -d '[' -f 2 | cut -d ']' -f 1) echo $JSNAME echo ${SDLID},${JSNAME} >>/mnt/usbid.txt INCTRLDB=$(grep ${SDLID} /usr/share/the64/ui/data/gamecontrollerdb.txt) if [ "x${INCTRLDB}" = "x" ] then echo " ${SDLID} not found in /usr/share/the64/ui/data/gamecontrollerdb.txt" echo " ${SDLID} not found in /usr/share/the64/ui/data/gamecontrollerdb.txt" >>/mnt/usbid.txt else echo " ${SDLID} already in /usr/share/the64/ui/data/gamecontrollerdb.txt:" echo " ${INCTRLDB}" echo " ${SDLID} already in /usr/share/the64/ui/data/gamecontrollerdb.txt:" >>/mnt/usbid.txt for TXT in ${INCTRLDB};do echo " ${TXT}" >>/mnt/usbid.txt;done fi echo >>/mnt/usbid.txt done echo >>/mnt/usbid.txt echo "dmesg log for generic-usb devices:" >>/mnt/usbid.txt echo >>/mnt/usbid.txt dmesg | grep generic-usb >>/mnt/usbid.txt # Set separator to original value IFS=$OLDIFS
spannernick , if this works you could add it to PCU as well. [EDIT: Updated script to do all devices, not just the last one]
|
|
|
Post by yngwie on Sept 23, 2022 21:21:20 GMT
If I google for SHANWAN USB Gamepad I see a SNES gamepad-style controller and if I google for G-Shark GS-GP702 I see a Playstation PS2-style controller. Do you have both of these connected to THE64 and if so which one are you trying to add? The GUID discovery tool only looks for the last USB device plugged in so you have to make sure that the one you are trying to add is not plugged in until you are in the Carousel already. [EDIT] I've updated the tool to list all connected controllers, so you might want to try again. Regarding the Revision version, this (I think) is just a difference between Windows an Linux.
Thank you for your answer! Thanks to your usbid.txt I got a new, and slightly different GUID!:This one works!  Thank you SO MUCH! Now I just need to figure out the best button mapping 
It is a cheap "arcade style fighting joystick" I bought from china. So my guess why it gives me all these different names is that they have just reshelled an existing USB-gamepad.
|
|
|
Post by jj0 on Sept 23, 2022 21:45:19 GMT
If I google for SHANWAN USB Gamepad I see a SNES gamepad-style controller and if I google for G-Shark GS-GP702 I see a Playstation PS2-style controller. Do you have both of these connected to THE64 and if so which one are you trying to add? The GUID discovery tool only looks for the last USB device plugged in so you have to make sure that the one you are trying to add is not plugged in until you are in the Carousel already. [EDIT] I've updated the tool to list all connected controllers, so you might want to try again. Regarding the Revision version, this (I think) is just a difference between Windows an Linux.
Thank you for your answer! Thanks to your usbid.txt I got a new, and slightly different GUID!:This one works!  Thank you SO MUCH! Now I just need to figure out the best button mapping 
It is a cheap "arcade style fighting joystick" I bought from china. So my guess why it gives me all these different names is that they have just reshelled an existing USB-gamepad.
Cool, nice that you have it working now.
|
|
|
Post by c64stuff on Sept 23, 2022 23:34:22 GMT
I was just curious if a joystick like this would work well with the C64mini. It is USB and has several extra buttons that I use with emulators for F1, F3 reset, etc. Is there a way in the mini to map these reset, start buttons etc to a joystick like this? Also, how is the input lag these days? I bought one of these C64Minis back in 2019 and the lag was bad. Since then Ive gotten a better LCD monitor with 1ms respnse time and game mode. Was hoping with the latest firmwware maybe the Mini is better now?  h linkIf you search the threads I also got the Trooper II joystick for my RetroPie setup and also for use with the C64 mini because I used an Atari joystick back in the day for Atari 2600 and C64 gaming and actually prefer it for most games other than a few where a DPad SNES controller works better depending on the type of game. At least a couple years ago when I searched shopping sites I could find no other Atari style USB joysticks with the extra buttons for GUI navigation. The Trooper II works great with RetroPie other than the joystick is a little too loose for my taste. I prefer putting my thumb on top of the joystick for gameplay and it makes for precise control much like a thumb stick style DPAd control. Anyway, unfortunately at least on PRIOR firmwares of the C64 mini the Trooper II did not work if memory serves. I haven't tried it with the latest C64 mini firmware yet so it might work with it, because the latest firmware had an updated config text file to make it (and the Maxi) more compatible with more controllers, such as the A500 mini controller and mouse which you can buy separately to use with the C64 mini or maxi. If it doesn't work though you can follow the advice in this thread to edit the config file and get it working. Far as the delay on the Mini, firmware updates have greatly decreased the delay to where it's pretty much a non issue. If you do a search on 8 Bit Guy's channel he posted two videos on the mini (and one on the maxi) where he tested the delay both by recorded visual and audio responses and narrowed it down to precise timing. The initial video review of the mini had a hefty delay. His later video on it showed vast improvement because of the firmware update, and I believe the firmware has since already been updated another time or two so it might even be better than what he reported in that later video.
|
|
|
Post by freeloader on Sept 25, 2022 18:30:54 GMT
Did anybody have succes with an PS5 controller?
|
|
|
Post by mmarj on Jan 21, 2023 17:11:03 GMT
I can confirm, that this principle works directly on "The C64" without doing any harm to it. I was able to register two different "unknown" controllers on it; I believe one can register any USB controller with enough buttons.
1) Prepare USB key with "x-windows mod" (duckduckgo can find it). You will find instructions on site.
2) After you obtain registration string from SDL2 gamepad tool, copy-paste it to text file and save it on the key with x-win mod.
3) Enter "x-windows mod" GUI on The C64 (follow instructions on download page). You should have file explorer working. Use USB keyboard and mouse. On the RIGHT page, enter to "gui" folder, then "data" folder, where gamecontrollerdb.txt file is. You should create a copy of this file as a backup in case of trouble.
4) Double-click gamecontrollerdb.txt fille, so that opens in text editor.
5) Back in file explorer, select "usb drive" in the LEFT pane (should be the third folder). You will see the contents of your USB key and thus your txt file you saved registration string to. Double click to open it.
6) Copy registration string from this file into THE END of a gamecontrollerdb.txt file you opened earlier. Move cursor at the end of copied file and press ENTER, so that the file ends with empty line.
7) Save this file.
9) Click on rounded at the bottom left of GUI, and log out. C64 will restart and you should have your controller operational.
I apologize for possible errors in this guide. I also take no resposnsibility for using it.
|
|
|
Post by c64since84 on May 28, 2023 20:51:19 GMT
Has anyone made any progress since this thread was last active? By progress I mean can anyone say they've actually managed to get a vintage joystick working? I've pretty much given up on the reason I bought the Maxi - to be able to play 2-player C64 games without all of the headaches related to keyboard/joystick mapping on emulators, but now I'll settle for just being able to use my old joystick for solo games. I find the one that comes with it just takes all of the fun out of it for me, but if the only route to getting an old joystick to work is some version of what's in this thread, I think I sadly should just sell it to someone who will use it. Is there any hope of a simple way to accomplish this that won't take the whole weekend?
|
|
|
Post by jj0 on May 29, 2023 8:20:21 GMT
Has anyone made any progress since this thread was last active? By progress I mean can anyone say they've actually managed to get a vintage joystick working? I've pretty much given up on the reason I bought the Maxi - to be able to play 2-player C64 games without all of the headaches related to keyboard/joystick mapping on emulators, but now I'll settle for just being able to use my old joystick for solo games. I find the one that comes with it just takes all of the fun out of it for me, but if the only route to getting an old joystick to work is some version of what's in this thread, I think I sadly should just sell it to someone who will use it. Is there any hope of a simple way to accomplish this that won't take the whole weekend? Yes, there are quite a few people who have been able to get their joystick working. The process is a bit convoluted and the fact that this thread is quite long and also somewhat documents the experimentation probably doesn't help. But it doesn't have to take the whole weekend. For me, the easiest way to accomplish this is still: Use the SDL2 Gamepad Tool on a PC to map the joystick directions and buttons how you like them, taking the way the official THE64/VIC20 joysticks are mapped into account/as a reference: THE64 Joystick | gamecontrollerdb.txt input name | Left Fire | lefttrigger | Right Fire | righttrigger | Left Triangle | x | Right Triangle | y | Menu 1 | a | Menu 2 | b | Menu 3 | back | Menu 4 | start | Left/Right | leftx | Up/Down | lefty |
Note that for Left/Right and Up/Down it uses the left analog stick mapping, but it also works fine using dpdleft/dpright and dpup/dpdown instead. So if your controller only reports dpd<xxx> and not leftx/lefty then you can still use it. Then take the entire mapping string that the SDL2 Gamepad Tool generates, change the ID (GUID) number (if different) to the one given by my fake update, put the line in the gamecontrollerdb.txt and remove any other lines with the same ID number.
|
|
|
Post by encom511 on Aug 17, 2023 4:57:23 GMT
I'm not terribly tech savvy, but through some sort of luck and voodoo magic I somehow got PCUE working with a bunch of carousels. Thanks to all who made this happen. It makes the C64 soooooo much more useful & fun to play!!!
I too have a Hyperkin Trooper 2 and I've used it with much success (it is a bit loose as mentioned above) with a Raspberry Pi 3. I ran the SDL program on Windows, but am still a bit confused about finding the GUID number through PCUE. I went ahead and just tried to add this to the gamecontrollerdb.txt with no luck:
03000000242e00006a38000000000000,Trooper V2,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b4,start:b5,dpup:-a4,dpdown:+a4,dpleft:-a0,dpright:+a0,
Would be awesome if somehow there was native support for the Hyperkin Trooper 2. As a kid I always played C64 games with Atari joysticks and it truly is the closest thing to that. It kind of boggles my mind that Retro Games doesn't make an Atari/Commodore like joystick for the C64.
|
|
|
Post by jj0 on Aug 17, 2023 5:54:33 GMT
I'm not terribly tech savvy, but through some sort of luck and voodoo magic I somehow got PCUE working with a bunch of carousels. Thanks to all who made this happen. It makes the C64 soooooo much more useful & fun to play!!! I too have a Hyperkin Trooper 2 and I've used it with much success (it is a bit loose as mentioned above) with a Raspberry Pi 3. I ran the SDL program on Windows, but am still a bit confused about finding the GUID number through PCUE. I went ahead and just tried to add this to the gamecontrollerdb.txt with no luck: 03000000242e00006a38000000000000,Trooper V2,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b4,start:b5,dpup:-a4,dpdown:+a4,dpleft:-a0,dpright:+a0, Would be awesome if somehow there was native support for the Hyperkin Trooper 2. As a kid I always played C64 games with Atari joysticks and it truly is the closest thing to that. It kind of boggles my mind that Retro Games doesn't make an Atari/Commodore like joystick for the C64. The GUID under Windows and Linux are different, can you doublecheck the GUID number by running the fake update described at thec64community.online/post/8889/thread?
|
|