Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #29807
    gonzo
    Participant

    I am planning to use SNESDev-RPi with a PiTFT display, but they both want to use pins 19 and 23 – am I right to assume that I can just change the below section of code from SNESDev.c to use another two pins? And will any of the remaining pins work just as well? There is nothing special about pins 19 and 23 for SNESDev-RPi? Thanks!

    
    if (get_rpi_revision()==1)
    {
    gpads[0].pin_clock = RPI_GPIO_P1_19;
    gpads[0].pin_strobe = RPI_GPIO_P1_23;
    gpads[0].pin_data = RPI_GPIO_P1_05;
    gpads[1].pin_clock = RPI_GPIO_P1_19;
    gpads[1].pin_strobe = RPI_GPIO_P1_23;
    gpads[1].pin_data = RPI_GPIO_P1_07;	
    } else {
    gpads[0].pin_clock = RPI_V2_GPIO_P1_19;
    gpads[0].pin_strobe = RPI_V2_GPIO_P1_23;
    gpads[0].pin_data = RPI_V2_GPIO_P1_05;
    gpads[0].type = GPAD_TYPE_SNES;
    gpads[1].pin_clock = RPI_V2_GPIO_P1_19;
    gpads[1].pin_strobe = RPI_V2_GPIO_P1_23;
    gpads[1].pin_data = RPI_V2_GPIO_P1_07;	
    }
    
    #29808
    petrockblog
    Keymaster

    As long as you do not want to use the RetroPie GPIO Adapter you can simply adapt the SNESDev sources to your pin out and things should be fine.

    #29817
    gonzo
    Participant

    Thanks! Could you let me know where in the source I can find the settings for which keyboard keys are sent?

    #29819
    petrockblog
    Keymaster

    In SNESDev.c: ESC press is simulated, e.g., at https://github.com/petrockblog/SNESDev-RPi/blob/master/src/SNESDev.c#L297.

    #29827
    gonzo
    Participant

    What about the ‘virtual keys’ that are being sent for Up, Down, Left, Right, A, B, etc?

    #29828
    petrockblog
    Keymaster
    #29846
    gonzo
    Participant

    Ah! Forgive me for being slow on the uptake – I was assuming everything was acting as one ‘virtual keyboard’ but I can see now that there are actually two ‘virtual gamepads’ plus a ‘virtual keyboard’! Could you help with an example of how I could go about sending all of the gamepad button presses as ‘virutal keyboard’ key presses instead?

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.