Beagleboard:Super Nintendo (SNES) on Beagle Bone Black

From eLinux.org
Jump to: navigation, search

Super Nintendo (SNES) on Beagle Bone Black

BeagleSNES was created by Andrew Henderson and allows you to play SNES ROM games from a microSD card. In the following wiki, we will show you one method to get the SNES working on your BBB. All information was derived from the BeagleSNES guideand can be referred to for further information.


Items Required:

BeagleBone Black

Mini-USB Data Cable
SNES Tomee Controller
5VDC Power Supply
At least a 4GB microSD Card
A USB microSD Adapter
HDMI to Micro HDMI
HDMI Enabled Monitor/TV or Alternate HDMI Adapters.

A copy of the software ROMS (.smc) that you wish to use with BeagleSNES, which are not provided by BeagleSNES, beagleboard.org, or Circuitco.

BeagleSNES

Downloading the microSD card Image

In this tutorial, the image that we will download contains the complete BeagleSNES system and can be booted upon completion.

1. Download the BeagleSNES microSD card image by clicking here.
2. Uncompress the image using 7zip.
3. Insert the microSD card into your USB microSD adapter. Plug it into your computer.
4. Using a disk imager such as, Win32 Disk Imager, write the image file onto your microSD.
Important: Make sure you write onto the correct Device!
5. Once it is finished, you can boot beagleSNES from your BBB! In the next steps, we will see how you can insert ROMS into the beagleSNES system.

Installing your ROMS and Screenshot/Pictures

1. Insert your freshly imaged microSD card into the usb microSD adapter and plug it into your BBB. Connect your BBB to your computer using a mini USB data cable and wait for it to load on your computer.
2. On your host computer, make a new folder called, "ROMS." Then, transfer all the files (ROMS and screenshots) that you want to mount to the beagleSNES system into the "ROMS" folder. When you have finished transferring all the files, copy that folder into your BBB. (i.e. My Computer > BEAGLEBONE(X:))
3. Using a terminal emulator such as PuTTy, we will serial connect into the BBB and transfer the files directly into the microSD card. Once PuTTy is configured, log in as: root.
4. We will be using the following sub-directories to transfer files. In the following, I will use rom1.smc and rom1picture.png as examples:

ls /media/BEAGLEBONE/ROMS                  // The two files I will be transferring into the beagleSNES
rom1.smc   rom1picture.png                 
ls /media/rootfs/home/ubuntu/beaglesnes/   // This is the location where we will transfer our roms and screenshots
rom   boxes                                
  • The reason we are using the BBB is because you are able to see all partitions of the beagleSNES system since it is based off Linux, unlike a computer running off Windows.

5. We will now transfer all the files into the appropriate folders so we can play them on our system. Using your actual rom and picture names, transfer the data through these commands: (I will use rom1.smc and rom1picture.png in this example)

For ROMS: $cp /media/BEAGLEBONE/ROMS/rom1.smc /media/rootfs/home/ubuntu/beaglesnes/rom
For Screenshots/Pictures: $cp /media/BEAGLEBONE/ROMS/rom1picture.png /media/rootfs/home/ubuntu/beaglesnes/boxes

6. If you wish, go into the beaglesnes directories to check that you successfully transferred all the files.

Configuring your ROMS

1. In order to configure the ROMS to your beagleSNES, we will have to make changes in the games.cfg file. Browse to that folder through these commands:

cd /media/rootfs/home/ubuntu/beaglesnes

2. We will now open games.cfg and make changes that apply to the game. Type the following into your terminal:

nano games.cfg

3. I will write an example of what you may see and what you have to replace. I will insert comments using "//".

10                      // The number of games you want to see in the title screen
Rom1                    // Name of the game
rom1.smc                // the file name of the ROM that we inserted into the beagleSNES
rom1picture.png         // the screenshot that will be seen in the title page
Description of the      // Description or summary of the game
game goes here. You 
need to use all five
lines, or you can leave
blank lines.
1992                    // Year that the game came out
Action                  // Genre of the game
....                    // Fill in the information for the rest of the ROMS.

4. Press ctrl+x to exit 'nano' and say "yes" to save all changes.
5. You have now successfully configured all your ROMS. Unplug both the mini USB data cable and microSD USB adapter and now we will set up the hardware for beagleSNES!

Playing beagleSNES on your Monitor

1. Plug in your microSD card to your BBB.
2. Plug in your USB Tomee Controller to your BBB.
3. Plug in your BBB to your TV/Monitor using HDMI or through an alternate adapter.
4. While holding down the boot button of your BBB, plug in the 5VDC power and wait for beagleSNES to boot up.
5. Once it is done loading, you will see all of the ROM info that you edited in the games.cfg file and you are set to go!

Update for 0.5 version

Installing your ROMS and Screenshot/Pictures

The freshly-imaged microSD card now has two partitions on it: a “boot” partition and a “rootfs” partition. The first partition in the image is the boot partition, and all ROMs and configuration files for BeagleSNES live on this partition. The data on this partition is the only data that needs to be modified. Because the boot partition uses a VFAT filesystem, it will be automatically mapped as a drive within Windows once the microSD card is reinserted after the image has been written. Alternatively, this partition can also be accessed by manually mounting it under Linux. Many Linux distributions, such as Ubuntu, will detect an inserted microSD card and automount it for you. Typically, the mount point for the boot partition when it is automounted for you is the directory /media/BOOT. Once the boot partition of the microSD card is mounted and accessible, you are ready to proceed.

  1. Copy any ROM files that you wish to use with BeagleSNES into the /beaglesnes/rom directory of the boot partition/drive.
  2. Optional: Each game can also include a PNG image (typically 200x145) that represents a screenshot or box image of the game. This image will be displayed in the game selection menu. If you would like to include an image for a game, copy that image into the /beaglesnes/image directory of the boot partition/drive. If you do not include one, BeagleSNES will provide a default image for you.

Configuring your ROMS

Once you have copied your ROMs and images into appropriate locations on the boot partition/drive, you must tell BeagleSNES that you wish to include them as entries in the game selection menu. To do this, you must modify the XML text file “games.xml”, which is located in the /beaglesnes directory of the boot partition/drive. A sample games.xml file is included with BeagleSNES for you to use as a template to create your own games.xml file. To edit games.xml, feel free to use any text editor that doesn’t require DOS end-of-line characters. For Windows, we suggest using Notepad++. Wordpad will also work, but Notepad will show all of the lines together in a big jumble. If you are using Linux to edit games.xml, feel free to use any text editor that you feel comfortable using.

Each game listing inside games.xml exists between a pair of <game></game> tags. The sample template contains ten games: one game with all game information fields included (the “GameTitle1” game) and nine other entries that include only the bare minimum fields. At a minimum, you must include the title of the game (inside the <title></title> tags) and the filename of the ROM for that game (inside the <rom></rom> tags). The other optional tags can be used to specify a description, genre information, year the game was published, and a box/screenshot image. For more information on these tags and how to use them, please refer to the BeagleSNES manual.

Here is an example of what you may see and have to replace in a games.xml file. I will insert comments using "//".

<code>
<?xml version="1.0"?>
<snes>
	// This is a game entry with every possible piece of info
        <game> // Start of game entry
                <title>GameTitle1</title> // The game title displayed in the menu
                <rom>filename1.smc</rom> // The filename of the ROM
                <image>box_image1.png</image> // The filename of the game image
                <year>1999</year> // Year released
                <genre>Genre1</genre> // A descriptive genre
                <genre>Genre2</genre> // A second descriptive genre
                <text>Description text line 1</text> // Line of text describing the game
                <text>Description text line 2</text> // Line of text describing the game
                <text>Description text line 3</text> // Line of text describing the game
                <text>Description text line 4</text> // Line of text describing the game
                <text>Description text line 5</text> // Line of text describing the game
        </game> // End of game entry
 
        // This is the minimal entry for a game
        <game>
                <title>GameTitle2</title>
                <rom>filename2.smc</rom>
        </game>
        // ... More <game></game> tags go here for more games ...
</snes>
</code>

Note that the ROM and image filenames listed in games.xml are only the names of the files themselves. No path prefix needs to be added to these entries as BeagleSNES knows where these files are located in the filesystem. For example, an entry like “rom/filename1.smc” is incorrect for the <rom> entry, but “filename1.smc” is correct. Once your games.xml file has been updated, you are ready to set up your hardware to use BeagleSNES!

Playing BeagleSNES on your Monitor

  1. Plug in your microSD card into your BBB.
  2. Plug in your USB Tomee Controller into your BBB.
  3. Plug your BBB into your TV/Monitor using HDMI or through an alternate adapter.
  4. Once it is done loading, you will see all of the ROM info that you edited into the games.xml file and you are set to go!

Please refer to the BeagleSNES manual for more information about the following topics:

  • Remapping the BeagleSNES controls to use USB controllers other than the Tomee
  • Reconfiguring BeagleSNES to use the Circuitco LCD3 cape for video output
  • Reconfiguring BeagleSNES for use on the BeagleBoard-xM
  • Detailed explanations of the games.xml file XML tags and their usage