• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

UAE4ARM - Coding Challenge - Custom controls

Scheduled Pinned Locked Moved Help and Support
uae4armcustom controlsc++code challenge
3 Posts 3 Posters 2.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    GrethTom
    last edited by GrethTom 5 May 2016, 09:17 5 May 2016, 08:17

    Hi all, I have been playing a lot with UAE4ARM and have configured it to near completion however there is one element that doesn't work at all at the moment and wandered if someone could help me figure out how to get custom controls working (even a limited amount). Firstly I have been playing about with the joystick.cpp code quite a bit and have had minor success here with sending the Escape key as an SDL event, here is an extract of my code:

    SDL_Event sdlevent;
    sdlevent.type = SDL_KEYDOWN
    sdlevent.key.keysym.sym = SDLK_ESCAPE;
    sdlevent.key.keysym.mod = KMOD_NONE;
    SDL_PushEvent(&sdlevent);
    					
    sdlevent.type = SDL_KEYUP;
    sdlevent.key.keysym.sym = SDLK_ESCAPE;
    sdlevent.key.keysym.mod = KMOD_NONE;
    SDL_PushEvent(&sdlevent);
    

    Like I say this works for the Escape key however it does not work for a couple of other keys I have tried, F10 and 0 (zero) keys. Within Pandora_gui.cpp there is logic on how the custom controls should work but I have played around quite a bit with no avail:

    if(buttonY)
    {
    	if(!justPressedY)
        	{
        	   	//SPACE
        	   	uae4all_keystate[AK_SPC] = 1;
        	   	record_key(AK_SPC << 1);
        	   	justPressedY=1;
        	}
     }
    else if(justPressedY)
       	{
        	   	//SPACE
        	   	uae4all_keystate[AK_SPC] = 0;
        	   	record_key((AK_SPC << 1) | 1);
        	   	justPressedY=0;
             }
    

    Sample above is for Space key but have tried different keys again without success.

    Anyone fancy working together to try and get custom controls working? That would give UAE4ARM emulator the full console like experience for games that only require joystick and a handful of keyboard keys (like Space & Function keys).

    1 Reply Last reply Reply Quote 0
    • N
      njt1982
      last edited by 18 Oct 2016, 13:52

      @GrethTom - where did you get to on this? (Sorry for resurrecting an old post, but this is of great interest to me and sounds potentially related to https://retropie.org.uk/forum/topic/4665/uae4arm-8bitdo-fc30)

      1 Reply Last reply Reply Quote 0
      • L
        Luca1
        last edited by 19 Oct 2016, 21:14

        I'm keen to hear how this turns out too. Using a Xin-mo controller in my Raspi powered arcade cab with uae4arm.

        I was hoping that the joystick only games I played as a kid would be good to go as far as far as mapping was concerned..

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

          This community forum collects and processes your personal information.
          consent.not_received