Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • gonzo
    Participant
    Post count: 4

    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;	
    }
    
    petrockblog
    Keymaster
    Post count: 1827

    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.

    gonzo
    Participant
    Post count: 4

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

    petrockblog
    Keymaster
    Post count: 1827
    gonzo
    Participant
    Post count: 4

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

    petrockblog
    Keymaster
    Post count: 1827
    gonzo
    Participant
    Post count: 4

    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)
  • You must be logged in to reply to this topic.