From time to time there may be updates available for SmartyPi, an update may fix software bugs or add new functionality (Additional games) which may be compatible with certain game cabinets that SmartyPi supports.
Updating SmartyPi may compromise three separate actions after you have downloaded the file pack, I recommend the updates are completed in the following order.
- Update the microcontroller, this may affect controls, or add the ability to play new games.
- Update the configuration file on the MicroSD card connected to SmartyPi PCB. This essentially setup up SmartyPi for the game cabinet you are using and which games you are entitled to play.
- Update the Raspberry Pi image. This contains the Operating system that runs the Raspberry Pi and is configured with MAME, Cannon Ball and all necessary files to make SmartyPi run.
Update procedure. (These instructions are included in the README.txt files that ware included with each part of the update.
Step 1
Download SmartyPi-MicroController-Updater.zip and extract the files. Once unzipped, take a look at the included README file for full instruction of how to update your microcontroller.
Power off your SmartyPi PCB/Cab, connect Laptop with a USB cable to the Arduino Micro Controller. You can reuse the short white cable from the SmartyPi PCB if you have good access to the connection, otherwise use a standard length USB-A to USB-B[micro] - An Android charge cable will usually do if you need something longer. Be careful removing the USB micro cable from the Arduino, the connection is fragile and remember, be careful removing the USB micro cable from the Arduino, the connection is fragile! I cannot emphasize how careful you must be so not to break the connection on the microcontroller.
You have been given three software script’s for updating the microcontroller. smartypi-MicroUpdater-AutoLEO.bat, smartypi-MicroUpdater-AutoSER.bat, & smartypi-MicroUpdater-Manual.bat, if you have the Arduino IDE installed on your computer use the 'AutoLEO' batch file, if you don't understand what that is, or know you don't have it installed, use the 'AutoSER' batch file. Instructions for using both of these 'Auto' files are as follows.
** AUTO UPDATER (AutoLEO & AutoSER) **
Double Click the 'smartypi-update - Auto(LEO/SER).bat' file. This may cause Windows to tell you the file is untrusted. If so, click the 'more...' text and allow it to run.
A command window will open giving you simple instructions to complete the upload.
a) Plug your Arduino into a spare USB port on the PC
b) Press the reset button twice on SmartyPi. (Small button between the Raspberry Pi and Arduino) This puts the Arduino into bootloader mode so it will accept the update.
c) You then have up to 8 seconds to press any key on your laptop keyboard. The update process will start.
d) During the update you should see 3 red LEDs light up on the Arduino. The update will complete.
e) If you see "bytes of flash verified" in the text, the process was successful. (Example of text below)
f) If you see "can't open device" it failed, please retry making sure the above steps are followed or use the Manual update option.
g) Assuming the update was successful, disconnect the USB cable from the Microcontroller and reconnect to the original SmartyPi cable connecting the Raspberry Pi and Microcontroller back together.
If the Auto updating batch file didn't work, you can try using the Manual updater. There's a couple more steps but this should work if the other options don't successfully run or work as expected.
** MANUAL UPDATER **
For Manual updating, use the 'smartypi-update - Manual.bat' file. You will need to know which com port the Microcontroller uses when connected to Windows, follow the points below in order.
a) Open Windows Control Panel and select Device manager.
b) Connect you USB cable between PC/Laptop and microcontroller.
c) Expand the 'Ports (COM & LTP)' section, you will see an entry 'Arduino Leonardo'(COMx) or something like 'Serial Com device'(COMx), where the 'x' is a number, press the reset button on SmartyPi (between the Pi & microcontroller) the device tree will refresh and the com port number will change. Usually, one number up from the first number you see. Remember this number.
d) Double click 'smartypi-update - Manual.bat' this will open a command window. This may cause Windows to tell you the file is untrusted. If so, click the more... text and allow the file to run. Type your COM number from the last step, press the reset button twice in quick succession (Small button between the Raspberry Pi and Arduino) and then press enter on in the command window where you set you COM number. If you see "bytes of flash verified" in the text box and a rising percentage bar the update was successful.
e) Assuming the update was successful, disconnect the USB cable from the Microcontroller and reconnect to the original SmartyPi cable connecting the Raspberry Pi and Microcontroller back together.
Below is an example of what a successful update should look like in the command window when the updater runs.
Writing | ################################################## | 100% 3.30s
avrdude: 27846 bytes of flash written
avrdude: verifying flash memory against .\smartypi-std-arduino-1.0.7.1.2.ino.hex:
avrdude: load data flash data from input file .\smartypi-std-arduino-1.0.7.1.2.ino.hex:
avrdude: input file .\smartypi-std-arduino-1.0.7.1.2.ino.hex contains 27846 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.42s
avrdude: verifying ...
avrdude: 27846 bytes of flash verified
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)
avrdude done. Thank you.
*** SmartyPi Microcontroller Updater *************************************
* Process complete *******************************************************
**************************************************************************
* If you see "bytes of flash verified" above, the process was successful *
* If you see "can't open device" it failed, please retry *
**************************************************************************
Step 2
Next we will update the configuration file on the MicroSD card which is connected to the SmartyPi PCB.
Power Off SmartyPi, remove the microSD card by pressing the SD card to eject (Serial numbers 421906 and below) or for newer PCBs, slide the metal cover forward and it will open up on a hinge. Connect the MicroSD card to a computer via USB adapter or a full size SD card adapter.
Copy the new setup.txt onto your configuration microSD card (blue dot), overwriting the file that is on there already. Update the configuration options as you would like to SmartyPi configured, I recommend using Windows Notepad or Notepad++, Word or WordPad are not recommended as they may introduce invisible characters (Linefeed, Carriage returns, paragraph indents etc.) into the file which will stop of from working correctly.
As of the current update, the configuration options that can be altered by users are as follows, where 'PARAMETER' equals the option you would like to use, by default these options will be set to leave SmartyPi in a working condition, you may need to alter them to suit your cabinet and preference choices.
- Cab=PARAMETER
- Determines which game cabinet you are using, this setting effects how the game controls are configured.
- SwitchGames=PARAMETER
- If you are entitled to play more than one game, you can set this option to 'TRUE'
- Outputs=PARAMETER
- Controls which output signals are used. the default parameter is 'ALL', using all motor and lamp controls. The 'SLO' option can be used to only show Start Lamp signals, (Disabling other motor and Lamp signals), This option can be set to 'NONE' if no lamps or motors are being used.
- Gamelist=PARAMETER
- SmartyPi has some pre-configured game lists for each cabinet type, you can use one of these or select a custom list if you would like to run any combination of games in the order you want them to switch.
- CUGames=PARAMETER
- If using a Custom Gamelist, this parameter must be set the number of games you would like to use, valid options are 1-12. The maximum supported Gamelist size is 12 games. Non Sega, and games that are not 100% compatible (in most cases, gearing is not suitable for the cabinets controls) can be added to this list, the limiting factor to playing them may be automatic gear selections in some games.
- CG1=PARAMETER to CG12=PARAMETER
- The CG1-CG12 parameters should be updated with the name of the games you would like to play in the order they will be switched. If you are using a list of six custom games, you should rename the remaining CG parameters to equal NA. All available games are listed in the setup.txt itself.
Once complete, save the .txt file and safely eject the MicroSD card from your computer. Finally re-insert the MicroSD card into SD reader, for older PCB's it will push into place until clicked into its sprung positions or for the newer SE PCB's, fold the cover over the SD card and slide it down to lock into place.
Step 3
You will have downloaded the Raspberry Pi image for SmartyPi, now you will need to install software on your laptop or PC to get the image onto the MicroSD card (green dot).
I recommend loading this image onto you MicroSD card by using balenaEtcher from https://www.balena.io/etcher/ Power Off SmartyPi. Remove the microSD card from Raspberry Pi, place it in an SD adapter if necessary, and inset into your laptop or PC.
Once balenaEtcher is installed, run the program.
Choose the 'Flash from file' option on the left, browse to and select the .zip image file for the image you have downloaded. in the middle column, choose the SD card that is being written to (Make sure this is not another of your external drives otherwise it may be wiped clean! The SD card for SmartyPi usually appears as a 15.x Gb size MicroSD card.) Start the writing process by pressing the 'Flash' button on the right side. The software will flash the card with the image and then verify the write. This should complete successfully.
At this point remove the MicroSD card and re-inset into the raspberry Pi (green dot facing upwards). You should have now completed all three of the required steps, make sure everything is plugged in and connected before powering up your cabinet.
SmartyPi should load with any new changes applied. If you game fails to load an appears stuck showing a SmartyPi logo on the monitor power off your cab, the first thing to check is the SmartyPi MicroSD card, check it is seated correctly in the SD card reader, if not reseat it and power up again. If you still only see the SmartyPi logo on the monitor, power off the cab and put the MicroSD card back into your laptop or PC. Verify the configuration parameters are correct and valid, alter as necessary, re-save the file, eject form computer and put back into SmartyPi.
If SmartyPi is still not successfully running, take a look at the troubleshooting guide and see if anything there fits the symptoms you are seeing. If not, please email me at smartypi.arcade@gmail.com giving as much information as possible in order for me to assist in getting you back up and running.
Good luck and enjoy any updates which have been added to SmartyPi.