Author Topic: Building a FAQ - Linux, MAME, AttractMode  (Read 17250 times)

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Building a FAQ - Linux, MAME, AttractMode
« on: September 08, 2015, 05:29:41 AM »
Hello:

I am using this thread to help me manage the building of a FAQ dedicated to creating a fully stand alone MAME cabinet with AttractMode as its crown jewel.

If anyone has any suggestions they are welcome in this thread.

Thank you,
BC

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #1 on: September 08, 2015, 07:17:44 AM »
So I am guessing from the title this will be linux based. What distro are you going to use (or like to promote)? Do you want other emulators or is this just strictly mame?

Hmm maybe this needs to be moved to the "cabinets" thread....

hey ray do you mind starting one..I'll moderate it if no one else will..I have a lot of links for ideas and such..

I can add more tonight.

People want life easy..then complain about it

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #2 on: September 08, 2015, 07:43:56 AM »
So far my checklist for setting up a stand alone MAME machine are as follows:

  • Clean install of Ubuntu 14.02 or LUbuntu 14.02
  • Auto log into the desktop
  • Auto start Attract Mode
  • Deactivate screensaver password
  • Deactivate all non required Attract Mode options and menus: The idea is that once in AttractMode no inputs will close of minimize the application on accident.
  • Deactivate all non required MAME options and menus: The idea is that once in MAME no inputs will close of minimize the application on accident.

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #3 on: September 08, 2015, 07:49:43 AM »
Hi AKAFOX:

Yes my cabinet will be Linux based. I will be using whatever low-end machine Linux works. So far Lubuntu has been successful in a virtualbox.

Perhaps moving this thread somewhere else would be a good idea. This is my way of keeping track of ideas and how to set it up so that at the end of it all I can share my experience with everyone.

Thanks,
BC

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #4 on: September 08, 2015, 11:55:10 AM »
Running Checklist

- Clean install of Ubuntu 14.02 or LUbuntu 14.02
- Auto log into the desktop
- Auto start Attract Mode
- Deactivate screensaver password
- Deactivate all non required Attract Mode options and menus: The idea is that once in AttractMode no inputs will close of minimize the application on accident.
- Deactivate all non required MAME options and menus: The idea is that once in MAME no inputs will close of minimize the application on accident.
- Test MAME
- Test Audio
- Find a way to elegantly shut the workstation down.

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #5 on: September 13, 2015, 02:41:52 PM »
- Clean install of Ubuntu 14.02 or LUbuntu 14.02

What do you mean by "clean install"? If you mean stripped of all useless stuff for your arcade cabinet...yes you can..but that is work..a lot of work. I am working on it. That would be what is called a 'custom linux distribution'

- Auto log into the desktop

auto log in is easy just change your settings.

1. In the system tools -> users and groups.
2. Highlight the user and click the change button at the right of the password
3. Click the box that says "Don't ask for password at login"

- Auto start Attract Mode

To auto-start under LXDE

1. Look in your home folder for .config/autostart/ (press ctrl+H to show hidden folders) in the file that is there open it in a text editor and add the following to the bottom of the document: (if there is not one you can make one and call it autostart)

Code: [Select]
Name= Attract Mode
Comment=Start Attract Mode front end
Exec=attract

then save the file and log out and them back in. Attract mode should start automatically

- Deactivate screensaver password

To disable screensaver

Go to Preferences --> Light Locker settings
2. Under locking turn the slider to off
3. Apply

- Deactivate all non required Attract Mode options and menus: The idea is that once in AttractMode no inputs will close of minimize the application on accident.
- Deactivate all non required MAME options and menus: The idea is that once in MAME no inputs will close of minimize the application on accident.

Do not assign a button to them. That is you'll have to pull out a keyboard for changing and tweaking...keeps kids, spouses, and "non-tech" people from messing things up ;) I say this assuming you are using a game controller/arcade stick set up. Thus once things are set up you can disconnect the keyboard or tuck it away in/under something. (Some people put a hidden drawer in their cab to keep people from getting to it..but still allowing them easy access to fix something)

I have to ask though. You said:

once in MAME no inputs will close of minimize the application on accident.

If Attract Mode and MAME are set to full screen you not be able to close or minimize anything. I know that when I am set up like that I can't get to anything else.

- Test MAME
- Test Audio

You would want to do that before you even install attract mode. ;)

- Find a way to elegantly shut the workstation down.

I am working on that..however think there is a way to do that from AM already.

If you have a physical button for power you can go to Preferences -> power manager -> in the general tab and change when power button is pressed change that to shut down. Now if you hold the power button for 3 seconds it will shut the machine down safely. (this requires a hardware "hack")
« Last Edit: September 13, 2015, 03:16:39 PM by akafox »
People want life easy..then complain about it

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #6 on: September 16, 2015, 09:30:50 AM »
Hi akafox:

A clean install of LUbuntu is starting with an empty drive and install from scratch. I have no interest in wasting time trying to optimize the OS by removing potentially unwanted programs etc. That is unless it drastically helps out.

I have looked over the rest of your instructions and they all match up to what I have figured out playing with the OS itself. I could have saved myself a lot of time had I seen your post! Thank you for it.

I was also looking at what Desktop to use. For instance I have used Fluxbox as the DTE and that worked well with very minimal resources for the desktop itself. Another benefit is that the desktop only has that tiny slit at the bottom and that is barely visible for the 5 seconds it is on the screen before the front end covers it up.

I am open to trying things out.

Thanks for you write up!
-bc

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #7 on: September 16, 2015, 09:37:54 AM »
I did have the computer set up so that pressing the power button did power down the machine correctly. I was thinking that I could just jump the wires and create a button on the back of the cabinet for that purpose.

--BC

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #8 on: September 16, 2015, 10:00:45 AM »
So I am at the point now where I need to have AttractMode and MAME be in sync with the key commands. I am using an iPac2 as my keyboard interface for the custom built arcade cabinet controllers and buttons.

I see that MAME works fine with the controls. I have loaded MAME up and played a game and exited the game using the traditional hold P1 and press P2 command. This of course takes me back to the desktop.

Now what I need to do it make AttractMode use P1 as enter the MAME game and of course up and down on either joystick to scroll through the list.

Everything else I do not want. When I boot into the OS and then auto log into the desktop and auto start AttractMode I do not want to be able to get out of or accidentally switch to the desktop or minimize windows, or switch to another desktop workspace etc. The only program that AM should be able to effect is MAME.

Any advice on this?

Thanks
--bc

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #9 on: September 19, 2015, 09:01:43 PM »
So I am at the point now where I need to have AttractMode and MAME be in sync with the key commands. I am using an iPac2 as my keyboard interface for the custom built arcade cabinet controllers and buttons.

Well at this point you should just be able to got to the confg menu in attract mode (TAB) and then to controls and set them there. As I know the Ipac is a keyboard encoder....I would suggest that you use the keys on the/a keyboard. I have my system set up using game pads and a program that translates my joydad inputs to keystrokes. To set any buttons I use the key board..but when I play I use the joypad. That is what the ipac does.

Everything else I do not want. When I boot into the OS and then auto log into the desktop and auto start AttractMode I do not want to be able to get out of or accidentally switch to the desktop or minimize windows, or switch to another desktop workspace etc. The only program that AM should be able to effect is MAME.

Same applies here. Any buttons you do not want to work just "delete" them from the control list in AM. If you are running is full screen mode (in the "general settings")..and in a dedicated game machine you should..you can not get anywhere else you are locked to AM unless you quit AM.
People want life easy..then complain about it

GHO5TLIKE5WAYZE

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #10 on: October 12, 2015, 12:48:44 AM »
Hello. New to attract mode fe... I'm not sure if you have this all sorted out as of yet, but I run 64-bit lubuntu 14.04 on a fully operational MAMEcab 2-player, 6-button config currently running Cabrio-FE with mame/mess/gens/epsxe/zsnes and have some of the "checklist" items you list already scripted out in bash shell (or easily similar).  Like auto start, auto log, launch video at cab power up, etc. All of this I have roughly scripted in SH from clean install (bare) to rock 'n roll. Let me know if i could share some knowledge.     

ps.. could also help with control integration power routing and other cool little cab tricks. i also use AntiMicro to integrate wired xbox360 controllers as players 3 and 4. potentiometers for cabinet volume control wiring, leds for activity lights...etc ...etc..

I have documented everything on this CAB build and 99% of the software configs are scripted
« Last Edit: October 12, 2015, 01:13:49 AM by GHO5TLIKE5WAYZE »

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #11 on: October 13, 2015, 08:25:40 AM »
Wow it's great to get so many real useful replies to this.

Thank you all for your comments and assistance. I plan to start working on my machines soon and will take careful notes of what does and does not work. I will get back to you all with how it all went.

Thanks all again!
--bc

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #12 on: October 16, 2015, 07:35:01 PM »
Gee GHO5TLIKE5WAYZE I thought I was going to have a great cab setup. You put a lot of work into that! Good work :)
People want life easy..then complain about it

GHO5TLIKE5WAYZE

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #13 on: October 23, 2015, 11:09:35 AM »
hahaha. Im sure yours will rock...ill get off my ass and post some pictures and stuff online and show the link

Finno

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Building a FAQ - Linux, MAME, AttractMode
« Reply #14 on: December 29, 2015, 04:30:08 AM »
Hi folks. Just thought I'd add my interest to this thread. I have a home built cab from a few years ago and recently switched it over to Ubuntu 14.04 and AM as the FE. Been using akafox's debs for AM and the patched mame build. All works great so far. Still running on KDE at the moment but will switch over to something lighter soon. Any suggestions?

Originally my cab ran Mala with Win 98 (don't laugh - at least it was second edition) but as a long time Linux user I was keen to switch it over. Only took me 6 years!  ::) Still getting my head around AM but getting there - seems to be a lack of basic doco, or have a missed something? The wiki seemed a bit light on. Akafox's step by step posts helped though.

Wouldn't mind seeing some of GHO5TLIKE5WAYZE's shell scripts too.

Good luck with the build bc. Let me know if you want any info on my build or pics etc.