OG Console Setup Guide

From Sinden Lightgun
Jump to navigation Jump to search

Disclaimer

All instructions are provided as information only and we can not be held responsible for any damage that may be caused to yourself or equipment.

Therefore all of this is undertaken at your own risk.

G-CON45 Setup for PS1

Here is the full tutorial to create the adapter required and the Pi4 image to get your Sinden Lightgun working with a original PS1 or PS2* console (*G-CON45 games only).

The provided image was a collaboration between Titchgamer, Prof_gLX and Harry Dog who created the original BB image.

Setup Guide

Parts List

  • Arduino Uno R3
  • PS1/2 controller extension leads.
  • Raspberry Pi4 (any RAM model)
  • OSSC/RetroTINK-5X/PS1 Digital mod to apply the border.
  • 2.54mm Dupont crimping kit.
  • Multi Meter/Continuity Tester.
  • *Optional* Adaptable Box & cable glands to mount the Arduino inside.

Programming the Arduino

Navigate to the Sinden lightgun driver page  and download the latest software revision if you have not already got it installed.

You should have your gun fully setup and tested in the Windows environment before attempting to connect it to a console and be running at least 1.6 firmware.

To flash the Arduino make sure your Sinden Lightguns are NOT connected to the system then plug in the Arduino you wish to flash.

Be aware that flashing the Arduino overwrites its boot loader so it will not be easy to reflash it again at a later date.

Once it's plugged in Windows should detect it as a new device, Load the Sinden software and navigate to the "Firmware Upgrade" Tab.

In the bottom right corner of the window you should see a white box with your arduino listed inside it, if not press refresh and it should appear.

Once done select the "Guncon 45" option (Either PAL or NTSC depending on your setup) and press the "Flash Arduino" button.

DO NOT interrupt the process, just let it finish and once its done you can unplug it from the computer.

Making up the extension lead

Firstly we need to make a extension lead that will plug into our PS1 to act as the controller.

To do this cut the controller side socket off the PS1/2 controller extension so you will have just the plug that plugs into the PS1 and the cable coming from it.

Next you need to strip approximately 75mm of the outer insulation off the end of the cable to expose the wires inside the lead.

You  then need to strip the insulation off each individual wire.

Next we need to identify which wire is connected to which pin of the PS1 extension lead plug.

To do this use your multi meter/continuity tester.

Put one probe on the first pin inside the plug housing and dab the other probe against each wires stripped end until you find the one that beeps/gives you a reading.

Write this down on a piece of paper as you will need it shortly.

E.G. Pin 1 = Black Wire etc.

Wires connected to pins 2,5 and 7 can be cut off as they are not required.

*NOTE It would be advisable to use the same pin numbering used in the diagrams below in order to avoid confusion!

E.g. Pins 1-9 are pins in order from left to right while looking at the front of the PlayStation.

Remember if you are looking at the end of the plug the pin order will be the opposite!*

Once you have identified each individual wire you need to crimp a male Dupont crimp onto the end of each wire.

If you are unsure how to do this refer to the instructions that came with your crimping set.

Once all your wires are crimped be sure to give them a gentle tug to make sure they are crimped correctly and not going to fall out!

It's also worthwhile re-checking the continuity of each wire to double check the connection is good and you have the correct pin/colour identification before moving onto the next step.

Preparing the box (if you are using one)

Drill the holes for the glands to fit the USB power, Extension lead and foot pedal (if you are using one).

Next mount the Arduino inside the box with whatever method you choose.

A easy solution for this is to use hot melt glue to stick the base plate that comes with the uno to the bottom of the box then use the provided screws to attatch the uno to the base plate.

Wiring the Arduino

Now we need to wire the Arduino up, To do so simply plug the Dupont pins from the extension lead into the Arduino as per the picture below.

Diagram showing PSX controller port explaining pin uses
Arduino wiring example demonstrating wiring order of 6, 3, 9, 8, 4, 1

If you are using a foot pedal you need to connect one wire from the foot pedal to Pin 4 of the Arduino and the other to the ground (Gnd) Pin.

Next plug the USB cable into the Arduino to complete the wiring.

Flashing the Pi Image

Firstly you need to download and install Win32 Disk Imager from the link below.

Also you will need to download the G-CON45 Pi image.

NOTE: This image was created for the older 1.6 version firmware so if you are running the newer firmware it will need to be updated manually, instructions to do so will be found below.

Connect your 8GB (or more) MicroSD card to your computer and wait for it to be detected.

Once its viewable in your file manager take note of the drive letter Windows has assigned it.

E.g. "F".

Load Win32 Disk Imager and you will see at the top a white box headed "Image File".

Click the little folder button to the right side of the box to bring up the file browser and navigate to and select the Gcon45 image you downloaded before.

Further to the right of the "Image file" box you will see a drop down menu titled "Device" click on this box to select the drive letter Windows has assigned to your MicroSD card.

BE 100% SURE you have selected the correct device as the image burning process will destroy any other data contained on the device so you dont want to accidentally select a external HDD etc!

Once you are satisfied press the "Write" button and wait for the process to finish.

On completion Windows will throw up a error saying the device can not be read and it needs formatting.

DO NOT FORMAT THE DRIVE! It's perfectly normal.

Safely eject the MicroSD card from your computer and install it into your Pi4.

Initial connection setup

Plug the PS1 extension lead from the Arduino into the controller port of the PS1.

Connect the Power cable to the Pi4, You should also connect your Sinden Lightgun into one of the Pi4's USB ports. The Arduino's USB should also be plugged into one of the ports.

Finally between the PS1 and the TV you should have either a OSSC or a RetroTINK5X which will generate the border for the Sinden lightgun to work.

You will also need to have a HDMI connected to a TV and a USB mouse and keyboard plugged in to do the initial configuration of the Pi these can be removed once you have got everything setup.

First power on

Once everything is connected you are ready to power up and start configuring the Pi.

Boot up the Pi and once it's done you should see a white welcome screen where you can bind your controller (keyboard!).

Hold any button down on the keyboard and the screen will change to a key binding screen.

Now follow the on screen prompts to bind the keys as you like.

You only need to map the Up, Down, Left, Right, A, B, Start and Select buttons to be mapped. You can skip all the others by holding down a button you have already mapped.

When you get to the end of the list the last binding should say "Hotkey Enable" Set that to the same button as you mapped for select.

Once you are done you will be brought to the RetroPie main menu.

Next you need to get a network connection to your Pi4, you can plug in an Ethernet cable for ease or you can follow the following procedure to use Wi-Fi:

Using an Ethernet cable

Navigate to the "Retropie" menu and press the "A" button, once in the menu navigate to "Show IP" and write down the IP address your Pi has been assigned you will need this shortly.

Once you have the IP address you can exit back to the RetroPie menus.

Setting up Wi-Fi

Navigate to the "RetroPie" menu and press the A button you just mapped.

Navigate to "Raspi-Config" and press the A button again.

On the new menu that appears navigate to option "5 Localisation options" and press "Enter"

Next select "L4 WLAN Country" and press "Enter"

Now select whichever country you reside in and press "Enter" again.

Now you should be returned back to the config menu, press "Right" until you highlight the "Finish" button and press "Enter", It will then ask if you want to reboot select yes and press "Enter" again to reboot the Pi.

Once rebooted navigate to the "RetroPie" menu again and then select "WiFi".

You should now be taken to the Wifi setup menu.

Select "1 connect to wifi network" and press "Enter"

Next you need to select your home Wi-Fi from the list and press "Enter"

Next it will ask you for the password, Type that in and again press "Enter"

Once complete you should return back to the Wi-Fi menu and you should see at the top of the screen a IP address etc. confirming that your Pi is now connected to your home network.

Write down the IP address shown you will need it later.

Now navigate to the "Exit" button and press ""Enter" to return back to the RetroPie menus.

Setting up WinSCP on your computer

Go to the WinSCP website linked below to download and install WinSCP on your computer.

Once you have it all installed load WinSCP and you will be greeted with a configuration screen.

On the left hand side of the window you will see "New Site" double click on that and set the following:

  • File protocol: SFTP
  • Host Name: The IP address you wrote down earlier e.g. 192.168.1.17
  • Port Number: 22
  • Username: root (lower case)
  • Password: pi (lower case)


Once you have filled in the required fields press "Save" then press the "Login" button.

Once logged in you will see the screen has two sides.

On the left is your computer and all its files and folders, and on the right you should see all the files and directories on your Pi.

This is a simple file manager where you can drag & drop, move, copy etc files between your PC and Pi.

To upgrade the software version on the Pi image

The original image was made for the 1.6 Software/Firmware and will likely not work with your gun unless you are using old firmware so we need to update the image.

To do so is simple, download and extract the latest software version from the Sinden website.

Once downloaded navigate to the "SindenLightgunLinuxSoftware\Pi-Arm\" folder using WinSCP and use the "lightgun" folder contained within to over write the folder contained in the following folder on your Pi:  "/home/pi/".

Now Restart your Pi4.

Getting the Product & Vender IDs for your devices

Now we need to get the device IDs for our Arduino/guns so we can set this in our config files on the Pi.

To do so once your Pi has restarted and you are back on the EmulationStation menu press your "Start" button to bring up the menu and navigate to "Quit", Press "A" and then navigate to and select "Quit EmulationStation" It will ask if you really want to quit press "Yes".

Once it has exited you will be taken to the Command Prompt/Terminal.

Type the following command into the terminal and press "Enter". Be aware that all the following commands are case sensitive!

lsusb

The terminal will then list all USB devices connected to the Pi.

id number example
id number example

Firstly look for the Arduino in the list it should have "Arduino SA Uno R3" or similar written by the side of it.

It will also have a 8 digit number something like "2341:0043" (your number will likely be different).

Take a note of this ID number.

Now we need to do the same for the lightgun, The description of the lightgun will be "Van Ooijen Technische Informatica" find it in the list and again write down the 8 digit code e.g. "16c0:0f01".

Leave the Pi running and return to your PC.

Inputting the IDs into the config files

Back on the PC you need to once again log back into the Pi using WinSCP and navigate to the following folder:

"/etc/udev/rules.d/"

We are interested in the file called "49-sinden.rules"

Double click the file to load it up in a text editor.

You will see 2 lines of code, the first line which has a SYMLINK of "ttySinden" is your lightgun.

The second line with the SYMLINK of "ttyGCON45" is the Arduino.

This is where we need to input the numbers we wrote down in the previous step. So on the first line where it says "ATTRS{idvendor}--"XXXX" insert the first 4 digits of the Sinden Lightgun's code into where it has the "XXXX".

So in the above example it will read: "ATTRS{idvendor}--"16c0".

Now the 2nd set of digits for the gun goes into the "ATTRS{idproduct}--"XXXX" again replacing the "XXXX" for the code you wrote down earlier.

e.g. "ATTRS{idvendor}--"0f01".

Rules file example
Rules file example

Now do the same thing for the second line of code but using the Arduino's codes you wrote down before.

Once done press the "Save" button in the top left corner to save your changes.

Now return to the Pi and reboot it by typing the following command into the terminal:

sudo halt

The Pi will now shut down, once its shut down turn the power off to it then reboot it.

Initial lightgun settings

To change the guns settings such as recoil, exposure, X/Y offsets etc do the following.

Using WinSCP navigate to the following folder on the Pi: "/home/pi/Lightgun/Player 1"  folder.

Once inside the relevant folder you will see a file called "LightgunMono.exe.config".

Double click this file to open it up in a text editor.

You will find every available setting for the gun can be altered in here if required but most people will probably just want to change the recoil settings.

To do so go to the bottom of the text file and you will find the following block:

<add key="IAgreeRecoilTermsInLicense" value="0"/>

<add key="EnableRecoil" value="0"/>

<add key="RecoilTrigger" value="1"/>

<add key="RecoilTriggerOffscreen" value="0"/>

<add key="RecoilPumpActionOnEvent" value="0"/>

<add key="RecoilPumpActionOffEvent" value="0"/>

<add key="RecoilFrontLeft" value="0"/>

<add key="RecoilFrontRight" value="0"/>

<add key="RecoilBackLeft" value="0"/>

<add key="RecoilBackRight" value="0"/>

<add key="RecoilStrength" value="100"/>

<add key="TriggerRecoilNormalOrRepeat" value="1"/>

<add key="AutoRecoilStrength" value="80"/>

<add key="AutoRecoilStartDelay" value="5"/>

<add key="AutoRecoilDelayBetweenPulses" value="13"/>

These are the recoil settings, To activate recoil you must firstly agree to the disclaimer, to do this simply change the "0" to a "1" on the top line.

You then need to enable recoil so on the second line again change "0" to "1".

0 = Off and 1 = On so you can adjust the other settings as you wish.

Once you are done save the file and restart your Pi.

Initial lightgun testing

Now we have set everything up we can test if the gun is working.

To check everything is working correctly you first need to exit EmulationStation and return back to the Command Prompt/Terminal.

To do so on the Emulation Station menu press your "Start" button to bring up the menu and navigate to "Quit", Press "A" and then navigate to and select "Quit EmulationStation" It will ask if you really want to quit press "Yes".

Once it has exited you will be taken to the Command Prompt/Terminal.

Type the following command into the terminal and press "Enter", Be aware that all the following commands are case sensitive!

cd /home/pi/Lightgun/Player1/

This will change directory (cd) to the lightgun's service folder.

Next enter the following command:

mono LightgunMono.exe

You should now see the Sinden software starting on the screen, it should look something like this and if you see this it means the gun is successfully talking to the Arduino.

Now if you start your PlayStation up with a G-Con45 game loaded and apply the border you should be able to use your gun and play the game!

Automating the start up

Once you have confirmed that the setup is working you will want to automate the process so you dont have to keep quitting out of EmulationStation and inputting the commands to start the service every time you want to play. To do this simply do the following.

Reboot the Pi and then log into the Pi using Win SCP.

Navigate to the following folder: "/opt/retropie/configs/all/"

Find and double click the "autostart.sh" file to open it in a text editor.

You will see it has a single line of code that simply says "emulationstation #auto"

Insert the following lines ABOVE the current line (again case sensitive):

cd /home/pi/Lightgun/Player1
sudo mono-service LightgunMono.exe

Then put a # in before the "emulationstation #auto" line.

Once done it should look like this:

Autostart example
Autostart example

Once you are done press the "save" button to save the changes and restart the Pi.

It should now automatically boot and start the software after approx. 45 seconds.

If you ever need to get back into EmulationStation for any reason you will have to log back into the Pi with WinSCP and put the file you just changed back to the way it was.

Downloads

Sinden Drivers

Download latest Sinden drivers and Arduino image from the Sinden Lightgun website

Pi4 Image

Download Pi4 image here from the Mediafire

PSX Wiring

PSX Port wiring pin out diagram (larger version available from Mediafire)

Diagram showing PSX controller port explaining pin uses

Arduino Wiring

Arduino wiring pin out diagram (larger version available from Mediafire)

Arduino wiring example demonstrating wiring order of 6, 3, 9, 8, 4, 1

Win32 Disk Imager

Download Win32 Disk Imager from the SourceForge website

WinSCP

Download WinSCP from the WinSCP website

Troubleshooting and Upgrading the G-CON45 Setup

If the service does not start on the Pi and shows a error the IDs are probably wrong, double check them.

If the gun seems to be rapidly disconnecting and reconnecting again (the controller screen of point blank seems to be a good test for this) you may need to run your adapter through a Multitap (or 2 for 2 player).

We are unsure exactly what causes this issue at this point in time if it's a power issue or interference but a Multitap seems to fix it!

G-CON 2 Setup for PS2

Setup Guide

Parts List

Arduino Micro (with headers for ease of use, 1 for each player)

Female to Female Dupont jumper wires (Length depending on how you want to set it up)

Raspberry Pi 4 with a minimum 8gb micro SD card.

OSSC/RetroTINK-5X or other way to apply the border.

Programming the Arduino

Navigate to the Sinden Lightgun driver page and download the latest software revision if you have not already got it installed.

You should have your gun fully setup and tested in the Windows environment before attempting to connect it to a console and be running at least 1.6 firmware.

To flash the Arduino make sure your Sinden Lightguns are NOT connected to the system then plug in the Arduino you wish to flash.

Be aware that flashing the Arduino overwrites its boot loader so it will not be easy to reflash it again at a later date.

Once it's plugged in Windows should detect it as a new device, Load the Sinden software and navigate to the "Firmware Upgrade" Tab.

In the bottom right corner of the window you should see a white box with your Arduino listed inside it, if not press refresh and it should appear.

Once done select the "Guncon 2" option and press the "Flash Arduino" button.

DO NOT interrupt the process, just let it finish and once its done you can unplug it from the computer.

Wiring

Use the female to female jumper wires to connect the Arduino to the Pi4 as per the connection drawings contained within the G-CON2 image pack you should download below.

Note that there is a different wire layout for Player 1 & Player 2 so wire them accordingly.

Installing the Pi Image

Firstly you need to download and install Win32 Disk Imager from SourceForge.

Also you will need to download the Guncon2 Image pack which contains the Pi image from Mediafire

NOTE: This image was created for the older 1.6 version firmware so if you are running the newer firmware it will need to be updated manually, instructions to do so will be found below.

Connect your 8GB (or more) MicroSD card to your computer and wait for it to be detected.

Once its viewable in your file manager take note of the drive letter Windows has assigned it.

E.g. "F".

Load Win32 Disk Imager and you will see at the top a white box headed "Image File".

Click the little folder button to the right side of the box to bring up the file browser and navigate to and select the Sinden Lightgun Gcon2 image that is contained in the pack you downloaded at the start.

Further to the right of the "Image file" box you will see a drop down menu titled "Device" click on this box to select the drive letter Windows has assigned to your Micro SD card.

BE 100% SURE you have selected the correct device as the image burning process will destroy any other data contained on the device so you dont want to accidentally select a external HDD etc!

Once you are satisfied press the "Write" button and wait for the process to finish.

On completion Windows will throw up a error saying the device can not be read and it needs formatting.

DO NOT FORMAT THE DRIVE it's perfectly normal.

Safely eject the MicroSD card from your computer and install it into your Pi4.

Initial connection of the setup

Once you have flashed and wired the Arduino to the Pi4 and installed the image on the MicroSD we are ready to connect everything together.

So connect the Power cable to the Pi4, You should also connect your Sinden Lightgun(s) into the Pi4's USB ports if you are using 2 guns it would be best to plug one into a blue slot and one into a black.

The Arduinos should already be connected via the Duponts to the Pi4 GPIO pins.

The Arduino's USB cable should be plugged into the PS2's front USB ports.

Finally between the PS2 and the TV you should have either a OSSC or a Retrotink5X which will generate the border for the Sinden Lightgun to work.

First Power on

Once everything is connected you are ready to power up, if you are running older 1.6 firmware on your gun and have a older Pi4 then you hopefully wont have to update the image. However if you are using a newer Pi or firmware you will probably find the gun will not work and you will need to update the image using the instructions below.

Either way you MUST turn on the Pi4 first and wait for approx. 90 seconds so it can boot up and start all the services it needs to start.

Once you have left it around 90 seconds turn on the PS2 with a Gcon2 game in the drive and apply a white border to the screen using whichever device you have for the border.

Now test out your Sinden!

Hopefully your gun works at this point but it will not have recoil enabled. But if it does not work or you want to enable recoil carry on reading below for the advanced setup.

Advanced Settings and updating the Image

To carry out any advanced settings on the Pi4 you will firstly need to connect a keyboard and mouse to the Pi4 as well as a HDMI video cable so you can see what's going on.

Boot up the Pi and once its done you should see a white welcome screen where you can bind your controller (keyboard).

Hold any button down on the keyboard and the screen will change to a key binding screen.

Now follow the on screen prompts to bind the keys as you like.

You only need to map the Up, Down, Left, Right, A, B, Start and Select buttons to be mapped. You can skip all the others by holding down a button you have already mapped.

When you get to the end of the list the last binding should say "Hotkey Enable" Set that to the same button as you mapped for select.

Once you are done you will be brought to the RetroPie main menu.

Next you need to get a network connection to your Pi4, you can plug in an Ethernet cable for ease or you can follow the following procedure to use Wi-Fi.

If using a ethernet cable

Navigate to the "RetroPie" menu and press the "A" button, once in the menu navigate to "Show IP" and write down the IP address your Pi has been assigned you will need this shortly.

Once you have the IP address you can exit back to the RetroPie menu.

Setting up Wi-Fi

Navigate to the "RetroPie" menu and press the A button you just mapped.

Navigate to "Raspi-Config" and press the A button again.

On the new menu that appears navigate to option "5 Localisation options" and press "Enter"

Next select "L4 WLAN Country" and press "Enter"

Now select whichever country you reside in and press "Enter" again.

Now you should be returned back to the config menu, press "Right" until you highlight the "Finish" button and press "Enter". It will then ask if you want to reboot select yes and press "Enter" again to reboot the Pi.

Once rebooted navigate to the "RetroPie" menu again and then select "Wi-Fi".

You should now be taken to the Wi-Fi setup menu.

Select "1 connect to wifi network" and press "Enter"

Next you need to select your home Wifi from the list and press "Enter"

Next it will ask you for the password, Type that in and again press "Enter"

Once complete you should return back to the Wi-Fi menu and you should see at the top of the screen a IP address etc confirming that your Pi is now connected to your home network.

Write down the IP address shown you will need it later.

Now navigate to the "Exit" button and press ""Enter" to return back to the RetroPie menus.

Setting up WinSCP on your computer

Go to the WinSCP website linked below to download and install WinSCP on your computer.

Once you have it all installed load WinSCP and you will be greeted with a configuration screen.

On the left hand side of the window you will see "New Site" double click on that and set the following:

  • File protocol: SFTP
  • Host Name: The IP address you wrote down earlier e.g. 192.168.1.17
  • Port Number: 22
  • Username: root (lower case)
  • Password: pi (lower case)

Once you have filled in the required fields press "Save" then press the "Login" button.

Once logged in you will see the screen has two sides.

On the left is your computer and all its files and folders, and on the right you should see all the files and directories on your Pi.

This is a simple file manager where you can drag & drop, move, copy etc files between your PC and Pi.

To upgrade the software version on the Pi image

Download and extract the latest software version from the Sinden website

Once downloaded navigate to the "SindenLightgunLinuxSoftware\Pi-Arm\" folder using Win SCP and use the "lightgun" folder contained within to over write the folder contained in the following folder on your Pi:  "/home/pi/".

Changing the gun settings

To change the guns settings such as recoil, exposure, X/Y offsets etc do the following.

Using WinSCP navigate to the following folder on the Pi: "/home/pi/Lightgun" and select either "Player 1" or "Player 2" folder.

Once inside the relevant players folder you will see a file called "LightgunMono.exe.config".

Double click this file to open it up in a text editor.

You will find every available setting for the gun can be altered in here if required but most people will probably just want to change the recoil settings.

To do so go to the bottom of the text file and you will find the following block:

<add key="IAgreeRecoilTermsInLicense" value="0"/>

<add key="EnableRecoil" value="0"/>

<add key="RecoilTrigger" value="1"/>

<add key="RecoilTriggerOffscreen" value="0"/>

<add key="RecoilPumpActionOnEvent" value="0"/>

<add key="RecoilPumpActionOffEvent" value="0"/>

<add key="RecoilFrontLeft" value="0"/>

<add key="RecoilFrontRight" value="0"/>

<add key="RecoilBackLeft" value="0"/>

<add key="RecoilBackRight" value="0"/>

<add key="RecoilStrength" value="100"/>

<add key="TriggerRecoilNormalOrRepeat" value="1"/>

<add key="AutoRecoilStrength" value="80"/>

<add key="AutoRecoilStartDelay" value="5"/>

<add key="AutoRecoilDelayBetweenPulses" value="13"/>

These are the recoil settings, To activate recoil you must firstly agree to the disclaimer, to do this simply change the "0" to a "1" on the top line.

You then need to enable recoil so on the second line again change "0" to "1".

0 = Off and 1 = On so you can adjust the other settings as you wish.

Once you are done save the file and restart your Pi.

Downloads

G-CON2 Image Pack

Download the G-CON2 image pack from Mediafire

WinSCP

Download WinSCP from the WinSCP website

Win32 Disk Imager

Download Win32 Disk Imager from the SourceForge

Troubleshooting

Please note this image was created using the older version of the Sinden software.

It is a good idea to upgrade it to the latest version and upgrade your guns' firmware too.

It has been found that on newer versions of the Pi that it may not boot with this image. If this is the case for you please download and extract this file from Mediafire.

After extraction, copy the Start4.elf & fixup4.dat files and overwrite the ones in the boot partition of your SD card.