batocera-linux / batocera.linux

batocera.linux
https://batocera.org
Other
2.04k stars 525 forks source link

Unico Fun R1 Support? (Amlogic S905X based device) #6324

Closed iokzero closed 2 years ago

iokzero commented 2 years ago

Hi Batocera Team,

Recently I come obtained an Unico Fun R1, a SNK officially licensed console made by the same company made the MVSX, Arcade Stick Pro, and NeoGeo Mini.

I manage to have it boot into to Batocera, and most of the things works, except the joystick(X2) and the WiFi. In fact Batocera, is by far the closest for me to get this thing working under a custom OS. NOTE: Coreelec also boot but USB don't work.

The Joysticks are connected to a JAMMA header that I believe is controlled by 8Bit micro controller. with the following info on the chip: STM8S105 C4T6 991TN RDVG MYS, 99 &31 I am not 100% what communication protocol it use to talk to the CPU.

The WiFi is a solider on daughter board with the following info on the chip: 8189ETV 1213M31 GI07

Both components didn't get recongize by the Kernel it seems, with the following dmesg:

` [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.10.90 (batocera@4e8e4b3324fc) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2019.11-15034-gc634032f0d) 11.2.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Sat May 21 06:19:38 CEST 2022 [ 0.000000] Machine model: Amlogic Meson GXL (S905X) P212 Development Board [ 0.000000] efi: UEFI not found. [ 0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader! [ 0.000000] OF: reserved mem: failed to allocate memory for node 'linux,cma' [ 0.000000] NUMA: No NUMA configuration found [ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x0000000037ffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x37e30100-0x37e31fff] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x0000000037ffffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000000ffffff] [ 0.000000] node 0: [mem 0x0000000001000000-0x0000000004ffffff] [ 0.000000] node 0: [mem 0x0000000005000000-0x00000000072fffff] [ 0.000000] node 0: [mem 0x0000000007300000-0x000000000fffffff] [ 0.000000] node 0: [mem 0x0000000010000000-0x00000000101fffff] [ 0.000000] node 0: [mem 0x0000000010200000-0x0000000037ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000037ffffff] [ 0.000000] On node 0 totalpages: 229376 [ 0.000000] DMA zone: 3584 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 229376 pages, LIFO batch:63 [ 0.000000] cma: Reserved 128 MiB at 0x000000002bc00000 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv0.2 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: Trusted OS migration not required [ 0.000000] percpu: Embedded 23 pages/cpu s56920 r8192 d29096 u94208 [ 0.000000] pcpu-alloc: s56920 r8192 d29096 u94208 alloc=23*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 225792 [ 0.000000] Policy zone: DMA [ 0.000000] Kernel command line: label=BATOCERA rootwait quiet loglevel=0 console=ttyAML0,115200n8 console=tty3 vt.global_cursor_default=0 video=Composite-1:d [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off [ 0.000000] Memory: 685712K/917504K available (14464K kernel code, 1666K rwdata, 5400K rodata, 2880K init, 587K bss, 100720K reserved, 131072K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] irq_meson_gpio: 110 to 8 gpio interrupt mux initialized [ 0.000000] random: get_random_bytes called from start_kernel+0x360/0x524 with crng_init=0 [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000003] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000192] Console: colour dummy device 80x25 [ 0.000220] printk: console [tty3] enabled [ 0.000280] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000) [ 0.000289] pid_max: default: 32768 minimum: 301 [ 0.000347] LSM: Security Framework initializing [ 0.000367] Yama: becoming mindful. [ 0.000437] AppArmor: AppArmor initialized [ 0.000468] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.000475] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.001769] rcu: Hierarchical SRCU implementation. [ 0.002790] EFI services will not be available. [ 0.003089] smp: Bringing up secondary CPUs ... [ 0.003517] Detected VIPT I-cache on CPU1 [ 0.003572] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.004109] Detected VIPT I-cache on CPU2 [ 0.004157] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.004670] Detected VIPT I-cache on CPU3 [ 0.004716] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [ 0.004783] smp: Brought up 1 node, 4 CPUs [ 0.004791] SMP: Total of 4 processors activated. [ 0.004796] CPU features: detected: 32-bit EL0 Support [ 0.004800] CPU features: detected: CRC32 instructions [ 0.004804] CPU features: detected: 32-bit EL1 Support [ 0.011719] CPU: All CPU(s) started at EL2 [ 0.011756] alternatives: patching kernel code [ 0.012661] devtmpfs: initialized [ 0.016754] Registered cp15_barrier emulation handler [ 0.016767] Registered setend emulation handler [ 0.016947] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.016974] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.019997] pinctrl core: initialized pinctrl subsystem [ 0.020764] DMI not present or invalid. [ 0.021230] NET: Registered protocol family 16 [ 0.022483] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations [ 0.022565] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.022644] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.022718] audit: initializing netlink subsys (disabled) [ 0.022916] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1 [ 0.024433] thermal_sys: Registered thermal governor 'fair_share' [ 0.024442] thermal_sys: Registered thermal governor 'bang_bang' [ 0.024446] thermal_sys: Registered thermal governor 'step_wise' [ 0.024449] thermal_sys: Registered thermal governor 'user_space' [ 0.024706] cpuidle: using governor menu [ 0.024929] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.025026] ASID allocator initialised with 65536 entries [ 0.025627] Serial: AMBA PL011 UART driver [ 0.062830] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages [ 0.062840] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages [ 0.062844] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages [ 0.062848] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages [ 0.064583] cryptd: max_cpu_qlen set to 1000 [ 0.132431] raid6: neonx8 gen() 2696 MB/s [ 0.200488] raid6: neonx8 xor() 2023 MB/s [ 0.268523] raid6: neonx4 gen() 2771 MB/s [ 0.336572] raid6: neonx4 xor() 2005 MB/s [ 0.404635] raid6: neonx2 gen() 2644 MB/s [ 0.472708] raid6: neonx2 xor() 1835 MB/s [ 0.540737] raid6: neonx1 gen() 2305 MB/s [ 0.608778] raid6: neonx1 xor() 1609 MB/s [ 0.676830] raid6: int64x8 gen() 1812 MB/s [ 0.744868] raid6: int64x8 xor() 958 MB/s [ 0.812909] raid6: int64x4 gen() 2033 MB/s [ 0.880979] raid6: int64x4 xor() 1061 MB/s [ 0.949005] raid6: int64x2 gen() 1764 MB/s [ 1.017047] raid6: int64x2 xor() 945 MB/s [ 1.085101] raid6: int64x1 gen() 1500 MB/s [ 1.153149] raid6: int64x1 xor() 751 MB/s [ 1.153153] raid6: using algorithm neonx4 gen() 2771 MB/s [ 1.153156] raid6: .... xor() 2005 MB/s, rmw enabled [ 1.153160] raid6: using neon recovery algorithm [ 1.153816] ACPI: Interpreter disabled. [ 1.155703] iommu: Default domain type: Translated [ 1.155883] vgaarb: loaded [ 1.157107] SCSI subsystem initialized [ 1.157429] usbcore: registered new interface driver usbfs [ 1.157502] usbcore: registered new interface driver hub [ 1.157558] usbcore: registered new device driver usb [ 1.158249] pps_core: LinuxPPS API ver. 1 registered [ 1.158259] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 1.158281] PTP clock support registered [ 1.158567] EDAC MC: Ver: 3.0.0 [ 1.160988] NetLabel: Initializing [ 1.161001] NetLabel: domain hash size = 128 [ 1.161004] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO [ 1.161050] NetLabel: unlabeled traffic allowed by default [ 1.161408] clocksource: Switched to clocksource arch_sys_counter [ 1.161703] VFS: Disk quotas dquot_6.6.0 [ 1.161759] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 1.162210] AppArmor: AppArmor Filesystem Enabled [ 1.162283] pnp: PnP ACPI: disabled [ 1.172030] NET: Registered protocol family 2 [ 1.172148] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 1.172814] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear) [ 1.172883] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 1.172954] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear) [ 1.173034] TCP: Hash tables configured (established 8192 bind 8192) [ 1.173197] MPTCP token hash table entries: 1024 (order: 2, 24576 bytes, linear) [ 1.173241] UDP hash table entries: 512 (order: 2, 16384 bytes, linear) [ 1.173264] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) [ 1.173428] NET: Registered protocol family 1 [ 1.173451] PCI: CLS 0 bytes, default 64 [ 1.173624] Trying to unpack rootfs image as initramfs... [ 1.177733] Freeing initrd memory: 1104K [ 1.178336] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available [ 1.178707] kvm [1]: IPA Size Limit: 40 bits [ 1.179497] kvm [1]: vgic interrupt IRQ9 [ 1.179592] kvm [1]: Hyp mode initialized successfully [ 1.184478] Initialise system trusted keyrings [ 1.184521] Key type blacklist registered [ 1.184673] workingset: timestamp_bits=44 max_order=18 bucket_order=0 [ 1.188523] zbud: loaded [ 1.189605] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 1.190149] fuse: init (API version 7.32) [ 1.191077] integrity: Platform Keyring initialized [ 1.218482] xor: measuring software checksum speed [ 1.221713] 8regs : 3072 MB/sec [ 1.224503] 32regs : 3529 MB/sec [ 1.227813] arm64_neon : 2981 MB/sec [ 1.227817] xor: using function: 32regs (3529 MB/sec) [ 1.227825] Key type asymmetric registered [ 1.227830] Asymmetric key parser 'x509' registered [ 1.227885] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 1.228003] io scheduler mq-deadline registered [ 1.228008] io scheduler kyber registered [ 1.228128] io scheduler bfq registered [ 1.237145] EINJ: ACPI disabled. [ 1.243499] soc soc0: Amlogic Meson GXL (S905X) Revision 21:c (84:2) Detected [ 1.245674] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled [ 1.249365] Serial: AMBA driver [ 1.249795] c11084c0.serial: ttyAML6 at MMIO 0xc11084c0 (irq = 20, base_baud = 1500000) is a meson_uart [ 1.249968] serial serial0: tty port ttyAML6 registered [ 1.250572] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 23, base_baud = 1500000) is a meson_uart [ 1.250678] printk: console [ttyAML0] enabled [ 1.405441] loop: module loaded [ 1.408522] libphy: Fixed MDIO Bus: probed [ 1.409638] tun: Universal TUN/TAP device driver, 1.6 [ 1.410614] thunder_xcv, ver 1.0 [ 1.410660] thunder_bgx, ver 1.0 [ 1.410698] nicpf, ver 1.0 [ 1.411381] e1000e: Intel(R) PRO/1000 Network Driver [ 1.411389] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 1.411476] igb: Intel(R) Gigabit Ethernet Network Driver [ 1.411481] igb: Copyright (c) 2007-2014 Intel Corporation. [ 1.411540] igbvf: Intel(R) Gigabit Virtual Function Network Driver [ 1.411545] igbvf: Copyright (c) 2009 - 2012 Intel Corporation. [ 1.411794] sky2: driver version 1.30 [ 1.413199] VFIO - User Level meta-driver version: 0.3 [ 1.415207] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.415242] ehci-pci: EHCI PCI platform driver [ 1.415296] ehci-platform: EHCI generic platform driver [ 1.415517] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.415544] ohci-pci: OHCI PCI platform driver [ 1.415610] ohci-platform: OHCI generic platform driver [ 1.416173] usbcore: registered new interface driver usb-storage [ 1.418033] mousedev: PS/2 mouse device common for all mice [ 1.418743] i2c /dev entries driver [ 1.421941] sdhci: Secure Digital Host Controller Interface driver [ 1.421950] sdhci: Copyright(c) Pierre Ossman [ 1.422300] Synopsys Designware Multimedia Card Interface Driver [ 1.423301] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.424655] meson-gx-mmc d0072000.mmc: Got CD GPIO [ 1.424672] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq [ 1.425755] ledtrig-cpu: registered to indicate activity on CPUs [ 1.426580] meson-sm: secure-monitor enabled [ 1.427564] gxl-crypto c883e000.crypto: will run requests pump with realtime priority [ 1.427666] gxl-crypto c883e000.crypto: will run requests pump with realtime priority [ 1.428200] hid: raw HID events driver (C) Jiri Kosina [ 1.428398] usbcore: registered new interface driver usbhid [ 1.428407] usbhid: USB HID core driver [ 1.428743] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered [ 1.430999] NET: Registered protocol family 10 [ 1.431867] Segment Routing with IPv6 [ 1.431916] NET: Registered protocol family 17 [ 1.432037] 8021q: 802.1Q VLAN Support v1.8 [ 1.432094] Key type dns_resolver registered [ 1.432485] registered taskstats version 1 [ 1.432502] Loading compiled-in X.509 certificates [ 1.434920] Loaded X.509 cert 'Build time autogenerated kernel key: c2f000439b97b3a899728cf8eb02dbe0c7685e3e' [ 1.435057] zswap: loaded using pool lzo/zbud [ 1.435353] Key type ._fscrypt registered [ 1.435358] Key type .fscrypt registered [ 1.435361] Key type fscrypt-provisioning registered [ 1.437029] Btrfs loaded, crc32c=crc32c-generic [ 1.438249] Key type encrypted registered [ 1.438266] AppArmor: AppArmor sha1 policy hashing enabled [ 1.454319] meson8b-dwmac c9410000.ethernet: IRQ eth_wake_irq not found [ 1.454330] meson8b-dwmac c9410000.ethernet: IRQ eth_lpi not found [ 1.454419] meson8b-dwmac c9410000.ethernet: PTP uses main clock [ 1.454428] meson8b-dwmac c9410000.ethernet: no reset control found [ 1.455263] meson8b-dwmac c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37 [ 1.455277] meson8b-dwmac c9410000.ethernet: DWMAC1000 [ 1.455283] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported [ 1.455287] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported [ 1.455291] meson8b-dwmac c9410000.ethernet: COE Type 2 [ 1.455295] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported [ 1.455299] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported [ 1.455374] meson8b-dwmac c9410000.ethernet: Normal descriptors [ 1.455379] meson8b-dwmac c9410000.ethernet: Ring mode enabled [ 1.455383] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 1.455803] libphy: stmmac: probed [ 1.459043] dwc3-meson-g12a d0078080.usb: USB2 ports: 2 [ 1.459052] dwc3-meson-g12a d0078080.usb: USB3 ports: 0 [ 1.489659] mmc0: new high speed SDXC card at address aaaa [ 1.490479] mmcblk0: mmc0:aaaa SN64G 59.5 GiB [ 1.492299] mmcblk0: p1 p2 [ 1.528291] mmc1: new HS200 MMC card at address 0001 [ 1.529077] mmcblk1: mmc1:0001 8GME4R 7.28 GiB [ 1.529592] mmcblk1boot0: mmc1:0001 8GME4R partition 1 4.00 MiB [ 1.530043] mmcblk1boot1: mmc1:0001 8GME4R partition 2 4.00 MiB [ 1.530212] mmcblk1rpmb: mmc1:0001 8GME4R partition 3 512 KiB, chardev (242:0) [ 1.982216] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator [ 1.982381] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator [ 1.982586] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM [ 1.984057] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 1.984101] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1 [ 1.984238] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f664 hci version 0x100 quirks 0x0000000002010010 [ 1.984284] xhci-hcd xhci-hcd.0.auto: irq 50, io mem 0xc9000000 [ 1.984614] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10 [ 1.984619] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.984624] usb usb1: Product: xHCI Host Controller [ 1.984627] usb usb1: Manufacturer: Linux 5.10.90 xhci-hcd [ 1.984631] usb usb1: SerialNumber: xhci-hcd.0.auto [ 1.985061] hub 1-0:1.0: USB hub found [ 1.985096] hub 1-0:1.0: 2 ports detected [ 1.985457] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 1.985485] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2 [ 1.985500] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed [ 1.985570] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 1.985660] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10 [ 1.985667] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.985671] usb usb2: Product: xHCI Host Controller [ 1.985675] usb usb2: Manufacturer: Linux 5.10.90 xhci-hcd [ 1.985679] usb usb2: SerialNumber: xhci-hcd.0.auto [ 1.986121] hub 2-0:1.0: USB hub found [ 1.986157] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19) [ 1.988988] meson-gx-mmc d0070000.mmc: allocated mmc-pwrseq [ 1.990123] scpi_protocol scpi: SCP Protocol legacy pre-1.0 firmware [ 1.994940] libphy: mdio_mux: probed [ 1.995942] libphy: mdio_mux: probed [ 2.015015] Freeing unused kernel memory: 2880K [ 2.035067] mmc2: new high speed SDIO card at address 0001 [ 2.049452] Run /init as init process [ 2.049463] with arguments: [ 2.049466] /init [ 2.049469] with environment: [ 2.049473] HOME=/ [ 2.049475] TERM=linux [ 2.049478] label=BATOCERA [ 2.119577] /dev/loop0: Can't open blockdev [ 2.127078] random: fast init done [ 2.798018] overlayfs: "xino" feature enabled using 2 upper inode bits. [ 3.066945] random: dbus-uuidgen: uninitialized urandom read (12 bytes read) [ 3.067000] random: dbus-uuidgen: uninitialized urandom read (8 bytes read) [ 3.113234] random: dbus-daemon: uninitialized urandom read (12 bytes read) [ 3.501029] udevd[1532]: starting version 3.2.11 [ 3.559015] udevd[1533]: starting eudev-3.2.11 [ 3.878378] meson-vrtc c81000a8.rtc: registered as rtc0 [ 3.878421] meson-vrtc c81000a8.rtc: setting system clock to 1970-01-01T00:00:03 UTC (3) [ 3.890190] Registered IR keymap rc-empty [ 3.890303] rc rc0: meson-ir as /devices/platform/soc/c8100000.bus/c8100580.ir/rc/rc0 [ 3.890486] rc rc0: lirc_dev: driver meson-ir registered at minor = 0, raw IR receiver, no transmitter [ 3.890637] input: meson-ir as /devices/platform/soc/c8100000.bus/c8100580.ir/rc/rc0/input0 [ 3.890958] meson-ir c8100580.ir: receiver initialized [ 3.915763] mc: Linux media interface: v0.10 [ 3.958352] Registered IR keymap rc-cec [ 3.958501] rc rc1: meson_ao_cec as /devices/platform/soc/c8100000.bus/c8100100.cec/rc/rc1 [ 3.958614] input: meson_ao_cec as /devices/platform/soc/c8100000.bus/c8100100.cec/rc/rc1/input1 [ 3.979967] meson-drm d0100000.vpu: Queued 3 outputs on vpu [ 4.001903] videodev: Linux video capture interface: v2.00 [ 4.012876] lima d00c0000.gpu: gp - mali450 version major 0 minor 0 [ 4.012933] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0 [ 4.012977] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0 [ 4.013021] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0 [ 4.013053] lima d00c0000.gpu: l2 cache 8K, 4-way, 64byte cache line, 128bit external bus [ 4.013062] lima d00c0000.gpu: l2 cache 64K, 4-way, 64byte cache line, 128bit external bus [ 4.013870] lima d00c0000.gpu: bus rate = 166666667 [ 4.013883] lima d00c0000.gpu: mod rate = 24000000 [ 4.013974] lima d00c0000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [ 4.015351] [drm] forcing Composite-1 connector off [ 4.054024] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy) [ 4.055777] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver [ 4.056407] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi]) [ 4.057380] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 1 [ 4.139285] meson_vdec: module is from the staging directory, the quality is unknown, you have been warned. [ 4.147067] [drm] Initialized lima 1.1.0 20191231 for d00c0000.gpu on minor 0 [ 4.182877] Bluetooth: Core ver 2.22 [ 4.184697] NET: Registered protocol family 31 [ 4.184710] Bluetooth: HCI device and connection manager initialized [ 4.184726] Bluetooth: HCI socket layer initialized [ 4.184733] Bluetooth: L2CAP socket layer initialized [ 4.185857] Bluetooth: SCO socket layer initialized [ 4.281045] Bluetooth: HCI UART driver ver 2.3 [ 4.281052] Bluetooth: HCI UART protocol H4 registered [ 4.281055] Bluetooth: HCI UART protocol BCSP registered [ 4.281154] Bluetooth: HCI UART protocol LL registered [ 4.281156] Bluetooth: HCI UART protocol ATH3K registered [ 4.281186] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 4.281378] Bluetooth: HCI UART protocol Intel registered [ 4.282600] Bluetooth: HCI UART protocol Broadcom registered [ 4.282638] Bluetooth: HCI UART protocol QCA registered [ 4.282641] Bluetooth: HCI UART protocol AG6XX registered [ 4.282667] Bluetooth: HCI UART protocol Marvell registered [ 4.282729] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator [ 4.282908] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator [ 4.358291] Console: switching to colour frame buffer device 240x75 [ 4.395370] meson-drm d0100000.vpu: [drm] fb0: mesondrmfb frame buffer device [ 4.441748] debugfs: Directory 'c1105400.audio-controller' with parent 'GXL-S905X-P212' already present! [ 6.525423] Bluetooth: hci0: command 0xfc18 tx timeout [ 8.253436] random: crng init done [ 8.253449] random: 7 urandom warning(s) missed due to ratelimiting [ 8.459419] hdmi-audio-codec hdmi-audio-codec.4.auto: Not able to map channels to speakers (-22) [ 8.459431] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_hw_params on i2s-hifi: -22 [ 8.459438] gx-sound-card sound: ASoC: PRE_PMU: be.dai-link-2-playback event failed: -22 [ 8.908502] meson8b-dwmac c9410000.ethernet eth0: PHY [0.e40908ff:08] driver [Meson GXL Internal PHY] (irq=51) [ 8.920858] meson8b-dwmac c9410000.ethernet eth0: No Safety Features support found [ 8.920878] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW [ 8.922590] meson8b-dwmac c9410000.ethernet eth0: configuring for phy/rmii link mode [ 9.814282] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 9.953785] squashfs: Unknown parameter 'iocharset' [ 9.953832] fuseblk: Unknown parameter 'iocharset' [ 10.611609] meson8b-dwmac c9410000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 10.611652] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 13.065788] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 13.065801] Bluetooth: BNEP filters: protocol multicast [ 13.065821] Bluetooth: BNEP socket layer initialized [ 14.557436] Bluetooth: hci0: BCM: failed to write update baudrate (-110) [ 14.557447] Bluetooth: hci0: Failed to set baudrate [ 16.573471] Bluetooth: hci0: command 0x0c03 tx timeout [ 24.797432] Bluetooth: hci0: BCM: Reset failed (-110)

` The AV port isn't fully tested because I don't have a Cable or TV for such LOL.

Not sure what's needed to get the full system running, but it would super cool to run Batocera or other custom OS on this device, the system is build like a tank, very solid. Might be a bit weak for other emulation, but it would great for NeoGeo and other Arcade games.

Thank you so much for this awesome distro.

acmeplus commented 2 years ago

Boot logs from:

Also U-boot environment variables:

Environment size: 5408/65532 bytes
gxl_p212_v1# printenv
EnableSelinux=enforcing
aml_dt=gxl_p212_1g
baudrate=115200
bootargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 androidboot.selinux=enforcing logo=osd1,loaded,0x3d800000,576cvbs maxcpus=4 vout=576cvbs,enable hdmimode=1080p60hz cvbsmode=576cvbs hdmitx= cvbsdrv=0 androidboot.firstboot=0 jtag=apao androidboot.hardware=amlogic mac=00:1A:79:A3:12:37 androidboot.mac=00:1A:79:A3:12:37
bootcmd=if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run libreelec; fi; run storeboot
bootdelay=1
bootfromnand=0
bootup_offset=0x10ddaf0
bootup_size=0x3f4848
cmdline_keys=if keyman init 0x1234; then if keyman read usid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;if keyman read mac ${loadaddr} str; then setenv bootargs ${bootargs} mac=${mac} androidboot.mac=${mac};fi;if keyman read deviceid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.deviceid=${deviceid};fi;fi;
cvbs_drv=0
cvbsmode=576cvbs
display_bpp=16
display_color_bg=0
display_color_fg=0xffff
display_color_index=16
display_height=576
display_layer=osd1
display_width=720
dtb_mem_addr=0x1000000
ethact=dwmac.c9410000
ethaddr=00:15:18:01:81:31
factory_reset_poweroff_protect=echo wipe_data=${wipe_data}; echo wipe_cache=${wipe_cache};if test ${wipe_data} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; if test ${wipe_cache} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; 
fb_addr=0x3d800000
fb_height=1080
fb_width=1920
fdt_high=0x20000000
firstboot=0
gatewayip=10.18.9.1
hdmimode=1080p60hz
hostname=arm_gxbb
init_display=osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale
initargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 
ipaddr=10.18.9.97
jtag=apao
libreelec=run librefromsd; run librefromusb
librefromsd=mmcinfo; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi
librefromusb=usb start 0; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi
loadaddr=1080000
mac=00:1A:79:A3:12:37
maxcpus=4
netmask=255.255.255.0
outputmode=576cvbs
preboot=run factory_reset_poweroff_protect;run upgrade_check;run init_display;run storeargs;run upgrade_key;run switch_bootmode;
reboot_mode=cold_boot
recovery_from_flash=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if imgread kernel ${recovery_part} ${loadaddr} ${recovery_offset}; then wipeisb; bootm ${loadaddr}; fi
recovery_from_sdcard=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload mmc 0 ${loadaddr} recovery.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_from_udisk=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_offset=0
recovery_part=recovery
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
sddtb=if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi
serverip=10.18.9.113
stderr=serial
stdin=serial
stdout=serial
storeargs=setenv bootargs ${initargs} androidboot.selinux=${EnableSelinux} logo=${display_layer},loaded,${fb_addr},${outputmode} maxcpus=${maxcpus} vout=${outputmode},enable hdmimode=${hdmimode} cvbsmode=${cvbsmode} hdmitx=${cecconfig} cvbsdrv=${cvbs_drv} androidboot.firstboot=${firstboot} jtag=${jtag}; setenv bootargs ${bootargs} androidboot.hardware=amlogic;run cmdline_keys;
storeboot=if imgread kernel boot ${loadaddr}; then bootm ${loadaddr}; fi;run update;
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;else if test ${reboot_mode} = cold_boot; then fi;fi;fi;
try_auto_burn=update 700 750;
update=run usb_burning; run sdc_burning; if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;
upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else fi;
upgrade_key=if gpio input GPIOAO_2; then echo detect upgrade key; sleep 3;if gpio input GPIOAO_2; then run update; fi;fi;
upgrade_step=2
usb_burning=update 1000
usbdtb=if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi
wipe_cache=successful
wipe_data=successful
iokzero commented 2 years ago

@acmeplus

May I ask what you use to extra this info from the OG firmware? And also, is it possible to extract the original boot splash screen for future theming options? Do you need to edit the device tree to connect to UART (Something I attempted to do next, but have no clue where to begin)?

Sorry if these are stupid questions, and let me know if this is not the right place to ask such. Any pointers to reading material would be really appreciated, and thank you so very much.

acmeplus commented 2 years ago

@acmeplus

May I ask what you use to extra this info from the OG firmware? And also, is it possible to extract the original boot splash screen for future theming options? Do you need to edit the device tree to connect to UART (Something I attempted to do next, but have no clue where to begin)?

The system has a very well marked UART terminal, look for the GND/TX/RX/VCC terminal besides the USB port. You just need a standard FT232/FTDI USB adapter (less than $10) to connect those terminals to your computer. There are lots of material online about how to use an UART (just remember to never connect the VCC terminal, only the other three).

There's not much more information you are going to find that way though, if you have already extracted the EMMC dump, you already have all the internal information available and just need to figure out how to extract it. The partition table is the log I already posted. In particular, for Amlogic the boot splash is the logo partition.

In any case the goal of this project is to get batocera to work, not to reverse engineer the device. Right now the only focus is to get that JAMMA interface to work, everything else seems to work as a nominal S905X device.

iokzero commented 2 years ago

@acmeplus

Understand, and thank you so much for these info. I was a little surprised that the PCB came with a UART port ready to go. I was thinking to see if there is UART (or SPI) communication between the S905X and the umidokey, or see if there is a way I can talk to it within Armbian. maybe using something like the GPIO controller for S905X or something.

But really, I have no idea what I am doing LOL. I really appreciate the help from you all.

acmeplus commented 2 years ago

Some updates with LibreELEC and kernel 3.X series:

I'm planning to enable some graphical applications (maybe retroarch) to test how the current controls respond.

acmeplus commented 2 years ago

Update:

Here's the latest evtest log:

evtest 
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:  gpio_keypad
/dev/input/event1:  cec_input
/dev/input/event2:  fun_r1_gamepad
Select the device event number [0-2]: 2
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1 product 0x1 version 0x1
Input device name: "fun_r1_gamepad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 1 (KEY_ESC)
    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 379 (KEY_VCR)
    Event code 380 (KEY_VCR2)
    Event code 383 (KEY_CD)
    Event code 384 (KEY_TAPE)
    Event code 385 (KEY_RADIO)
    Event code 386 (KEY_TUNER)
    Event code 387 (KEY_PLAYER)
    Event code 388 (KEY_TEXT)
    Event code 389 (KEY_DVD)
    Event code 390 (KEY_AUX)
    Event code 393 (KEY_VIDEO)
    Event code 544 (BTN_DPAD_UP)
    Event code 545 (BTN_DPAD_DOWN)
    Event code 546 (BTN_DPAD_LEFT)
    Event code 547 (BTN_DPAD_RIGHT)
Properties:
Testing ... (interrupt to exit)
Event: time 1656680661.464781, type 1 (EV_KEY), code 305 (BTN_EAST), value 1
Event: time 1656680661.464781, -------------- SYN_REPORT ------------
Event: time 1656680661.470656, type 1 (EV_KEY), code 311 (BTN_TR), value 1
Event: time 1656680661.470656, -------------- SYN_REPORT ------------
Event: time 1656680661.483394, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1
Event: time 1656680661.483394, -------------- SYN_REPORT ------------
Event: time 1656680663.004759, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0
Event: time 1656680663.004759, -------------- SYN_REPORT ------------
Event: time 1656680663.014014, type 1 (EV_KEY), code 311 (BTN_TR), value 0
Event: time 1656680663.014014, -------------- SYN_REPORT ------------
Event: time 1656680663.016470, type 1 (EV_KEY), code 305 (BTN_EAST), value 0
Event: time 1656680663.016470, -------------- SYN_REPORT ------------
Event: time 1656680668.022634, type 1 (EV_KEY), code 307 (BTN_NORTH), value 1
Event: time 1656680668.022634, -------------- SYN_REPORT ------------
Event: time 1656680668.030204, type 1 (EV_KEY), code 308 (BTN_WEST), value 1
Event: time 1656680668.030204, -------------- SYN_REPORT ------------
Event: time 1656680668.823568, type 1 (EV_KEY), code 308 (BTN_WEST), value 0
Event: time 1656680668.823568, type 1 (EV_KEY), code 307 (BTN_NORTH), value 0
Event: time 1656680668.823568, -------------- SYN_REPORT ------------
Event: time 1656680670.930022, type 1 (EV_KEY), code 307 (BTN_NORTH), value 1
Event: time 1656680670.930022, -------------- SYN_REPORT ------------
Event: time 1656680670.949499, type 1 (EV_KEY), code 310 (BTN_TL), value 1
Event: time 1656680670.949499, -------------- SYN_REPORT ------------
Event: time 1656680671.681584, type 1 (EV_KEY), code 310 (BTN_TL), value 0
Event: time 1656680671.681584, -------------- SYN_REPORT ------------
Event: time 1656680672.264025, type 1 (EV_KEY), code 307 (BTN_NORTH), value 0
Event: time 1656680672.264025, -------------- SYN_REPORT ------------
acmeplus commented 2 years ago

Controls are now working on batocera too. Will create a patch next week.

iokzero commented 2 years ago

Controls are now working on batocera too. Will create a patch next week.

Wow, what a wonderful news, thank you so much for working on this!

Just one question, are those keys mapped to the keyboard, or is it more like a stand alone device.

If it is mapped to the keyboard, are there any keys that are mapped to the ctl, alt, shift, etc.? The reason is that in the past, I have encountered joysticks that are mapped to the keyboard with those keys, and without knowing it. sometime when they are passed along with some keys that mapped to a letter like C or X. Something weird will happen on certain emulators like flycast for example. and such combinations kill the process and freeze everything when used with an emulation station. I need to make an overlay to have it map to other keys. 

And if it is mapped to a stand alone device, would it have problem with configuring it to two players? 

Once again thank you so so much!

acmeplus commented 2 years ago

Just one question, are those keys mapped to the keyboard, or is it more like a stand alone device.

It's a dedicated driver independent from the keyboard one. I've not tested 2P mode, etc. but all keys are working, etc.

Attached is a test overlay and a dtb for you and @neocvera (or anyone with an R1 reading this) to give it a try and report findings here. Download and extract the two files:

neocvera commented 2 years ago

Confirmed working. Batocera detects the device and all buttons/ directions detected during game pad setup. Didn’t have time to actually set the controls but will report more later.

dmanlfc commented 2 years ago

Awesome work @acmeplus

neocvera commented 2 years ago

Successfully mapped player 1 controls but can’t seem to figure out how to map player 2 since it’s all one controller.

iokzero commented 2 years ago

Tested everything with the lasted beta, everything is working, except for the AV ports (at least no sound, and do understand that it is not an audio jack that will take the sound from HDMI when headphone is plugged in.)

Multi-pass has not tested, not sure what games would be a good one for testing such thing. Any suggestions?

Player 2 mapping is still an issues. evsieve (a low-level mapping editor) was suggested by @Atari in the help-and-support Discord. Not sure how it actually work just yet, as the wiki has like no instruction, but maybe something to look into.

or maybe if possible twist the driver to make it show up as two device? just maybe, not sure what's the best way to handle this relatively special situation.

acmeplus commented 2 years ago

Player 2 mapping is still an issues

No need for evsieve. I’ve modified the driver to create separate devices. Will post a test version later today.

iokzero commented 2 years ago

Player 2 mapping is still an issues

No need for evsieve. I’ve modified the driver to create separate devices. Will post a test version later today.

This would be super awesome! Can you share the code for both driver? Would like to take this opportunity to learn a little bit of how this works. Thank you so so much.

I did manage to do some test on multi passes in games. I can tell for sure that at least two buttons combo works. But need to find a games that use as many as possible to test for sure.

iokzero commented 2 years ago

Confirm that you can pass at least 7 buttons all at once.

Oh~ forget to mention that, I use Soul Edge on PSX for the testing, It has a visual gamepad mapping option in its setting, it lets you see which button is being pass. (Just for your references.)

acmeplus commented 2 years ago

This would be super awesome! Can you share the code for both driver? Would like to take this opportunity to learn a little bit of how this works. Thank you so so much.

Yes, the source code will be in the batocera repo when I finish testing and do the formal PR.

acmeplus commented 2 years ago

Here's the updated driver with the 2P as a separate device. To install:

Additional this version has a new feature so you can enable converting BACK KEY into the 2P COIN/SELECT KEY

neocvera commented 2 years ago

Here's the updated driver with the 2P as a separate device. To install:

  • Unzip the file fun_r1_gamepad.zip
  • Copy the file to /usr/bin/fun_r1_gamepad (it will overwrite the existing one, but if it's currently running you will have to kill the previous process)
  • Run batocera-save-overlay
  • Restart, and remap controls

Additional this version has a new feature so you can enable converting BACK KEY into the 2P COIN/SELECT KEY

  • To do so, edit the /etc/init.d/S31funr1gamepad script and change line 5:
            /usr/bin/fun_r1_gamepad &

to

            /usr/bin/fun_r1_gamepad 2 &
  • Then run batocera-save-overlay, restart, and remap

Player 2 'back' button exits game when engaged as COIN, wether 'hotkey' is mapped or not. Seems to be hardcoded as 'esc' or something.

iokzero commented 2 years ago

Here's the updated driver with the 2P as a separate device. To install:

  • Unzip the file fun_r1_gamepad.zip
  • Copy the file to /usr/bin/fun_r1_gamepad (it will overwrite the existing one, but if it's currently running you will have to kill the previous process)
  • Run batocera-save-overlay
  • Restart, and remap controls

Additional this version has a new feature so you can enable converting BACK KEY into the 2P COIN/SELECT KEY

  • To do so, edit the /etc/init.d/S31funr1gamepad script and change line 5:
            /usr/bin/fun_r1_gamepad &

to

            /usr/bin/fun_r1_gamepad 2 &
  • Then run batocera-save-overlay, restart, and remap

Player 2 'back' button exits game when engaged as COIN, wether 'hotkey' is mapped or not. Seems to be hardcoded as 'esc' or something.

I can confirm that when, the back button is pass, it would "esc" the game without the button even mapped to anythiing.

acmeplus commented 2 years ago

Player 2 'back' button exits game when engaged as COIN, wether 'hotkey' is mapped or not. Seems to be hardcoded as 'esc' or something.

Yes, I made the mistake of using KEY_ESC as the BACK button instead of BTN_BACK.

Here's the updated driver: fun_r1_gamepad.zip

iokzero commented 2 years ago

Found no issues with the new controller driver so far. 2 players games seems working fine, mapping have no problem. At least 14 buttons can be passed all at once.

The only thing that's not working on the Fun R1 hardware under Batocera is the AV port, which may come handy when connecting to monitor with no speakers, the AV port can be use to connect to external speaker.

Thank you everyone so much for working on this.

neocvera commented 2 years ago

So some cool developments that came out of this:

nicely done!

acmeplus commented 2 years ago

@neocvera @iokzero the latest beta build can be found here.

Please test that version and let us know if it's working fine.

Thanks!

neocvera commented 2 years ago

@neocvera @iokzero the latest beta build can be found here.

Please test that version and let us know if it's working fine.

Thanks!

Thanks again! I grabbed the image from the link and all seems well! I even tested wifi and that is also working well (downloaded/ installed a new theme)

sticks and buttons are all responsive.

neocvera commented 2 years ago

When this finally makes it to the official download page, here are a few images that might be useful. 8 10

iokzero commented 2 years ago

Checked as much as I can. Wifi works, Controller works, except for some reason the "back" button seems to mapped to controller 1. and I can't use it as select or anything for controller 2.

AV port is the only thing that is not working hardware wise. still no sound come out of it at least. got nothing to test the video for that one yet. But if someone tells me that should work, then I can get a cable for it to test on my TV which have the class Yellow, Red, and White.

Thank you so much for work, this is true amazing, I think it is getting very close.

acmeplus commented 2 years ago

Checked as much as I can. Wifi works, Controller works, except for some reason the "back" button seems to mapped to controller 1. and I can't use it as select or anything for controller 2.

There's a configuration option that has not been really tested that allows you to map BACK as 2P COIN/SELECT:

After restart you should notice that BACK key is no longer responding for P1 and needs to be remapped. Just remap both controllers and it should work. Please let us know if it's working.

neocvera commented 2 years ago

Only reason to have coin mapped to player 2 is for 3+ player gaming. Otherwise, default setup is great.

iokzero commented 2 years ago

Only reason to have coin mapped to player 2 is for 3+ player gaming. Otherwise, default setup is great.

Totally agree. Though it did give more options for some non-arcade games to run with full control. The optional settings is a wonderful feature!

nadenislamarre commented 2 years ago

feedback on the beta version ? to add it on the download page.

acmeplus commented 2 years ago

feedback on the beta version ? to add it on the download page.

The tests were ok, so version is ready but I believe we should write a wiki page like the CHA to show how to open the console to get it into recovery. Unfortunately, unlike other amlogic boards the recovery button is not hidden in the av port so it needs to be open.

iokzero commented 2 years ago

Yes, a Wiki would be a MUST. Or at least a packed read me. Telling how to access recovery mode, setup controller option. And stated any known issues., Like the AV port not yet working, or the SD card slot can be a little jammed (at least mine is), etc. A Wiki would be extremely helpful.

As far as other feedback, I would say, keep the controller setup option open. Option 1: see the whole control panel (both players) as one big controller. Option 2: see the control panel as two controllers with the BACK Button mapped to player 1. And Option 3: see the whole control panel as two controller, but mapped the BACK Button as coin/select for player 2.

Not sure if this is something already exists, but if there's any preset that optimized for the Amlogic S905x, that would be great. Like disabling some fancy looking features that makes things run smoothly and snappier by default Out of the Box.

neocvera commented 2 years ago

Remove 10x screws from base plate. E5E131AC-6BB7-4FB3-9BCF-2C97D6D0A64F Remove 4x screws from board plate cover. IMG_1051 Remove 4x hex mounting screws (5mm) securing board in place. IMG_1053 Reset button IMG_1052

*images provided by @fakemaria

ftirador commented 2 years ago

feedback on the beta version ? to add it on the download page.

Didn’t found any major blockers after my test. All of them run sdcard and using wifi to download assets.

neocvera commented 2 years ago

What’s needed to get this out in the official downloads section?

nadenislamarre commented 2 years ago

it is available on the batocera download page.

iokzero commented 2 years ago

Upon release, I do have couple questions:

Do you mind if the controller drivers are being port to other "elec" base OS like Libreelec, Coreelec, Lakka? so the device would get more support?

Should we open a separate issue on the AV port being not working? If there are some fundamental reasons that it would NOT work, then there is no reason to open another issue. We will just have to document it on the wiki, if there's one.

Thank you so much for the great work! 

acmeplus commented 2 years ago

Do you mind if the controller drivers are being port to other "elec" base OS like Libreelec, Coreelec, Lakka? so the device would get more support?

The driver code I wrote is GPL-2.0+, so no issues reusing it for other open source distributions.

Should we open a separate issue on the AV port being not working? If there are some fundamental reasons that it would NOT work, then there is no reason to open another issue. We will just have to document it on the wiki, if there's one.

I suggest you open a new ticket to track that down so we can close this one.

iokzero commented 2 years ago

Do you mind if the controller drivers are being port to other "elec" base OS like Libreelec, Coreelec, Lakka? so the device would get more support?

The driver code I wrote is GPL-2.0+, so no issues reusing it for other open source distributions.

Should we open a separate issue on the AV port being not working? If there are some fundamental reasons that it would NOT work, then there is no reason to open another issue. We will just have to document it on the wiki, if there's one.

I suggest you open a new ticket to track that down so we can close this one.

Sounds good, will do. Thanks

iokzero commented 1 year ago

Tested with the latest dev v36.everything seems working fine, anything that we should be testing to push the system out of beta? I mean the only thing that seems to be different from a typical x950 is just the controller and the AV port, everything things else seems working the same.

simplecatchy commented 1 year ago

@iokzero That would be awesome! I just got a fun r1 and installed the beta that is up on the batocera site but was unable to update to the latest version. I would love to update to the latest version. On the beta, most things worked great. The only issues I encountered were that the display is bigger then the tv size for me. I tried different video settings but they all resulted in the display still being cut a little. It's like the display is being over scanned. Is there a way to adjust the size of the tv? The other thing i encountered is that the controls for CDTV didn't work. I couldn't figure out how to remap them to work. The controls worked great for all other emulators.And lastly it did lock up on me when I changed the theme. I ssh into it and changed the theme back to the default one.

iokzero commented 1 year ago

@simplecatchy You will need to install the website version first, then switch from stable to beta on the update option in ES. then check updates. and start updates.

simplecatchy commented 1 year ago

@iokzero Thanks for the info. I went ahead and updated to version 36. This fixed my video problem. Now I can see the full screen. But it introduced two new problems. Most of the time when I power up now, I get no sound. I need to keep powering off and on until it finally powers up and sound is working. The other issue is that amiga cd 32 no longer works. I get a black screen when i launch it. I can still hear the sound though.

iokzero commented 1 year ago

@simplecatchy unfortunately, that's not something I can help fix. I would submit a bug for both of the problem. but for your original problem. you might just got mis-configure some where, that it is outputing 1080p or something larger than your screen, but your TV/monitor setting allows it to come in without scaling. I know mine does that.

iokzero commented 1 year ago

@acmeplus Is there a way I can back up the original stock firmware from the mechine using Batoceria? I am trying to do experiement with the sytem, but worry that I might mess something up.

acmeplus commented 1 year ago

@acmeplus Is there a way I can back up the original stock firmware from the mechine using Batoceria? I am trying to do experiement with the sytem, but worry that I might mess something up.

There's no need, batocera runs entirely off the sdcard, if you reset the device it will go back to stock. Any changes you do in batocera won't impact the internal firmware.

iokzero commented 1 year ago

@iokzero That would be awesome! I just got a fun r1 and installed the beta that is up on the batocera site but was unable to update to the latest version. I would love to update to the latest version. On the beta, most things worked great. The only issues I encountered were that the display is bigger then the tv size for me. I tried different video settings but they all resulted in the display still being cut a little. It's like the display is being over scanned. Is there a way to adjust the size of the tv? The other thing i encountered is that the controls for CDTV didn't work. I couldn't figure out how to remap them to work. The controls worked great for all other emulators.And lastly it did lock up on me when I changed the theme. I ssh into it and changed the theme back to the default one.

I finally got a chance to trying other themes with v36, and there's a constant lock up for some reason. It will still free up after a long wise, like few minutes or longer. Not sure what exactly happened. Once I find out more. I would file a bug report.

simplecatchy commented 1 year ago

@iokzero I think the theme lockup may be related to playing videos. For instance, I added videos to one the systems on the default theme. Scrolling back and forth between the games would make the system lock up. It did play the video clip of the game but once you switched games and it tries to play the next video clip it locks up. It would be awesome if we could fix this. Would love to have it play the normalized video when a game is selected.

iokzero commented 1 year ago

@iokzero I think the theme lockup may be related to playing videos. For instance, I added videos to one the systems on the default theme. Scrolling back and forth between the games would make the system lock up. It did play the video clip of the game but once you switched games and it tries to play the next video clip it locks up. It would be awesome if we could fix this. Would love to have it play the normalized video when a game is selected.

I agree with that assessment. Everything works fine on v35, so I don't know what has changed. But hopefully it can be fix.