Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
analog stick config options break controls
#1
im working on my first build. i have the add-on board and some psp sticks but i cant get the configuration to recognize the gamepad when i uncomment the analog stick configuration. 

using /etc/modprobe.d/mk_arcade_joystick.conf

scenario 1 - base configuration = 

options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,-1,-1,-1,-1,-1,-1,-1,-1 hkmode=2

abxy works fine, but the l2/r2 buttons arent recognized. this is expected. 

scenario 2 - i change the config to

#options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,-1,-1,-1,-1,-1,-1,-1,-1 hkmode=2
#this next line is for use with 4 extra buttons (maybe L2,R2,C,Z)
options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40,-1,-1,-1,-1 hkmode=2

now abxy works fine, plus l2/r2 is recognized and i can configure the input fine. this is expected.

scenario 3 - i change config to uncomment the analog stick line, and change the gpio settings

#options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,-1,-1,-1,-1,-1,-1,-1,-1 hkmode=2
#this next line is for use with 4 extra buttons (maybe L2,R2,C,Z)
#options mk_arcade_joystick_rpi map=4 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40,-1,-1,-1,-1 hkmode=2
#this next line is for use with a single PSP1000 analog stick
#options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=72 y1addr=77 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,-1,41,-1,-1,-1,-1
#this next line is for use with 2 PSP1000 analog sticks
options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=72 y1addr=77 x2addr=75 y2addr=79 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40,-1,-1,-1

when i use the above config, reboot and try to configure the input, the gamepad is totally not recognized. in all scenarios, I'm using a usb keyboard to navigate to the configure input menu, but when i try to enable the psp sticks, it really doesnt like it Sad 

any ideas what could be wrong? everything is physically connected well on the board so i'm guessing its a driver thing? my image runs mk_arcade_joystick_rpi -v 0.1.6.0
Reply
#2
There is maybe a false contact on pin 44/45 (I2C).
Can you add " debug=1 " to the uncommented line, reboot and post 'sudo dmesg' and 'sudo i2cdetect -y 1' output please.
Reply
#3
(11-03-2019, 02:24 PM)farlsmagee Wrote: options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=72 y1addr=77 x2addr=75 y2addr=79 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40,-1,-1,-1

when i use the above config, reboot and try to configure the input, the gamepad is totally not recognized. in all scenarios, I'm using a usb keyboard to navigate to the configure input menu, but when i try to enable the psp sticks, it really doesnt like it Sad 

any ideas what could be wrong? everything is physically connected well on the board so i'm guessing its a driver thing? my image runs mk_arcade_joystick_rpi -v 0.1.6.0

Could you log in and run 

dmesg | grep mk_arcade

and show the output here?


Also, you have gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,41,40,-1,-1,-1
but what are you doing with GPIO 40?  I think that shouldn't be there.  42 and 43 would usually be the L2/R2.  41 would often be the HOTKEY (or any other input you want).  

40 would typically be the fan.
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply
#4
(11-04-2019, 09:32 PM)Porcinus Wrote: There is maybe a false contact on pin 44/45 (I2C).
Can you add " debug=1 " to the uncommented line, reboot and post 'sudo dmesg' and 'sudo i2cdetect -y 1' output please.

pi@retropie:~ $ sudo dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.42-v7+ (dom@dom-XPS-13-9370) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1219 SMP Tue May 14 21:20:58 BST 2019
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi Compute Module 3 Plus Rev 1.0
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 8 MiB at 0x2f800000
[    0.000000] On node 0 totalpages: 196608
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:63
[    0.000000] random: get_random_bytes called from start_kernel+0xac/0x4b4 with crng_init=0
[    0.000000] percpu: Embedded 17 pages/cpu s39488 r8192 d21952 u69632
[    0.000000] pcpu-alloc: s39488 r8192 d21952 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 194880
[    0.000000] Kernel command line: coherent_pool=1M bcm2708_fb.fbwidth=320 bcm2708_fb.fbheight=240 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EBBig Grin7:C9:4F vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=PARTUUID=f2d3cb4f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 756388K/786432K available (8192K kernel code, 627K rwdata, 2164K rodata, 1024K init, 821K bss, 21852K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xb0800000 - 0xff800000   (1264 MB)
                   lowmem  : 0x80000000 - 0xb0000000   ( 768 MB)
                   modules : 0x7f000000 - 0x80000000   (  16 MB)
                     .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
                     .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
                     .data : 0x(ptrval) - 0x(ptrval)   ( 628 kB)
                      .bss : 0x(ptrval) - 0x(ptrval)   ( 822 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 26229 entries in 77 pages
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000018] Switching to timer-based delay loop, resolution 52ns
[    0.000275] Console: colour dummy device 80x30
[    0.000295] console [tty1] enabled
[    0.000337] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000354] pid_max: default: 32768 minimum: 301
[    0.000696] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000711] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001621] CPU: Testing write buffer coherency: ok
[    0.002077] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002726] Setting up static identity map for 0x100000 - 0x10003c
[    0.002874] rcu: Hierarchical SRCU implementation.
[    0.003667] smp: Bringing up secondary CPUs ...
[    0.004497] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.005422] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.006284] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.006403] smp: Brought up 1 node, 4 CPUs
[    0.006415] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.006420] CPU: All CPU(s) started in HYP mode.
[    0.006425] CPU: Virtualization extensions available.
[    0.007372] devtmpfs: initialized
[    0.018969] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.019207] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.019226] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.019813] pinctrl core: initialized pinctrl subsystem
[    0.020724] NET: Registered protocol family 16
[    0.023795] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.029584] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.029592] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.029807] Serial: AMBA PL011 UART driver
[    0.032196] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.067771] bcm2835-dma 3f007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1
[    0.069418] SCSI subsystem initialized
[    0.069637] usbcore: registered new interface driver usbfs
[    0.069699] usbcore: registered new interface driver hub
[    0.069792] usbcore: registered new device driver usb
[    0.080454] raspberrypi-firmware soc:firmware: Attached to firmware from 2019-03-27 15:45, variant start
[    0.090280] raspberrypi-firmware soc:firmware: Firmware hash is 2e98b31d18547962e564bdf88e57b3df7085c29b
[    0.102206] clocksource: Switched to clocksource arch_sys_counter
[    0.190922] VFS: Disk quotas dquot_6.6.0
[    0.191006] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.191226] FS-Cache: Loaded
[    0.191439] CacheFiles: Loaded
[    0.201409] NET: Registered protocol family 2
[    0.202242] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.202281] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.202390] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.202576] TCP: Hash tables configured (established 8192 bind 8192)
[    0.202716] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.202766] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.203100] NET: Registered protocol family 1
[    0.203703] RPC: Registered named UNIX socket transport module.
[    0.203710] RPC: Registered udp transport module.
[    0.203716] RPC: Registered tcp transport module.
[    0.203721] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.205454] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.208512] Initialise system trusted keyrings
[    0.208696] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.218474] FS-Cache: Netfs 'nfs' registered for caching
[    0.219047] NFS: Registering the id_resolver key type
[    0.219074] Key type id_resolver registered
[    0.219080] Key type id_legacy registered
[    0.219097] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.221390] Key type asymmetric registered
[    0.221399] Asymmetric key parser 'x509' registered
[    0.221448] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.221612] io scheduler noop registered
[    0.221620] io scheduler deadline registered (default)
[    0.221817] io scheduler cfq registered
[    0.221825] io scheduler mq-deadline registered (default)
[    0.221832] io scheduler kyber registered
[    0.225032] BCM2708FB: allocated DMA memory 0xef910000
[    0.225075] BCM2708FB: allocated DMA channel 0
[    0.228557] Console: switching to colour frame buffer device 40x30
[    0.232329] bcm2835-rng 3f104000.rng: hwrng registered
[    0.232504] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.233001] vc-sm: Videocore shared memory driver
[    0.233321] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    0.244106] brd: module loaded
[    0.254167] loop: module loaded
[    0.254181] Loading iSCSI transport class v2.0-870.
[    0.254904] libphy: Fixed MDIO Bus: probed
[    0.255016] usbcore: registered new interface driver lan78xx
[    0.255074] usbcore: registered new interface driver smsc95xx
[    0.255090] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.282981] dwc_otg 3f980000.usb: base=(ptrval)
[    0.483216] Core Release: 2.80a
[    0.483225] Setting default values for core params
[    0.483256] Finished setting default values for core params
[    0.683525] Using Buffer DMA mode
[    0.683532] Periodic Transfer Interrupt Enhancement - disabled
[    0.683538] Multiprocessor Interrupt Enhancement - disabled
[    0.683545] OTG VER PARAM: 0, OTG VER FLAG: 0
[    0.683563] Dedicated Tx FIFOs mode
[    0.684025] WARN::dwc_otg_hcd_init:1045: FIQ DMA bounce buffers: virt = af904000 dma = 0xef904000 len=9024
[    0.684050] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    0.684058] dwc_otg: Microframe scheduler enabled
[    0.684113] WARN::hcd_init_fiq:457: FIQ on core 1
[    0.684125] WARN::hcd_init_fiq:458: FIQ ASM at 8064b6dc length 36
[    0.684137] WARN::hcd_init_fiq:484: MPHI regs_base at f0006000
[    0.684198] dwc_otg 3f980000.usb: DWC OTG Controller
[    0.684232] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.684265] dwc_otg 3f980000.usb: irq 56, io mem 0x00000000
[    0.684313] Init: Port Power? op_state=1
[    0.684319] Init: Power Port (0)
[    0.684569] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.684580] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.684590] usb usb1: Product: DWC OTG Controller
[    0.684599] usb usb1: Manufacturer: Linux 4.19.42-v7+ dwc_otg_hcd
[    0.684607] usb usb1: SerialNumber: 3f980000.usb
[    0.685221] hub 1-0:1.0: USB hub found
[    0.685274] hub 1-0:1.0: 1 port detected
[    0.685840] dwc_otg: FIQ enabled
[    0.685846] dwc_otg: NAK holdoff enabled
[    0.685852] dwc_otg: FIQ split-transaction FSM enabled
[    0.685862] Module dwc_common_port init
[    0.686130] usbcore: registered new interface driver usb-storage
[    0.686307] mousedev: PS/2 mouse device common for all mice
[    0.687305] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    0.687616] bcm2835-cpufreq: min=600000 max=1200000
[    0.688082] sdhci: Secure Digital Host Controller Interface driver
[    0.688087] sdhci: Copyright© Pierre Ossman
[    0.688484] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    0.688603] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.689079] ledtrig-cpu: registered to indicate activity on CPUs
[    0.689156] hidraw: raw HID events driver © Jiri Kosina
[    0.689322] usbcore: registered new interface driver usbhid
[    0.689327] usbhid: USB HID core driver
[    0.690066] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0
[    0.691565] [vc_sm_connected_init]: start
[    0.700140] [vc_sm_connected_init]: end - returning 0
[    0.701160] Initializing XFRM netlink socket
[    0.701185] NET: Registered protocol family 17
[    0.701285] Key type dns_resolver registered
[    0.701840] Registering SWP/SWPB emulation handler
[    0.702493] registered taskstats version 1
[    0.702510] Loading compiled-in X.509 certificates
[    0.709562] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    0.709637] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    0.709696] console [ttyAMA0] enabled
[    0.711662] sdhost: log_buf @ (ptrval) (ef907000)
[    0.758987] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    0.760240] of_cfs_init
[    0.760358] of_cfs_init: OK
[    0.760916] Waiting for root device PARTUUID=f2d3cb4f-02...
[    0.848860] mmc0: host does not support reading read-only switch, assuming write-enable
[    0.852853] mmc0: new high speed SDXC card at address aaaa
[    0.853961] mmcblk0: mmc0:aaaa SC128 119 GiB
[    0.856651]  mmcblk0: p1 p2
[    0.894345] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    0.894402] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    0.897176] devtmpfs: mounted
[    0.902352] Indeed it is in host mode hprt0 = 00021501
[    0.903014] Freeing unused kernel memory: 1024K
[    0.989796] random: fast init done
[    0.992624] Run /sbin/init as init process
[    1.112259] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    1.112516] Indeed it is in host mode hprt0 = 00001101
[    1.353695] usb 1-1: New USB device found, idVendor=0bda, idProduct=8176, bcdDevice= 2.00
[    1.353710] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.353719] usb 1-1: Product: 802.11n WLAN Adapter
[    1.353728] usb 1-1: Manufacturer: Realtek
[    1.353737] usb 1-1: SerialNumber: 00e04c000001
[    1.440716] systemd[1]: System time before build time, advancing clock.
[    1.586050] NET: Registered protocol family 10
[    1.587330] Segment Routing with IPv6
[    1.616286] random: systemd: uninitialized urandom read (16 bytes read)
[    1.618597] random: systemd: uninitialized urandom read (16 bytes read)
[    1.624500] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    1.625087] systemd[1]: Detected architecture arm.
[    1.629208] systemd[1]: Set hostname to <retropie>.
[    1.679094] random: systemd-cryptse: uninitialized urandom read (16 bytes read)
[    1.712509] uart-pl011 3f201000.serial: no DMA platform data
[    2.176854] systemd[1]: Reached target Swap.
[    2.177868] systemd[1]: Listening on udev Kernel Socket.
[    2.178486] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    2.179716] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    2.180302] systemd[1]: Listening on fsck to fsckd communication Socket.
[    2.180891] systemd[1]: Listening on Syslog Socket.
[    2.181451] systemd[1]: Listening on Journal Socket (/dev/log).
[    2.339899] mk_arcade_joystick_rpi: loading out-of-tree module taints kernel.
[    2.341891] mk_arcade_joystick_rpi: at least one device must be specified
[    2.474486] mk_arcade_joystick_rpi: at least one device must be specified
[    2.582652] i2c /dev entries driver
[    2.584832] mk_arcade_joystick_rpi: at least one device must be specified
[    3.078058] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    3.156590] systemd-journald[125]: Received request to flush runtime journal from PID 1
[    3.555642] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    3.557482] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    3.557497] [vc_sm_connected_init]: start
[    3.562711] media: Linux media interface: v0.10
[    3.572233] random: crng init done
[    3.572251] random: 7 urandom warning(s) missed due to ratelimiting
[    3.575945] [vc_sm_connected_init]: installed successfully
[    3.618033] bcm2708_i2c 3f804000.i2c: BSC1 Controller at 0x3f804000 (irq 77) (baudrate 400000)
[    3.650055] videodev: Linux video capture interface: v2.00
[    3.690525] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    3.699670] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    3.704983] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    3.723000] bcm2835_audio soc:audio: card created with 8 channels
[    3.724479] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    3.747332] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    3.747356] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    3.758647] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    3.758663] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    3.764169] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    3.764187] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    3.999616] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    4.129027] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    4.389372] usbcore: registered new interface driver rtl8192cu
[    5.240262] Adding 102396k swap on /var/swap.  Priority:-2 extents:2 across:161788k SSFS
[    5.754845] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    7.578598] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Reply
#5
(11-04-2019, 09:32 PM)Porcinus Wrote: There is maybe a false contact on pin 44/45 (I2C).
Can you add " debug=1 " to the uncommented line, reboot and post 'sudo dmesg' and 'sudo i2cdetect -y 1' output please.

 sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- 4b -- 4d -- 4f
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
Reply
#6
I2C is OK but :
[ 2.341891] mk_arcade_joystick_rpi: at least one device must be specified

3 possibility in mk_arcade_joystick.conf: all lines are commented, 2 lines are uncommented or a error in the uncommented line.

"options mk_arcade_joystick_rpi ..." need to be in one line, commented or not.

Edit: "gpio" part need 21 numbers, you have 20, add ",-1" at the end and retry please
Reply
#7
You don't need to restart at each time to test, open 2 ssh connection:
- on the first one : 'sudo dmesg -w'
- for the second, 'sudo modprobe -r mk_arcade_joystick_rpi', make your edit and 'sudo modprobe mk_arcade_joystick_rpi'

The first shell should show something like : "mk_arcade_joystick_rpi: Freeplay Button Driver" plus additionnal infos
Reply
#8
i made sure to have 21 gpio positions and then just killed the driver and restarted it. viola... sticks are working!

however... 

I must have wired the right stick wrong bc the x axis thought it is was the y axis and vice versa. no worries... i just changed the config to swap the x1 and y1 addresses... problem solved. 



options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=77 y1addr=72 x2addr=75 y2addr=79 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,-1,41,-1,-1,-1,-1

next problem... my left stick i think is wired correclty, but to get the wires to curl around to the back correctly, i mounted it upside down on my board so both the x and y axis are inverted (up is down and down is up. right is left and left is right). can i get around this with a config change or do i have to physically turn the stick?
Reply
#9
Can you try to add "x1dir=-1 y1dir=-1 " and restart the driver using modprobe commands please.

Edit: Sorry, it is -1 not 1 :/
Reply
#10
xdir=-1 and ydir=-1 worked. now the sticks are all aligned properly. i've got some bad stick drift, but ill come back to that one later.

new problem now... when i launch a n64 game, the controllers work fine, sticks and all. however, when i launch any other system rom, all controls stop working. in the bottom left, it says the controller is configured as controller #1 in port 0, but then no controls work. if i sudo in and stop the driver (while still in game), then restart the driver, it pops up in the bottom left again that the controller is configured as controller #1 in port 0, and starts working. i can play the game normally. i can exit to the menu and go launch any other rom... same problem... except if i launch n64 games.

here is my active config line - and i can confirm there are no other active config lines.

options mk_arcade_joystick_rpi map=4 hkmode=2 i2cbus=1 x1addr=77 y1addr=72 x2addr=75 y2addr=79 x2dir=-1 y2dir=-1 x1params=550,3600,16,300 y1params=550,3600,16,300 x2params=550,3600,16,300 y2params=550,3660,16,300 gpio=4,17,6,5,19,26,16,24,23,18,15,14,-20,42,43,-1,41,-1,-1,-1,-1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)