RetroArch PSX Input Mapping for special game on port 3

Hi, My settings: Hardware: Raspberry Pi 5, 8GB Software: RetroPie (current) USB Devices connected: 2x dragonrise generic usb joystick, 1 x Sinden lightgun Emulator: lr-pcsx_rearmed

I want to use my Sinden Lightgun on Port 3 for a special games on my RetroPi. In the Retroarch Main Menu the Sinden Gun is already configured. I read that it is possible to create config aspecilly for a game. But I still don’t have a glue how to switch the port or at least find a way to create a specially file for a game. I see that is possible to change the controls if I use the hotkey, but it’s not possible to switch the port 3. I think this is my main problem because the orginal console does not support a third port.

Thank you Best regards, Chilred