JohnIrvine1433 / ThemeMaster

EmulationStation theme manager for small screen devices running ArkOS, TheRA, RetroOZ, JELOS, UnofficialOS or ROCKNIX
GNU General Public License v3.0
91 stars 11 forks source link

begin adding support for RG552 #10

Closed maf12 closed 2 years ago

maf12 commented 2 years ago

This starts to add support for the Anbernic RG552.

JohnIrvine1433 commented 2 years ago

Hi @maf12, I wanted to pull your modifications but I would like to provide my own binary. Could you also provide the modifications for controls in the ThemeMaster-joystick repository ?

maf12 commented 2 years ago

hey @JohnIrvine1433 I'm actually still working on this. I only made a PR to get some input because I can't get the controls working. I originally tried using controls from oga_controls, but wasn't aware that there was actually a ThemeMaster-Joystick repo! unfortunately, I tried this one too but it's still not working. I'm not sure what I'm missing, I've just pushed a PR for it here

JohnIrvine1433 commented 2 years ago

Ok, I do not have a RG552 but I'll assume keycodes are similar to others anbernic devices, I'll recompile controls with the additional input file for the rg552 and let you know when it's done so you can give it a try.

JohnIrvine1433 commented 2 years ago

@maf12 I've pushed your modifications into ThemeMaster repository, however the controls file is still the old one. Can you try the one enclosed here and let me know if it works as expected on your rg552 ? controls.zip

maf12 commented 2 years ago

@JohnIrvine1433 I tried these controls but they don't work. With your file, I get the "controls can't be loaded" error. if I use the controls from my PR I get no errors, but controls don't actually work, so I'm really not sure what I'm missing :(.

maf12 commented 2 years ago

if it helps, oga_controls has been updated to support the 552, which is where I got all the values from: https://github.com/christianhaitian/oga_controls/blob/universal/main.c

maf12 commented 2 years ago

I need to work on this some more. I'm getting the controls error in my PR too so I must have done something that set it up correctly during my testing, but isn't actually working on first load. I'll push my changes here.

JohnIrvine1433 commented 2 years ago

if it helps, oga_controls has been updated to support the 552, which is where I got all the values from: https://github.com/christianhaitian/oga_controls/blob/universal/main.c

Are you sure ? There is nothing specific to the RG552 and the input file you refer to on your pull request!

Edit: however if you can confirm the rg552 joypad event values and key codes we should be able to make it work :)

JohnIrvine1433 commented 2 years ago

@maf12 Well I've put the modifications in the enclosed zip file : ThemeMaster script has been modified to test for the /dev/input/by-path/platform-singleadc-joypad-event-joystick input file and the controls binary has been modified to manage this new input file based on the same event values and key codes as for any other anbernic device (which is an assumption I cannot confirm). Hope you can get something out of it ! rg552.zip

maf12 commented 2 years ago

Thanks, I'll take a look. I'm still making changes to my PR as I missed a few things it seems, but I haven't had a lot of time lately. I'll keep you posted!

maf12 commented 2 years ago

@JohnIrvine1433 I've updated my branch with some of the changes you made to the main branch, and I've cleaned up a few of the things I started with. I've removed the controls file from this now.

Unfortunately none of these control files work - not mine or the 2 that you previously sent me. I'm not sure why this is, but with the changes in this PR, I think this is the only outstanding issue. I'll keep working on it though

JohnIrvine1433 commented 2 years ago

Can you confirm the input file is correct? Is evtest working fine with it?

maf12 commented 2 years ago

looks good to me:

~ # evtest --grab /dev/input/by-path/platform-singleadc-joypad-event-joystick
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x484b product 0x1101 version 0x100
Input device name: "retrogame_joypad"
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 312 (BTN_TL2)
    Event code 313 (BTN_TR2)
    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 code 544 (BTN_DPAD_UP)
    Event code 545 (BTN_DPAD_DOWN)
    Event code 546 (BTN_DPAD_LEFT)
    Event code 547 (BTN_DPAD_RIGHT)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min    -1800
      Max     1800
      Fuzz      32
      Flat      32
    Event code 1 (ABS_Y)
      Value      0
      Min    -1800
      Max     1800
      Fuzz      32
      Flat      32
    Event code 3 (ABS_RX)
      Value      0
      Min    -1800
      Max     1800
      Fuzz      32
      Flat      32
    Event code 4 (ABS_RY)
      Value      0
      Min    -1800
      Max     1800
      Fuzz      32
      Flat      32
  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)
Event: time 1648239040.362020, type 1 (EV_KEY), code 544 (BTN_DPAD_UP), value 1
Event: time 1648239040.362020, -------------- SYN_REPORT ------------
Event: time 1648239040.462709, type 1 (EV_KEY), code 544 (BTN_DPAD_UP), value 0
Event: time 1648239040.462709, -------------- SYN_REPORT ------------
Event: time 1648239041.073855, type 1 (EV_KEY), code 545 (BTN_DPAD_DOWN), value 1
Event: time 1648239041.073855, -------------- SYN_REPORT ------------
Event: time 1648239041.163855, type 1 (EV_KEY), code 545 (BTN_DPAD_DOWN), value 0
Event: time 1648239041.163855, -------------- SYN_REPORT ------------
Event: time 1648239041.483724, type 1 (EV_KEY), code 546 (BTN_DPAD_LEFT), value 1
Event: time 1648239041.483724, -------------- SYN_REPORT ------------
Event: time 1648239041.583878, type 1 (EV_KEY), code 546 (BTN_DPAD_LEFT), value 0
Event: time 1648239041.583878, -------------- SYN_REPORT ------------
Event: time 1648239041.963846, type 1 (EV_KEY), code 547 (BTN_DPAD_RIGHT), value 1
Event: time 1648239041.963846, -------------- SYN_REPORT ------------
Event: time 1648239042.063862, type 1 (EV_KEY), code 547 (BTN_DPAD_RIGHT), value 0
Event: time 1648239042.063862, -------------- SYN_REPORT ------------
Event: time 1648239044.153553, type 1 (EV_KEY), code 305 (BTN_EAST), value 1
Event: time 1648239044.153553, -------------- SYN_REPORT ------------
Event: time 1648239044.273609, type 1 (EV_KEY), code 305 (BTN_EAST), value 0
Event: time 1648239044.273609, -------------- SYN_REPORT ------------
Event: time 1648239044.613615, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1
Event: time 1648239044.613615, -------------- SYN_REPORT ------------
Event: time 1648239044.713552, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0
Event: time 1648239044.713552, -------------- SYN_REPORT ------------
Event: time 1648239045.203611, type 1 (EV_KEY), code 307 (BTN_NORTH), value 1
Event: time 1648239045.203611, -------------- SYN_REPORT ------------
Event: time 1648239045.283606, type 1 (EV_KEY), code 307 (BTN_NORTH), value 0
Event: time 1648239045.283606, -------------- SYN_REPORT ------------
Event: time 1648239045.803562, type 1 (EV_KEY), code 308 (BTN_WEST), value 1
Event: time 1648239045.803562, -------------- SYN_REPORT ------------
Event: time 1648239045.913605, type 1 (EV_KEY), code 308 (BTN_WEST), value 0
Event: time 1648239045.913605, -------------- SYN_REPORT ------------
Event: time 1648239046.563596, type 1 (EV_KEY), code 310 (BTN_TL), value 1
Event: time 1648239046.563596, -------------- SYN_REPORT ------------
Event: time 1648239046.683569, type 1 (EV_KEY), code 310 (BTN_TL), value 0
Event: time 1648239046.683569, -------------- SYN_REPORT ------------
Event: time 1648239047.023660, type 1 (EV_KEY), code 311 (BTN_TR), value 1
Event: time 1648239047.023660, -------------- SYN_REPORT ------------
Event: time 1648239047.153562, type 1 (EV_KEY), code 311 (BTN_TR), value 0
Event: time 1648239047.153562, -------------- SYN_REPORT ------------
Event: time 1648239047.993615, type 1 (EV_KEY), code 312 (BTN_TL2), value 1
Event: time 1648239047.993615, -------------- SYN_REPORT ------------
Event: time 1648239048.133618, type 1 (EV_KEY), code 312 (BTN_TL2), value 0
Event: time 1648239048.133618, -------------- SYN_REPORT ------------
Event: time 1648239048.503549, type 1 (EV_KEY), code 313 (BTN_TR2), value 1
Event: time 1648239048.503549, -------------- SYN_REPORT ------------
Event: time 1648239048.633545, type 1 (EV_KEY), code 313 (BTN_TR2), value 0
Event: time 1648239048.633545, -------------- SYN_REPORT ------------
Event: time 1648239053.734623, type 1 (EV_KEY), code 313 (BTN_TR2), value 1
Event: time 1648239053.734623, -------------- SYN_REPORT ------------
Event: time 1648239053.924564, type 1 (EV_KEY), code 313 (BTN_TR2), value 0
Event: time 1648239053.924564, -------------- SYN_REPORT ------------
Event: time 1648239056.975888, type 1 (EV_KEY), code 314 (BTN_SELECT), value 1
Event: time 1648239056.975888, -------------- SYN_REPORT ------------
Event: time 1648239057.155722, type 1 (EV_KEY), code 314 (BTN_SELECT), value 0
Event: time 1648239057.155722, -------------- SYN_REPORT ------------
Event: time 1648239057.515708, type 1 (EV_KEY), code 315 (BTN_START), value 1
Event: time 1648239057.515708, -------------- SYN_REPORT ------------
Event: time 1648239057.655704, type 1 (EV_KEY), code 315 (BTN_START), value 0
Event: time 1648239057.655704, -------------- SYN_REPORT ------------
Event: time 1648239059.065552, type 1 (EV_KEY), code 317 (BTN_THUMBL), value 1
Event: time 1648239059.065552, -------------- SYN_REPORT ------------
Event: time 1648239059.215615, type 1 (EV_KEY), code 317 (BTN_THUMBL), value 0
Event: time 1648239059.215615, -------------- SYN_REPORT ------------
Event: time 1648239059.245509, type 3 (EV_ABS), code 0 (ABS_X), value -192
Event: time 1648239059.245509, -------------- SYN_REPORT ------------
Event: time 1648239059.255526, type 3 (EV_ABS), code 0 (ABS_X), value -199
Event: time 1648239059.255526, -------------- SYN_REPORT ------------
Event: time 1648239059.265503, type 3 (EV_ABS), code 0 (ABS_X), value -324
Event: time 1648239059.265503, -------------- SYN_REPORT ------------
Event: time 1648239059.275514, type 3 (EV_ABS), code 0 (ABS_X), value -348
Event: time 1648239059.275514, -------------- SYN_REPORT ------------
Event: time 1648239059.295502, type 3 (EV_ABS), code 0 (ABS_X), value -369
Event: time 1648239059.295502, -------------- SYN_REPORT ------------
Event: time 1648239059.315498, type 3 (EV_ABS), code 0 (ABS_X), value 0
Event: time 1648239059.315498, -------------- SYN_REPORT ------------
Event: time 1648239060.255914, type 1 (EV_KEY), code 318 (BTN_THUMBR), value 1
Event: time 1648239060.255914, -------------- SYN_REPORT ------------
Event: time 1648239060.385816, type 1 (EV_KEY), code 318 (BTN_THUMBR), value 0
Event: time 1648239060.385816, -------------- SYN_REPORT ------------
Event: time 1648239061.085725, type 3 (EV_ABS), code 1 (ABS_Y), value -240
Event: time 1648239061.085725, -------------- SYN_REPORT ------------
Event: time 1648239061.095752, type 3 (EV_ABS), code 1 (ABS_Y), value -1260
Event: time 1648239061.095752, -------------- SYN_REPORT ------------
Event: time 1648239061.105730, type 3 (EV_ABS), code 1 (ABS_Y), value -1800
Event: time 1648239061.105730, -------------- SYN_REPORT ------------
Event: time 1648239061.125722, type 3 (EV_ABS), code 0 (ABS_X), value 366
Event: time 1648239061.125722, -------------- SYN_REPORT ------------
Event: time 1648239061.135710, type 3 (EV_ABS), code 0 (ABS_X), value 450
Event: time 1648239061.135710, -------------- SYN_REPORT ------------
Event: time 1648239061.175655, type 3 (EV_ABS), code 0 (ABS_X), value 454
Event: time 1648239061.175655, -------------- SYN_REPORT ------------
Event: time 1648239061.215829, type 3 (EV_ABS), code 0 (ABS_X), value 459
Event: time 1648239061.215829, -------------- SYN_REPORT ------------
Event: time 1648239061.225603, type 3 (EV_ABS), code 0 (ABS_X), value 453
Event: time 1648239061.225603, -------------- SYN_REPORT ------------
Event: time 1648239061.235602, type 3 (EV_ABS), code 0 (ABS_X), value 222
Event: time 1648239061.235602, -------------- SYN_REPORT ------------
Event: time 1648239061.245712, type 3 (EV_ABS), code 0 (ABS_X), value 0
Event: time 1648239061.245712, -------------- SYN_REPORT ------------
Event: time 1648239061.265721, type 3 (EV_ABS), code 1 (ABS_Y), value -1410
Event: time 1648239061.265721, -------------- SYN_REPORT ------------
Event: time 1648239061.275805, type 3 (EV_ABS), code 1 (ABS_Y), value 0
Event: time 1648239061.275805, -------------- SYN_REPORT ------------
Event: time 1648239061.705787, type 3 (EV_ABS), code 1 (ABS_Y), value 678
Event: time 1648239061.705787, -------------- SYN_REPORT ------------
Event: time 1648239061.715727, type 3 (EV_ABS), code 1 (ABS_Y), value 1344
Event: time 1648239061.715727, -------------- SYN_REPORT ------------
Event: time 1648239061.725792, type 3 (EV_ABS), code 1 (ABS_Y), value 1800
Event: time 1648239061.725792, -------------- SYN_REPORT ------------
Event: time 1648239061.875752, type 3 (EV_ABS), code 1 (ABS_Y), value 768
Event: time 1648239061.875752, -------------- SYN_REPORT ------------
Event: time 1648239061.885800, type 3 (EV_ABS), code 1 (ABS_Y), value 0
Event: time 1648239061.885800, -------------- SYN_REPORT ------------
Event: time 1648239062.185541, type 3 (EV_ABS), code 0 (ABS_X), value -210
Event: time 1648239062.185541, -------------- SYN_REPORT ------------
Event: time 1648239062.195557, type 3 (EV_ABS), code 0 (ABS_X), value -732
Event: time 1648239062.195557, -------------- SYN_REPORT ------------
Event: time 1648239062.205548, type 3 (EV_ABS), code 0 (ABS_X), value -1152
Event: time 1648239062.205548, -------------- SYN_REPORT ------------
Event: time 1648239062.215586, type 3 (EV_ABS), code 0 (ABS_X), value -1710
Event: time 1648239062.215586, -------------- SYN_REPORT ------------
Event: time 1648239062.225506, type 3 (EV_ABS), code 0 (ABS_X), value -1800
Event: time 1648239062.225506, -------------- SYN_REPORT ------------
Event: time 1648239062.395496, type 3 (EV_ABS), code 0 (ABS_X), value -372
Event: time 1648239062.395496, -------------- SYN_REPORT ------------
Event: time 1648239062.405505, type 3 (EV_ABS), code 0 (ABS_X), value 0
Event: time 1648239062.405505, -------------- SYN_REPORT ------------
Event: time 1648239062.645542, type 3 (EV_ABS), code 0 (ABS_X), value 834
Event: time 1648239062.645542, -------------- SYN_REPORT ------------
Event: time 1648239062.655572, type 3 (EV_ABS), code 0 (ABS_X), value 1674
Event: time 1648239062.655572, -------------- SYN_REPORT ------------
Event: time 1648239062.665579, type 3 (EV_ABS), code 0 (ABS_X), value 1800
Event: time 1648239062.665579, -------------- SYN_REPORT ------------
Event: time 1648239062.785545, type 3 (EV_ABS), code 0 (ABS_X), value 0
Event: time 1648239062.785545, -------------- SYN_REPORT ------------
Event: time 1648239063.155504, type 3 (EV_ABS), code 4 (ABS_RY), value -354
Event: time 1648239063.155504, -------------- SYN_REPORT ------------
Event: time 1648239063.165563, type 3 (EV_ABS), code 4 (ABS_RY), value -1026
Event: time 1648239063.165563, -------------- SYN_REPORT ------------
Event: time 1648239063.175536, type 3 (EV_ABS), code 4 (ABS_RY), value -1602
Event: time 1648239063.175536, -------------- SYN_REPORT ------------
Event: time 1648239063.185508, type 3 (EV_ABS), code 4 (ABS_RY), value -1800
Event: time 1648239063.185508, type 3 (EV_ABS), code 3 (ABS_RX), value -288
Event: time 1648239063.185508, -------------- SYN_REPORT ------------
Event: time 1648239063.195511, type 3 (EV_ABS), code 3 (ABS_RX), value -384
Event: time 1648239063.195511, -------------- SYN_REPORT ------------
Event: time 1648239063.235555, type 3 (EV_ABS), code 3 (ABS_RX), value -379
Event: time 1648239063.235555, -------------- SYN_REPORT ------------
Event: time 1648239063.245505, type 3 (EV_ABS), code 3 (ABS_RX), value -348
Event: time 1648239063.245505, -------------- SYN_REPORT ------------
Event: time 1648239063.255522, type 3 (EV_ABS), code 3 (ABS_RX), value -264
Event: time 1648239063.255522, -------------- SYN_REPORT ------------
Event: time 1648239063.265501, type 3 (EV_ABS), code 3 (ABS_RX), value 0
Event: time 1648239063.265501, -------------- SYN_REPORT ------------
Event: time 1648239063.305541, type 3 (EV_ABS), code 4 (ABS_RY), value -1782
Event: time 1648239063.305541, -------------- SYN_REPORT ------------
Event: time 1648239063.315504, type 3 (EV_ABS), code 4 (ABS_RY), value -786
Event: time 1648239063.315504, -------------- SYN_REPORT ------------
Event: time 1648239063.325499, type 3 (EV_ABS), code 4 (ABS_RY), value 0
Event: time 1648239063.325499, -------------- SYN_REPORT ------------
Event: time 1648239063.715548, type 3 (EV_ABS), code 4 (ABS_RY), value 276
Event: time 1648239063.715548, -------------- SYN_REPORT ------------
Event: time 1648239063.725506, type 3 (EV_ABS), code 4 (ABS_RY), value 1008
Event: time 1648239063.725506, -------------- SYN_REPORT ------------
Event: time 1648239063.735561, type 3 (EV_ABS), code 4 (ABS_RY), value 1800
Event: time 1648239063.735561, -------------- SYN_REPORT ------------
Event: time 1648239063.875655, type 3 (EV_ABS), code 4 (ABS_RY), value 810
Event: time 1648239063.875655, -------------- SYN_REPORT ------------
Event: time 1648239063.885643, type 3 (EV_ABS), code 4 (ABS_RY), value 0
Event: time 1648239063.885643, -------------- SYN_REPORT ------------
Event: time 1648239064.205754, type 3 (EV_ABS), code 3 (ABS_RX), value -1014
Event: time 1648239064.205754, -------------- SYN_REPORT ------------
Event: time 1648239064.215763, type 3 (EV_ABS), code 3 (ABS_RX), value -1800
Event: time 1648239064.215763, -------------- SYN_REPORT ------------
Event: time 1648239064.385836, type 3 (EV_ABS), code 3 (ABS_RX), value -1710
Event: time 1648239064.385836, -------------- SYN_REPORT ------------
Event: time 1648239064.395731, type 3 (EV_ABS), code 3 (ABS_RX), value 0
Event: time 1648239064.395731, -------------- SYN_REPORT ------------
Event: time 1648239064.735719, type 3 (EV_ABS), code 4 (ABS_RY), value 450
Event: time 1648239064.735719, -------------- SYN_REPORT ------------
Event: time 1648239064.745688, type 3 (EV_ABS), code 4 (ABS_RY), value 720
Event: time 1648239064.745688, type 3 (EV_ABS), code 3 (ABS_RX), value 582
Event: time 1648239064.745688, -------------- SYN_REPORT ------------
Event: time 1648239064.755730, type 3 (EV_ABS), code 4 (ABS_RY), value 888
Event: time 1648239064.755730, type 3 (EV_ABS), code 3 (ABS_RX), value 1524
Event: time 1648239064.755730, -------------- SYN_REPORT ------------
Event: time 1648239064.765725, type 3 (EV_ABS), code 4 (ABS_RY), value 1074
Event: time 1648239064.765725, type 3 (EV_ABS), code 3 (ABS_RX), value 1800
Event: time 1648239064.765725, -------------- SYN_REPORT ------------
Event: time 1648239064.775729, type 3 (EV_ABS), code 4 (ABS_RY), value 1080
Event: time 1648239064.775729, -------------- SYN_REPORT ------------
Event: time 1648239064.785646, type 3 (EV_ABS), code 4 (ABS_RY), value 1152
Event: time 1648239064.785646, -------------- SYN_REPORT ------------
Event: time 1648239064.815544, type 3 (EV_ABS), code 4 (ABS_RY), value 1147
Event: time 1648239064.815544, -------------- SYN_REPORT ------------
Event: time 1648239064.825711, type 3 (EV_ABS), code 4 (ABS_RY), value 1142
Event: time 1648239064.825711, -------------- SYN_REPORT ------------
Event: time 1648239064.835650, type 3 (EV_ABS), code 4 (ABS_RY), value 1123
Event: time 1648239064.835650, -------------- SYN_REPORT ------------
Event: time 1648239064.845750, type 3 (EV_ABS), code 4 (ABS_RY), value 1118
Event: time 1648239064.845750, -------------- SYN_REPORT ------------
Event: time 1648239064.855829, type 3 (EV_ABS), code 4 (ABS_RY), value 0
Event: time 1648239064.855829, type 3 (EV_ABS), code 3 (ABS_RX), value 0
Event: time 1648239064.855829, -------------- SYN_REPORT ------------
Event: time 1648239065.515867, type 1 (EV_KEY), code 305 (BTN_EAST), value 1
Event: time 1648239065.515867, -------------- SYN_REPORT ------------
Event: time 1648239065.645857, type 1 (EV_KEY), code 305 (BTN_EAST), value 0
Event: time 1648239065.645857, -------------- SYN_REPORT ------------
JohnIrvine1433 commented 2 years ago

@maf12, keys and events are not similar to the rg351 ! I've changed controls according to your evtest results ; you'll find the new binary enclosed. rg552-controls.zip

maf12 commented 2 years ago

@JohnIrvine1433 just tried it and it still doesn't work. I have to say, I'm getting confused now. is the new binary you used based on your recent changes in ThemeMaster-Joystick? these don't really seem any different to the changes I made here, but this is all new to me!

I've update my PR now too, because JELOS made some changes to how it listed the distro, so now it checks in 2 places. FYI I took out the plymouth checks because it doesn't work in JELOS.

JohnIrvine1433 commented 2 years ago

Hi! I had not seen your changes for controls management, it does indeed seem similar to what I've implemented in the latest binary (I just reused oga event function). I am short of idea here :)

Regarding OS identification, I assumed you proposed the modifications because of JELOS. I think it will be better to add the os-release test rather than replace all with it.

JohnIrvine1433 commented 2 years ago

ThemeMaster and ThemeMaster joypad updated to support RG552