Steam Link

Steam Link

How to Build & Deploy Mame4All
I tried to write this as a steam guide, but the branding image upload on creating a new guide is broken in this section, so just a forum post for now.

Steps to build/deploy Mame on the steam link using the example Steam Link SDK native app.

Note: If you are not comfortable with Linux and/or developing apps then this may go horribly wrong, consider this a fair warning. This is more a 'Just follow these steps, ssh bb' that will hopefully help people, but if you get off the path then Thar be Dragons.

1. Install VirtualBox 5.0 if you are on Windows or a non-Linux box.

https://www.virtualbox.org/

2. Create a new Virtual Machine. Call it Ubuntu 14. Give it at least 1GB memory and 16GB disk.

3. Download the ISO image of Ubuntu 14.04 64 bit via ISO 1GB file. If you need details on this step then something like this is good:

http://www.psychocats.net/ubuntu/virtualbox

The bittorrent download of the ISO file is probably the quickest way:

http://www.ubuntu.com/download/alternative-downloads

Mount the ISO file in the Devices VirtualBox menu. Following the Ubuntu install (tell it to install locally). Give it an admin password as part of the installer, tell it to log in automatically. Don't forget the password.

4. Once the VM has started, use the Virtual Box menu and Devices / Add VM additions. Restart the VM once done. This will allow you to resize the window and get it working nicely with the host.

5. In Ubuntu hit the top left icon and type 'xterm'. Click that app icon. You should have a command prompt.

6. Get Git install with the following commands:

sudo apt-get update
sudo apt-get install git

You'll need the admin pwd you entered earlier.

7. Get the source code of the SDK from github. Use this command:

git clone https://github.com/ValveSoftware/steamlink-sdk.git .

This will copy a bunch of stuff down to your VM, not just the Mame4All example.

8. Build the mame4all native app (which is cross-compiled to the ARM architecture of the steam link and based off of the Raspberry Pi build).

(from root dir of the steam-link sdk)
cd examples
cd mame4all
./build_steamlink.sh

Wait. It will take some time while it reticulates splines. Read this while waiting:

https://github.com/ValveSoftware/steamlink-sdk/tree/master/examples/mame4all

9. Prepare USB storage for a deploy to steam link. You need to copy the newly created 'steamlink' entire folder tree from the previous step to a FAT32 USB key. You can either do that by using the Devices/Shared Folder VirtualBox and do it from OSX/Windows or try to do it from within Ubuntu.

You will need to put in Mame 0.37b5 compatible ROM files into the steamlink/apps/mame4all/roms folder too, otherwise you have nothing to play. Remember the link has an internal storage limit of 500 MB, so don't overfill. This guide doesn't cover where to get those.

10. Take the USB key and power off the steam link (as in completely power it down by unplugging the power and counting to 11). Insert the key and power up. The wee link will show a dialog and start copying from the storage. When it starts up you should now have a new Mame4All app icon. Note: Steam Link wipes storage each time I believe, so have everything you need on the key kept when you do this.

11. For first time use you'll need a USB keyboard plugged in. You can navigate the menus with a Steam Controller / Xbox 360 controller. Start a ROM game selection with 'Joystick A' button, and once it starts and in game press TAB to bring up the usual Mame menus and remap controls. The following controls are important if you don't want to leave a keyboard plugged in after this initial set-up.

- 'UI Cancel' binding can be used to set a control binding to 'None' and to exit a game if not in a mame menu. I use the center circle button on an Xbox/Steam controller as this.

- Coin 1, Player 1 Start for left/right bumpers. Clear out to 'None' (using that UI cancel binding) buttons above Joy_b4 - for most old games you just need the 0,1,2,3 Joy1 ABXY buttons anyway, and it should have defaulted to these anyway. If you have Joy2 plugged in then give them a Player 2 start too, plus clear out any conflicts to None.

12. To quit an emulated ROM, just 'UI cancel' (ESC on keyboard if left plugged in) and to exit the Mame4All app, hold down the left stick click and press the right start button - you may need to hold/repress them a bit but they work. (or if built > Feb 15 2016 then try Select + Start buttons either side of center Steam/Xbox button).

Enjoy.
< >
Showing 1-15 of 47 comments
Originally posted by fearlessfrog:
9. Prepare USB storage for a deploy to steam link. You need to copy the newly created 'steamlink' entire folder tree from the previous step to a FAT32 USB key

In order to make life simpler and for everyone who doesn't want/hesitates to compile from beginning, can anyone upload the newly created 'steamlink' entire folder somewhere?

Nice tut btw!
Originally posted by Haris1977:
Originally posted by fearlessfrog:
9. Prepare USB storage for a deploy to steam link. You need to copy the newly created 'steamlink' entire folder tree from the previous step to a FAT32 USB key

In order to make life simpler and for everyone who doesn't want/hesitates to compile from beginning, can anyone upload the newly created 'steamlink' entire folder somewhere?

Nice tut btw!
Enjoy: https://mega.nz/#!oVBEhZ6b

The key is !PrtW5BrkEK1N1MSe6Z5qR9r8l9G_lMtQsFt8WI358ZQ

The md5sum should be 555d72c6cadb6d822dbeb397c458cd9f
Originally posted by Haris1977:
Originally posted by fearlessfrog:
9. Prepare USB storage for a deploy to steam link. You need to copy the newly created 'steamlink' entire folder tree from the previous step to a FAT32 USB key

In order to make life simpler and for everyone who doesn't want/hesitates to compile from beginning, can anyone upload the newly created 'steamlink' entire folder somewhere?

Nice tut btw!

Thanks. I wasn't sure how active the updates to the Mame4All code were going to be, so wasn't sure if supplying binaries was ok rather than rebuilding it from code at this stage. It looks like Shark did it anyway, which is cool, i.e. just start from step 9.

I put a short review here, if people want to see screenshots etc

https://forums.mudspike.com/t/steam-link-and-mame4all-quick-review/1521

Native Apps are a nice addition to the Steam Link.
Thanks @Shark i will give it a try asap:)

Here are my questions/thoughts about the project

1) How can i properly exit mame app with my xbox (compatible) controller? I always use to map coin 1 button to BACK and start 1 player button to START (i do not use LB and RB buttons). So how do i exit then?

2) Is it possible to put the rom files (roms) into a separate usb stick ?? This would be great;)

3) Will this work with fba roms as well? (i think neogeo.zip file is also needed)

4) How can i add extra roms?

5) It would be nice to have a built-in update option;) (like steam link's fw)


Originally posted by Haris1977:
Thanks @Shark i will give it a try asap:)

Here are my questions/thoughts about the project

1) How can i properly exit mame app with my xbox (compatible) controller? I always use to map coin 1 button to BACK and start 1 player button to START (i do not use LB and RB buttons). So how do i exit then?

2) Is it possible to put the rom files (roms) into a separate usb stick ?? This would be great;)

3) Will this work with fba roms as well? (i think neogeo.zip file is also needed)

4) How can i add extra roms?

5) It would be nice to have a built-in update option;) (like steam link's fw)

Answers:

(1) Step 12 in the first msg.

(2) I doubt it, as the link expects everything it needs for it's internal storage to be on that single storage when it is powered on.

(3) I doubt it, but not sure, as Mame4All is based on the Mame 0.37b5 RaspberryPi (older) version. Worth a try, although it's more a Mame specific question for that version. I think that version was picked as the speed is a good fit for the Link plus it's not overburdened with stuff like recent Mame's seem to be.

(4) Just put more ROM images in the ROMs directory as in step 9. Note: it will clear your bindings, and don't forget the internal storage is < 500 MB so don't overfill.

(5) That version of Mame has very few updates, but it's possible but would need a fair bit of Link specific code updates to that Mame fork to do. So, unlikely but nice.
Thanks:) i will try it..

And another quick question: Is there any way to totally uninstall it?
Originally posted by Haris1977:
Thanks:) i will try it..

And another quick question: Is there any way to totally uninstall it?

Hmm, not sure. I would try just creating an empty steamlink folder on the USB key and then power cycle with that in - that may then just remove anything currently in internal storage on the link. Either that or a factory reset in the config menus should do it.
I've ran into difficulty. I've taken the full directory, steamlink\apps\mame4all, and put it into a USB. Powered steam link off, inserted USB then powered steam link on but nothing happens. It doesn't copy storage or seem to show any kind of life in which you described in your guide. Any ideas? I should just have to take the full directory Shark uploaded above and put it into a USB and go from step 9?
Originally posted by Elnicko:
I've ran into difficulty. I've taken the full directory, steamlink\apps\mame4all, and put it into a USB. Powered steam link off, inserted USB then powered steam link on but nothing happens. It doesn't copy storage or seem to show any kind of life in which you described in your guide. Any ideas? I should just have to take the full directory Shark uploaded above and put it into a USB and go from step 9?

A cleanly formatted FAT32 USB key drive?
Originally posted by fearlessfrog:
Originally posted by Elnicko:
I've ran into difficulty. I've taken the full directory, steamlink\apps\mame4all, and put it into a USB. Powered steam link off, inserted USB then powered steam link on but nothing happens. It doesn't copy storage or seem to show any kind of life in which you described in your guide. Any ideas? I should just have to take the full directory Shark uploaded above and put it into a USB and go from step 9?

A cleanly formatted FAT32 USB key drive?

I reformatted the USB and readded the files. Didn't come up but I did get it to work. I think I misunderstood when you said turn off the Link. I was shutting it down instead of pulling the power cable completely. I pulled the power cable. put it back in with USB inserted and this worked!
Thanks very much!!
Originally posted by Elnicko:
Originally posted by fearlessfrog:

A cleanly formatted FAT32 USB key drive?

I reformatted the USB and readded the files. Didn't come up but I did get it to work. I think I misunderstood when you said turn off the Link. I was shutting it down instead of pulling the power cable completely. I pulled the power cable. put it back in with USB inserted and this worked!
Thanks very much!!

Cool - I'll update the guide to be more explicit on the power thing - thanks.
Is there any way to manipulate files once they're on the Link? Any way to back up or change config files, or delete roms? No SSH or way to mount the internal storage via network?
Originally posted by Burnhill:
Is there any way to manipulate files once they're on the Link? Any way to back up or change config files, or delete roms? No SSH or way to mount the internal storage via network?
You can find instructions on how to enable SSH here: https://github.com/ValveSoftware/steamlink-sdk#ssh-access

You can then browse the system with an SCP client like WinSCP.
Originally posted by Shark:
You can find instructions on how to enable SSH here: https://github.com/ValveSoftware/steamlink-sdk#ssh-access

You can then browse the system with an SCP client like WinSCP.

Ahh, sweet, thanks!
Just to let anyone who has a 8bitdo controller (I've got two SNES30's) that MAME on the Link works brilliantly with them! I started them in 'Joystick' mode (just press 'Start') and paired them in the Bluetooth settings. Once in MAME and in a ROM, mapping is fairly straightforward and gaming is a retro joy :-)

There are a few gotcha's:

  • Once you've paired the SNES30 controller with the Link and launched MAME, it defaults that controller as Joy1 while Steam Controller is bumped to Joy2. If you have more than one 8bitdo controller, it gets assigned to Joy2 and Steam Controller is bumped to Joy3. (btw. every time you power up a controller, you have to restart MAME, even if it auto-pairs with Link itself)

  • Relating to the previous issue - The button mapping is very different on the SNES30 controller than the Steam Controller - which has two main issues:
  1. To exit MAME with the SNES30, you have to press 'Y' and 'Left Shoulder' buttons (in that order!) as these correspond to 'JoyButton 4' and 'JoyButton 7' which on Steam Controller are mapped to the little arrows ('Left' and 'Right') on both sides of the big Steam button. I'm sure these buttons are mapped differently on other 8bitdo (like NES30 Pro) or other brand controllers - you just need to reverse engineer (using MAME button mapper) which buttons correspond to 'JoyButton 4' and 'JoyButton 7' on your controller.

  2. If you decide to map your Steam Controller in MAME before you pair any 8bitdo controller with the Link, once it's paired and in MAME, the mappings will be totally wrong (as you mapped Steam Controller as Joy1, which has now been bumped to Joy2). So the way I decided to get around this is always pair both 8bitdo controllers before mapping Steam Controller and resolve to the fact that Steam Controller will always be Joy3 (or Joy4 if you have more controllers). It just means that you always have to make sure you have all your controllers paired before you launch MAME for the mappings you've done previously match to the controllers.
  • The good thing is that once you've paired a 8bitdo controller with Steam Link, you can use it as a standard controller to navigate Link menus and launch MAME and other apps (and initiate In-Home Streaming with your PC/Mac/Linux) without the need for Steam Controller (or Xbox 360 controller, if that's your main controller). And you can even wake & sleep the Steam Link with the controller, it just won't turn off when Link is put to sleep - but WILL pair again with Link if the controller has been turned off / gone to sleep even if Link is sleeping. What this practically means is that if you ONLY ever wanted to use MAME, you could put your Steam Controller / Xbox 360 Controller in the cupboard to gather dust and fully control the Link including sleep states.

I was hoping that I could use the SNES30 controllers in BT Keyboard mode but Steam Link just won't play ball and pair the controllers as keyboards.. not sure why. I have a 1by One BT keyboard and it works fine with the Link so it's not an BT issue as such. Using the controllers in Keyboard mode would mean that Steam Controller would always remain as Joy1 and you could map the other controllers as you pleased.

I'm not sure how much of all this is relevant to other BT controllers so if you have a different brand, your mileage may wary.

I was thinking of putting this stuff (with maybe testing few other controllers with MAME on Link) on a little video but not sure I've got the time.

Hope it's helpful to someone / sheds some insight into MAME on Link..

Cheers,
PJ
< >
Showing 1-15 of 47 comments
Per page: 1530 50