Mari0 without a keyboard

by Robin
Nov 23, 2013

Update: I've moved the file to github, so that I can improve on it if required

One of the advantages of using an HTPC instead of just getting a Smart TV or something similar, is that you can do more than just watch TV. You can play games too!

After installing XBMC on a tiny PC I decided that it would be fun to install some Add-Ons that would let me play games. Obviously I didn't want to use a keyboard, so I got myself some Xbox 360 wireless controllers. The hardware is excellent, and they work with linux.

The next problem was getting good games to play. My definition of good included "multiplayer" as there was no point in me sitting in front of the living room TV by myself to play games - I have a proper PC for that. Instead I was looking for games that I could play with my partner quickly without much fuss.

One game I stumbled across was Mari0. If you haven't heard of it, and still remember the fun you had playing Super Mario on a NES (or on a Gameboy in my case), I highly recommend you to download it:

So you'd think all is well - but then why would I bother writing this post. Sadly, although Mari0 makes it easy to play using any controller you wish to use, the menu only works with a keyboard. That clearly wouldn't do for a PC sitting in the living room that hasn't seen a keyboard since it was set up.

Thus I gathered up whatever rusty Lua skills I had (none, but thankfully it's just your run of the mill procedural language) and decided to enable my controllers in the necessary menus. I was too lazy to extend this to all of the menus, so the downloadable add-ons menu DOES NOT work.

Thus if you happen to have Xbox 360 controllers and want to play Mari0 on your TV - this patch is for you!




To use it:

  • Download the source package of Mari0 1.6 -
  • Extract the zip AND the inner .love file (which is simply a zip file). If your file manager is confused you can rename to first
  • NOTE: the resulting folder needs to be called mari0_1.6.love_FILES (or you need to change the command below)
  • Now you can apply the patch using the following commands


cd mari0-source
patch -d mari0_1.6_FILES --dry-run  mari0_xpad.patch


After you repackage the mari0_1.6_FILES folder back into a zip and rename it .love you should be able to control the game using the controllers even when in a Menu.