What does the ( cd ; ) part do? You didn't have that some months ago?
cd ; xmame -fullscreen mame/roms/mk.zip
TUTORIAL - How to remain Lazy with some BASH scripting.
Anyhow if you're lazy like me and thinks copying and pasting long commands such as this too troublesome from a text file.
There's a way to access that long command with just a word or a two by using some BASH scripting. Here are the steps:Code:xmame mame/roms/mk.zip -fullscreen -ef 1 -jt 5 -jdev /dev/input/js0
1.) You should be in your /home directory when doing these steps!
2.) Browse to your /home/bin directory with your graphical file manager.Code:me@linux:~$ mkdir bin
3.) Right click with MOUSE > Create Document > Empty File
4.) Name the file "mortal_kombat" if that is the short command you want terminal to recongnize. Then double click the file and gedit should open it up.
5.) Copy and paste this into the text document and save!
6.)Code:#!/bin/bash # mortal_kombat - A script to run Mortal Kombat xmame mame/roms/mk.zip -ef 1 -jt 5 -jdev /dev/input/js0
Go back to terminal and copy and paste these commands you have to be in /home/bin directory first.
Code:chmod 755 mortal_kombat
7.) The parts below only needs to be done once in your life time!
Still in terminal do these commands in your /home directory!
To find your .bashrc file then make a backup of it!Code:me@linux:~$ ls -la
Then edit the file in gedit.Code:me@linux:~$ sudo cp ~/.bashrc ~/.bashrc_backup
8.) And add this to the end of your file and save.Code:me@linux:~$ gksudo gedit ~/.bashrc
9.)Code:# My custom commands export PATH=$PATH:/home/me/bin
You should now be done BASH scripting. Now when you want to run your game such as Mortal Kombat you no longer need to copy and paste this long command in terminal.
All you need to do now is to type in the command below in terminal, but you NEED to be in your /home directory when doing this or the BASH script won't find your game!Code:xmame mame/roms/mk.zip -fullscreen -ef 1 -jt 5 -jdev /dev/input/js0
Code:me@linux:~$ mortal_kombat
Let me know if this little tutorial worked for you or not!
Last edited by jingo811; August 30th, 2007 at 10:11 PM.
Registered Linux User #219690 @ Linux Counter, http://counter.li.org.
I'm trying to run kxmame, but it says I have no xmame executable, what am I supposed to do?
Also, can you play on kaillera with either xmame or kxmame?
jingo811: actually, it didn't work =(. It just says command not found.
Last edited by Mr. DVD; April 21st, 2007 at 06:16 PM.
XMAME and its variants are dreadfully out-dated. Compile your own SDLMAME instead. It's actively maintained by base MAME contributors and is up-to-date with the official (win32) version.
http://rbelmont.mameworld.info/?page_id=163
How so? Every MAME ROM I tried worked in xmame through KXMAME. Did you do something like try to run a ROM file/zip that depended on another one (like a localized version of an arcade game -- these zip files contain only the differences in the localized/hacked/etc version and the original, and you need the master version to do it) or needed a BIOS (like the NEOGEO games that needs the NEOGEO bios)? Also, CHMs (IIRC, I don't use them) have to be unzipped in a subdirectory of where their ROM is, with the subdirectory named the same as the MAME ROM name -- I think (again, I don't use them, but seems like I remember that's what to do from my one experience with them).
KXMAME is very simple and works just fine -- all you need to do is go to a couple of config options. Make sure it's pointing to an installed version of xmame (should be in /usr/games/) (note: the GUI is a bit odd in that you not only have to browse to the target, you have to Add it to the list underneath using another button), and then point it to the directory (or directories) your zipped ROMs are in.
Oh, and one other thing -- why does kxmame depend on xmame-sdl only in Feisty? I use xmame-x since it has the OpenGL acceleration to speed up rendering, and it won't let me keep it. (Meh, I'll compile my own kxmame.)
Well I don't have the arcade machine for this one.
However not an issue for Robby Roto.
"Thanks to the kind generosity of Jamie Fenton, the original ROM images for Robby Roto have been made available for free, non-commercial use."
Several roms free and legal for non-commercial use hosted here
http://www.mamedev.org/roms/
I wouldn't mind if Ubuntu started including more public domain and freely distributed roms along with these emulators... Or maybe they do, at least 2 games for scummvm are in the repo: beneath a steel sky and flight of the amazon queen... I guess it just depends on the license...
Happy gaming!
EDIT: Shown running under sdlmame version 0114u2
Last edited by BoyOfDestiny; April 22nd, 2007 at 09:08 AM.
The idea of copyright did not exist in ancient times, when authors frequently copied other authors at length in works of non-fiction. This practice was useful, and is the only way many authors' works have survived even in part. -- Richard Stallman
@Mr. DVD
From the looks of your post you can't even run the program the regular way, that might be the problem.I'm trying to run kxmame, but it says I have no xmame executable, what am I supposed to do?
Also, can you play on kaillera with either xmame or kxmame?
jingo811: actually, it didn't work =(. It just says command not found.
My BASH script tutorial won't work if your game didn't work by following the very FIRST tutorial on XMAME.
...By the way I only followed the steps 1-9, I didn't bother installing any GUI, kxmamem, etc. so that could be another factor for you to count in!
But maybe you won't have to go through all that trouble with SDLMAME. I'm gonna try it myself, if I figure out how to install it properly. There's so many instructions scattered everywhere and I have never compiled before. So things aren't looking good for me but we'll see.....
Last edited by jingo811; April 22nd, 2007 at 12:10 PM.
........hmm it doesn't look so hard to install SDLMAME compared to XMAME after all.
http://apt.ludomatic.fr/?hl=en
But I use Dapper 6.06
And the tut says this:
Do I simply edit that to dapper or how does it work?If you're using Edgy (Ubuntu 6.10), add the lines below to the opened file
( /etc/apt/sources.list ):
deb http://apt.ludomatic.fr edgy contrib
deb-src http://apt.ludomatic.fr edgy contrib
I'm just at gamer not a programmer.
........
........
Now I see another download option
http://rbelmont.mameworld.info/sdlmame0114u2.zip
extracted it sifted through the SDLMAME.txt which instructed some more tech stuff about installation.
I'm too stupid for this sheet All this endless reading I'm sticking to my obsolete XMAME if it works why break it.
Last edited by jingo811; April 22nd, 2007 at 12:31 PM.
Bookmarks