|
Post by spannernick on Nov 16, 2020 15:02:45 GMT
Or I had another idea and run the modules from the USB Stick so they don't need to be copies to the firmware(cause of the warranty) and run them from a folder on the USB Stick... would that work...? I don't see why not, like this...
echo "Setting Up Xpad Driver for THEC64 Mini... " >/dev/ttyS0 sleep 1 echo "Loading Xpad and led drivers" >/dev/ttyS0 insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-core.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-class.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/xpad.ko sleep 1
This is not the finished code yet, got to put a if, then and else statement in there telling it not to load the modules if PCUAE is running on a THEC64 Maxi.
|
|
|
Post by spannernick on Nov 16, 2020 15:03:37 GMT
Oh just seen the other post by jj0, ok thats is a start-up script, I can do it so PCUAE copies all the files over to the firmware for you so you will not need to do anything at all, and it will only do it once then reboot. It will be in a folder in Options called `XPAD_ XBox_360_Contoller_for_Mini` and it will check if its running on the Mini if its running on a maxi it will not copy the XPad files over so it will only work on THEC64 Mini, and when THEC64 Maxi version comes out I will do the same.. wow, never ever saw me making scripts like this months ago.. if it was not for jj0, I would know nothing, Thanks man I'm flattered, thanks. For the record, I think you;re doing a great job in creating and maintaining PCU and incorporating new things into it, it is surely the most popular tool for TheC64 hacking. Thanks, if it was not for you, I would not know any of this, and once I work on something I never stray from it, how I see it is you can only work on one project at a time, thats why Project Lunar by MMC is not completed cause they decided to update BleemSync in to Project Eris in the middle of making Lunar, People who are work on stuff then get confused on what project there working on and lose the drive to complete it, I still think BleemSync is a better name, Project Bleem... , still don't understand the name Eris, the PS1 never had a codename, and as well Eris looks to much like Lunar now, it like a clone of it. I always work on one project until I finish it. Btw, you don't need to copy the files over to the Mini, you can just run the script from a PCU directory if you edit the directory path for the insmod statements to point to that directory. That way the Mini stays uncontaminated. Two minds think alike...
|
|
|
Post by spannernick on Nov 16, 2020 15:55:36 GMT
Right done the script.. see what you think... ? #!/bin/sh # ***Project Carousel USB by Spannernick*** # RetroNuts on YouTube, # Orignal idea by FaberfoX, script by Spannernick/jj0 and Fake Update by jj0, raxrip and cyanic, # Load Carousel Games from USB Stick with Carousel Gamelist Screens, # Boot THEC64 X-Windows Mod by jj0, # JIFFYDOS 6 included # New Soundtrack Now Included, # For THEC64 Mini/Maxi, # This is free for non commercial use, NOT to SELL. #---------------------------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------------------------- # Xpad support for THEC64 Mini/Maxi/ and THE VIC 20 script by Spanner # Xpad driver by jj0 #--------------------------------------------------------------------------------------------------------------------------------------- # DO NOT Edit or change this code. #--------------------------------------------------------------------------------------------------------------------- echo "Setting Up Xpad Driver " >/dev/ttyS0 echo "--> To make the XBOX 360 Controller work with PCUAE..." >/dev/ttyS0 sleep 1 killall the64 killall the64 echo "-->Please Wait Checking what PCUAE is running on..." >/dev/ttyS0 systemversion=$(strings /usr/bin/the64 | grep 'argent\|shield\|amora\|ares')
if echo "$systemversion" | grep -q "argent"; then echo "--> Yes THEC64 Mini PAL version is compatible with the Xpad Driver..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will work with PCUAE..." >/dev/ttyS0 sleep 1 echo "--> Sorry not compatible with THEC64 Maxi at the moment..." >/dev/ttyS0 sleep 1 echo "Loading Xpad and led drivers" >/dev/ttyS0 insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-core.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-class.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/xpad.ko sleep 1 cd /tmp/pcu ./autostart.sh &
elif echo "$systemversion" | grep -q "shield"; then echo "--> Yes THEC64 Mini NTSC version is compatible with the Xpad Driver..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will work with PCUAE..." >/dev/ttyS0 sleep 1 echo "--> Sorry not compatible with THEC64 Maxi at the moment..." >/dev/ttyS0 sleep 1 echo "Loading Xpad and led drivers" >/dev/ttyS0 insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-core.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-class.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/xpad.ko sleep 1 cd /tmp/pcu ./autostart.sh &
elif echo "$systemversion" | grep -q "amora"; then echo "--> Sorry not compatible with THEC64 Maxi at the moment..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will not work." >/dev/ttyS0 sleep 1 cd /tmp/pcu ./autostart.sh &
elif echo "$systemversion" | grep -q "ares"; then echo "--> Sorry not compatible with THEC64 Maxi..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will not work..." >/dev/ttyS0 sleep 1 cd /tmp/pcu ./autostart.sh & fi
|
|
|
Post by jj0 on Nov 16, 2020 16:24:17 GMT
Any luck with compiling? I have tried to locate compiled drivers in any binary distribution but so far no hit. Will next try to disassemble Retrorangepi build for the H3, maybe I can find them there. I've compiled the drivers but there are still some symbols missing so still trying to figure it out. Ok, the attached modules work on my 1.4.2 Maxi. To use, un7z into a folder on a USB stick (I assume xpad-driver-Maxi), insert and mount the USB stick at/on the Maxi to /mnt and: cd /mnt/xpad-driver-Maxi ./insmod -f led-core.ko ./insmod -f led-triggers.ko ./insmod -f led-class.ko ./insmod -f xpad.ko You can test with the also included evtest: # ./evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: RGL Multi Function Power Button /dev/input/event1: THEC64 Keyboard /dev/input/event2: THEC64 Keyboard /dev/input/event3: Generic X-Box pad /dev/input/event4: Generic X-Box pad /dev/input/event5: Generic X-Box pad /dev/input/event6: Generic X-Box pad Select the device event number [0-6]: 3 Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x45e product 0x291 version 0x107 Input device name: "Generic X-Box pad" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 304 (BTN_SOUTH) Event code 305 (BTN_EAST) Event code 307 (BTN_NORTH) Event code 308 (BTN_WEST) Event code 310 (BTN_TL) Event code 311 (BTN_TR) Event code 314 (BTN_SELECT) Event code 315 (BTN_START) Event code 316 (BTN_MODE) Event code 317 (BTN_THUMBL) Event code 318 (BTN_THUMBR) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 0 Min -32768 Max 32767 Fuzz 16 Flat 128 Event code 1 (ABS_Y) Value 0 Min -32768 Max 32767 Fuzz 16 Flat 128 Event code 2 (ABS_Z) Value 0 Min 0 Max 255 Event code 3 (ABS_RX) Value 0 Min -32768 Max 32767 Fuzz 16 Flat 128 Event code 4 (ABS_RY) Value 0 Min -32768 Max 32767 Fuzz 16 Flat 128 Event code 5 (ABS_RZ) Value 0 Min 0 Max 255 Event code 16 (ABS_HAT0X) Value 0 Min -1 Max 1 Event code 17 (ABS_HAT0Y) Value 0 Min -1 Max 1 Event type 21 (EV_FF) Event code 80 (FF_RUMBLE) Event code 81 (FF_PERIODIC) Event code 88 (FF_SQUARE) Event code 89 (FF_TRIANGLE) Event code 90 (FF_SINE) Event code 96 (FF_GAIN) Properties: Testing ... (interrupt to exit)
And then you can test whether all buttons/sticks/triggers work. You can also use XWM to test after inserting the modules and unmounting the USB stick. One pesky difference with the Mini version is that the 4 leds on the (X) button keep blinking instead of the top left one becoming solid. Not sure why, I've tried different versions but they all had the same issue. Attachments:xpad-driver-Maxi.7z (132.62 KB)
|
|
|
Post by jj0 on Nov 16, 2020 16:34:12 GMT
Right done the script.. see what you think... ? #!/bin/sh # ***Project Carousel USB by Spannernick*** # RetroNuts on YouTube, # Orignal idea by FaberfoX, script by Spannernick/jj0 and Fake Update by jj0, raxrip and cyanic, # Load Carousel Games from USB Stick with Carousel Gamelist Screens, # Boot THEC64 X-Windows Mod by jj0, # JIFFYDOS 6 included # New Soundtrack Now Included, # For THEC64 Mini/Maxi, # This is free for non commercial use, NOT to SELL. #---------------------------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------------------------------- # Xpad support for THEC64 Mini/Maxi/ and THE VIC 20 script by Spanner # Xpad driver by jj0 #--------------------------------------------------------------------------------------------------------------------------------------- # DO NOT Edit or change this code. #--------------------------------------------------------------------------------------------------------------------- echo "Setting Up Xpad Driver " >/dev/ttyS0 echo "--> To make the XBOX 360 Controller work with PCUAE..." >/dev/ttyS0 sleep 1 killall the64 killall the64 echo "-->Please Wait Checking what PCUAE is running on..." >/dev/ttyS0 systemversion=$(strings /usr/bin/the64 | grep 'argent\|shield\|amora\|ares')
if echo "$systemversion" | grep -q "argent"; then echo "--> Yes THEC64 Mini PAL version is compatible with the Xpad Driver..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will work with PCUAE..." >/dev/ttyS0 sleep 1 echo "--> Sorry not compatible with THEC64 Maxi at the moment..." >/dev/ttyS0 sleep 1 echo "Loading Xpad and led drivers" >/dev/ttyS0 insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-core.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-class.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/xpad.ko sleep 1 cd /tmp/pcu ./autostart.sh &
elif echo "$systemversion" | grep -q "shield"; then echo "--> Yes THEC64 Mini NTSC version is compatible with the Xpad Driver..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will work with PCUAE..." >/dev/ttyS0 sleep 1 echo "--> Sorry not compatible with THEC64 Maxi at the moment..." >/dev/ttyS0 sleep 1 echo "Loading Xpad and led drivers" >/dev/ttyS0 insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-core.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/led-class.ko insmod /tmp/pcu/Carousel_Games/Options/Xbox-360-Controller-Xpad-with-LED-support/xpad.ko sleep 1 cd /tmp/pcu ./autostart.sh &
elif echo "$systemversion" | grep -q "amora"; then echo "--> Sorry not compatible with THEC64 Maxi at the moment..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will not work." >/dev/ttyS0 sleep 1 cd /tmp/pcu ./autostart.sh &
elif echo "$systemversion" | grep -q "ares"; then echo "--> Sorry not compatible with THEC64 Maxi..." >/dev/ttyS0 sleep 1 echo "--> XBOX 360 Controller will not work..." >/dev/ttyS0 sleep 1 cd /tmp/pcu ./autostart.sh & fi
I think that would work, but I have a few suggestions: 1. Add the Maxi version that I just posted 2. I only compiled the xpad driver, so maybe it's better to say 'xpad modules provided by jj0' 3. For killing the64 I prefer: # Stop the Carousel until [ `ps | grep -e the64 | wc -l` -eq 1 ] do killall the64 done
4. You don't need to find the system type in the 'the64' binary, it is given as argument by the Carousel to the start.sh script. So you can just test on what is in $1, amora, shield, ares, argent and load to correct modules. You can also pass it on the autostart.sh ('autostart.sh $1') and use it in that script as well. 5. I'm not sure if the drivers work on the NTSC mini as well, you might have to use the insmod I provided with the Maxi drivers and use 'insmod -f' if it's a shield
|
|
|
Post by kugelblitz on Nov 17, 2020 11:30:38 GMT
I've compiled the drivers but there are still some symbols missing so still trying to figure it out. Ok, the attached modules work on my 1.4.2 Maxi. To use, un7z into a folder on a USB stick (I assume xpad-driver-Maxi), insert and mount the USB stick at/on the Maxi to /mnt and: cd /mnt/xpad-driver-Maxi ./insmod -f led-core.ko ./insmod -f led-triggers.ko ./insmod -f led-class.ko ./insmod -f xpad.ko Sorry to be such a bother, but the xpad.co inside the .7zip does not load. It also has a file date with the year 1980 - maybe you zipped the wrong file? I still get the invalid module format with this xpad.co
|
|
|
Post by jj0 on Nov 17, 2020 15:56:02 GMT
Ok, the attached modules work on my 1.4.2 Maxi. To use, un7z into a folder on a USB stick (I assume xpad-driver-Maxi), insert and mount the USB stick at/on the Maxi to /mnt and: cd /mnt/xpad-driver-Maxi ./insmod -f led-core.ko ./insmod -f led-triggers.ko ./insmod -f led-class.ko ./insmod -f xpad.ko Sorry to be such a bother, but the xpad.co inside the .7zip does not load. It also has a file date with the year 1980 - maybe you zipped the wrong file? I still get the invalid module format with this xpad.co Hmmmm. Weird. It works on my Maxi. The 1980 date is just a side effect of how I copied it to the Maxi. I've just tried again with some additional details: # mount /dev/sda1 /mnt # cd /mnt/xpad-Maxi/ # md5sum * 20999e9fc183869d413f7cac7002aea0 evtest 0aeabe80640ff0ec51a00c1316945cbe insmod 7858e60b84e522ad81cee067916262c8 led-class.ko 389484bfbb135d23ca9d1b5fcd8d4915 led-core.ko 0bb354b14ab6e0e28575ae0dc7a57316 led-triggers.ko e74ae2cfe55a9823c9e9a0c2f6673aac xpad.ko # uname -a Linux redquarktwo 3.4.39 #1 SMP PREEMPT Wed Sep 11 17:59:09 BST 2019 armv7l GNU/Linux # insmod -f ./led-core.ko # insmod -f ./led-triggers.ko # insmod -f ./led-class.ko # insmod -f ./xpad.ko # dmesg | tail -n 10 <some unrelated stuff removed> [ 46.186822] led_core: module_layout: kernel tainted. [ 46.186842] Disabling lock debugging due to kernel taint [ 46.186860] led_core: module license 'unspecified' taints kernel. [ 77.143044] usbcore: registered new interface driver xpad # Can you try the same?
|
|
|
Post by kugelblitz on Nov 19, 2020 11:31:47 GMT
Hello jj0 , I am afraid it does not work. I am using the standard july xmod and then try to insmod your latest files, but they are not accepted. Additional info: of course I still had the startup script running too :-( but these are the error messages when I scroll back in the log.
|
|
|
Post by spannernick on Nov 19, 2020 12:16:15 GMT
Don't you just hate it when 2 THEC64 Maxi's the same, act differently, weird..
|
|
|
Post by jj0 on Nov 19, 2020 13:00:31 GMT
Don't you just hate it when 2 THEC64 Maxi's the same, act differently, weird.. No, it's an interesting puzzle :-)
|
|
|
Post by jj0 on Nov 19, 2020 13:07:26 GMT
Hello jj0 , I am afraid it does not work. I am using the standard july xmod and then try to insmod your latest files, but they are not accepted. View AttachmentAdditional info: of course I still had the startup script running too :-( but these are the error messages when I scroll back in the log. View AttachmentHi kugelblitz , We seem to be on the same kernel. Are you executing the insmod commands from XWM? I'm not sure if that should work. What you could try is run the commands via OTG access commandline instead.
|
|
|
Post by kugelblitz on Nov 19, 2020 13:13:15 GMT
Yes, have tried both insmods. Wondering whether YOU did something to your Maxi that prevents this or me to mine. AFAIK I only had the Autoboot-Script from Nick and no further changes to that machine (unlike my mini that I patched around a lot). On the maxi I only tried the controller drivers and the gamecontroller.db patch of mine.
Over the weekend I will restore NandB and try again. Maybe that solves the problem.
|
|
|
Post by spannernick on Nov 19, 2020 13:16:01 GMT
Don't you just hate it when 2 THEC64 Maxi's the same, act differently, weird.. No, it's an interesting puzzle :-) yep, that needs working out... Silly me the commandline terminal is from XWM, why didn't I notice it.. XWM is not theC64 Maxi firmware, it a image of a OS running on top of it so its not Buildroot and your not in the firmware, to talk to the firmware you need to connect to it by a UART or use jj0's Maxi-OTG...
|
|
|
Post by kugelblitz on Nov 19, 2020 15:00:00 GMT
Yes - that might explain why I can't insmod in XWM. But it does not explain why I can't insmod during boot with a script. Because XWM changes the real files on the Maxi.
|
|
|
Post by jj0 on Nov 19, 2020 15:51:46 GMT
Yes - that might explain why I can't insmod in XWM. But it does not explain why I can't insmod during boot with a script. Because XWM changes the real files on the Maxi. During boot, do you use the insmod from the zip file, or the standard one from the Maxi?
|
|
|
Post by kugelblitz on Nov 19, 2020 16:16:44 GMT
Yes - that might explain why I can't insmod in XWM. But it does not explain why I can't insmod during boot with a script. Because XWM changes the real files on the Maxi. During boot, do you use the insmod from the zip file, or the standard one from the Maxi? So far the one from the Maxi. Will have time at the weekend to experiment further.
|
|
|
Post by jj0 on Nov 19, 2020 16:21:12 GMT
During boot, do you use the insmod from the zip file, or the standard one from the Maxi? So far the one from the Maxi. Will have time at the weekend to experiment further. Ok, that might explain the issue.
|
|
janu
Creatures
Posts: 11
|
Post by janu on Nov 30, 2020 18:25:55 GMT
Don't you just hate it when 2 THEC64 Maxi's the same, act differently, weird.. No, it's an interesting puzzle :-) I had similar issue. If I typed just insmod -f ./module.ko System said "invalid format". That's because by default executables are not run from local dir. So I had to do: ./insmod -f ./module.ko And installation succeeded.
|
|
|
Post by spannernick on Nov 30, 2020 19:23:16 GMT
Running in PCUAE now.. -->Please Wait Checking what PCUAE is running on... --> Mounting Controllers/Joystick Gamecontrollerdb Text File --> Mounting Textures for the Carousel v1.3.2 --> Mounting C64 Emu(PCU) v1.3.0 with Joystick Swap and 4 Port User Port mod --> Yes THEC64 Maxi is compatible with the Maxi Xpad Driver... --> Mounting VIC-20 Emu v1.3.0 --> Mounting Save folders for v1.3.2 --> Refreshing the Carousel. -->Please Wait... -->Runing Carousel for one second -->Done... --> Carousel Running --> XBOX 360 Controller will work with PCUAE... --> Loading Xpad and led drivers [ 19.493828] led_core: module_layout: kernel tainted. [ 19.499559] Disabling lock debugging due to kernel taint [ 19.505704] led_core: module license 'unspecified' taints kernel. [ 19.570493] usbcore: registered new interface driver xpad --> You can now connect your Xbox 360 Controller --> Carousel Gamelist Screen 0_fav/favgames1 showing in The Carousel v1.3.2 --> and now Running and showing on the TV Screen
My Xbox Wired controller it working the Dpad is and moving the yellow square box is.. and just played up`n`Down game.. The drivers only work on PCUAE so they are not copied to the firmware, I had to make a script to get them to work.. thanks jj0.. and everyone who tested them, tested on THEC64 Maxi.
|
|
|
Post by kugelblitz on Nov 30, 2020 20:04:36 GMT
Awesome! Can you add all variations of the wireless receiver to controller.db? I researched and posted them here over a year ago...
|
|
|
Post by jj0 on Dec 1, 2020 8:41:26 GMT
Running in PCUAE now.. -->Please Wait Checking what PCUAE is running on... --> Mounting Controllers/Joystick Gamecontrollerdb Text File --> Mounting Textures for the Carousel v1.3.2 --> Mounting C64 Emu(PCU) v1.3.0 with Joystick Swap and 4 Port User Port mod --> Yes THEC64 Maxi is compatible with the Maxi Xpad Driver... --> Mounting VIC-20 Emu v1.3.0 --> Mounting Save folders for v1.3.2 --> Refreshing the Carousel. -->Please Wait... -->Runing Carousel for one second -->Done... --> Carousel Running --> XBOX 360 Controller will work with PCUAE... --> Loading Xpad and led drivers [ 19.493828] led_core: module_layout: kernel tainted. [ 19.499559] Disabling lock debugging due to kernel taint [ 19.505704] led_core: module license 'unspecified' taints kernel. [ 19.570493] usbcore: registered new interface driver xpad --> You can now connect your Xbox 360 Controller --> Carousel Gamelist Screen 0_fav/favgames1 showing in The Carousel v1.3.2 --> and now Running and showing on the TV Screen
My Xbox Wired controller it working the Dpad is and moving the yellow square box is.. and just played up`n`Down game.. The drivers only work on PCUAE so they are not copied to the firmware, I had to make a script to get them to work.. thanks jj0.. and everyone who tested them, tested on THEC64 Maxi. Cool - Does it load the Mini''s drivers if it's on a Mini??
|
|
|
Post by spannernick on Dec 1, 2020 11:01:34 GMT
I try it on my Mini later and we will see, the script picks which device it is so if I put PCUAE in the Mini it should load the drivers for the Mini. I am uploading PCUAEv1.20 to the Dev folder for you to test if you like jj0.. it includes the xpad driver script, its still syncing at the moment shouldn't take long.. its 1.3 GB/2.75 GB uncompressed, its in PCUAE Zipped folder, It includes 199 games for the Vic 20 on the VIC 20 Screen now but not all of them have descriptions yet, I am doing them gradually, I have got to B at the moment, its finding the info for that game, some are hard to find cause there so old, stuck on Bug Crusher at the moment, made a temp cover.png file for it cause there was not one on LaunchBox or anywhere on the net. Best place I have found funny enough is LaunchBox for VIC 20 games info.. cause it has a database for games and uses png files for its screenshots and cover box art. Uploaded 1.1 GB so far... If anyone wants to test PCUAEv1.20 PM me.. but only PM me if you are willing to test it and remember it not complete so some of the Vic 20 games might not work properly, or new features might not work properly. It uploaded now jj0.. I will post this in the PCU thread too.
|
|