Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: addcparis on July 10, 2020, 04:19:39 PM

Title: [Solved] Mame, can't start games in Attract Mode
Post by: addcparis on July 10, 2020, 04:19:39 PM
Hi everyone,
I have just finished setting up attract mode, but I can't get it to launch games. Games launch well from Mame UI. My plan is to create multiple mame lists and put different roms in there (Shmup, beat etc...) but for now I'm just putting one list to test and that one doesn't work.
Any help is appreciated, I feel I've set it up right but obviously didn't !

Thank you

Here is the error log
Code: [Select]
Attract-Mode v2.6.1 (Windows, SFML 2.5.1 +SWF +7z +Curl)
avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

Config: D:\Mame\Attract Mode\attract.cfg

*** Initializing display: 'Main List'
 - Loaded master romlist 'Main List' in 2 ms (213 entries kept, 0 discarded)
 - Constructed 2 filters in 0 ms (426 comparisons)
 - Loaded layout: D:\Mame\Attract Mode\layouts/Attrac-Man/ (layout.nut)
 - Working directory: D:\Mame
*** Running: D:\Mame\Mame64.exe toki
Error executing command: 'D:\Mame\Mame64.exe toki'

And my Attract mode config file
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           D:\Mame\Mame64.exe
args                 [name]
rompath              D:\Mame\Roms\Mainlist
romext               .zip;.7z
system               Arcade
info_source          listxml
exit_hotkey          Escape
pause_hotkey         Num1+Down
artwork    marquee         $HOME/Mame/Marquee
artwork    snap            $HOME/mame/video;$HOME/mame/snap

And my Mame config for the rompath
Code: [Select]
# CORE SEARCH PATH OPTIONS
#
homepath                  .
rompath                   "roms;D:\Mame\roms\Mainlist"
hashpath                  hash
samplepath                samples
artpath                   artwork
ctrlrpath                 ctrlr
inipath                   .;ini;ini/presets
fontpath                  .
cheatpath                 cheat
crosshairpath             crosshair
pluginspath               plugins
languagepath              language
swpath                    software
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 10, 2020, 06:08:51 PM
Go to the command prompt and run

Code: [Select]
D:\Mame\Mame64.exe toki

and post the result.
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 11, 2020, 11:12:53 AM
Hi and thanks for your help. Here is what I get from the command (sorry it's a screenshot attached, I couldn't find the log file)
The game launches well from Mame64 UI, I have the same problem with all the games

(https://ibb.co/hfKcBCj)
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: akafox on July 11, 2020, 02:11:55 PM
remove the

Code: [Select]
roms;
and make it

Code: [Select]
rompath                   D:\Mame\roms\Mainlist
then try to run it from the command line (by the way the command line output IS your log..err to a point)

Mame is not finding your roms...yes I know they run from the GUI and all..however (and don't ask I don't know why) but that doesn't matter.
All attract mode does is type:

Code: [Select]
mame pacman
for you in the command line so you don't have to. If the command line doesn't work..then no matter what you do to attract mode you are out of luck.

It's your ini path trust me. I can not load games from the GUI..but they load just fine in the command line.
ALWAYS TEST FROM THE COMMAND LINE! That is how Attract Mode works.

Let me know if that helps..and report any new errors (if any) but i would bet all you have to do is change your path in the mame.ini like I showed you ans it will work from the command line...and thus from AM.
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 11, 2020, 02:14:01 PM
This is showing that when you run mame from the command line that it can't find some of the files that are needed for the game.

Are all of your roms (including BIOS files) in the same folder? If not you'll need to add them to the "rompath" in your mame.ini.

What type of mame rom set do you have? merged, non-merged or split?

Are you sure the "D:\Mame\Roms\Mainlist" path is correct for your roms?
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 11, 2020, 02:16:37 PM
Also, there is no need for the quotes (") in your mame.ini rompath. This could be your issue too.
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 11, 2020, 05:47:11 PM
I changed the rompath, removed the " " and tried again, I'm still getting the same error, exact same as the one I posted above. I also checked that my rompath was right.

I use groovymame 0.221 with the corresponding romset. I use the merged set. Also I don't know if it helps but I checked in the rom and the files that are listed missing are present in the rom.


Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 11, 2020, 06:45:30 PM
I made a (small) progress after searching online.

In command line, if I start by going to my mame folder
d:\mame

Then type mame64.exe toki

The game launches properly.

I don't know what to do next though, thanks for the help
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: akafox on July 11, 2020, 07:02:35 PM

I use groovymame 0.221 with the corresponding romset. I use the merged set. Also I don't know if it helps but I checked in the rom and the files that are listed missing are present in the rom.

Run that by me again? Are you saying the the files that mame lists..are missing in the zip file? Yes you NEED those files in the zip file for mame to load them of course.


[/quote]
I made a (small) progress after searching online.

In command line, if I start by going to my mame folder
d:\mame

Then type mame64.exe toki

The game launches properly.

I don't know what to do next though, thanks for the help

Sounds like a exe path problem to me. Honestly i have not touched windows in years and don't have the time to load a VM to help sorry...
However going from your toki that works...

In AM go to the setup screen for the emulator config...beside the working path....  type

Code: [Select]
D:\mame

then save it...then try to load toki and let me know
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 11, 2020, 07:28:19 PM
I added in working directory D:\Mame

But same error.

When opening last run log in AM the working directory shows like this though
Code: [Select]
D:\Mame/
Which I find strange
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: akafox on July 11, 2020, 07:58:10 PM
You are using groovymame?....

could I ask you to use vanilla mame and report back for me?
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 11, 2020, 08:59:21 PM
Are you sure you don't have more than one mame.ini?

From the command line try these and see what the rompath shows for each.

Code: [Select]
D:\Mame\Mame64.exe -sc | more

Code: [Select]
d:
cd Mame
Mame64.exe -sc | more
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 11, 2020, 09:22:28 PM
Are you sure you don't have more than one mame.ini?

From the command line try these and see what the rompath shows for each.

Code: [Select]
D:\Mame\Mame64.exe -sc | more

Code: [Select]
d:
cd Mame
Mame64.exe -sc | more

Bingo ! You are right.

The first one shows
ROMPATH     Roms

The second one shows my actual rom path (d:\mame\roms....)

When I search for mame.ini there is only one file that shows up though, the one with the correct rompath.

How can I find the second one ?
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 11, 2020, 09:31:12 PM
Try this on the command line without being inside your mame folder.

Code: [Select]
D:\Mame\Mame64.exe -rompath D:\Mame\roms\Mainlist toki

Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 11, 2020, 09:36:12 PM
Try this on the command line without being inside your mame folder.

Code: [Select]
D:\Mame\Mame64.exe -rompath D:\Mame\roms\Mainlist toki

I get "Error opening translation file English"

Then the game launches properly
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 11, 2020, 09:40:54 PM
Ok, try this then.

Code: [Select]
D:\Mame\Mame64.exe -inipath D:\Mame toki
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 11, 2020, 09:46:46 PM
It works, the game loads
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 11, 2020, 09:58:03 PM
I don't think you have more than one mame.ini but it only seems like your mame.ini is loaded when you're in the mame directory on the command line.

The easiest thing to do is to change your AM mame emulator configuration file to something like this
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           D:\Mame\Mame64.exe -inipath D:\Mame
args                 [name]
rompath              D:\Mame\Roms\Mainlist
romext               .zip;.7z
system               Arcade
info_source          listxml
exit_hotkey          Escape
pause_hotkey         Num1+Down
artwork    marquee         $HOME/Mame/Marquee
artwork    snap            $HOME/mame/video;$HOME/mame/snap

There are other options but this is probably the easiest thing to do. I don't use groovymame, I'm on a different version of the official mame and likely on a different version of windows so testing any further would be difficult.

I will say that on my setup I did have the same issue on the command line with mame if I wasn't in the mame folder. However, I don't define a working directory in AM and my game launch properly without the -inipath switch.
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 11, 2020, 10:09:53 PM
I should also mention that I use root paths in my emulator configuration files. I don't know if this makes a difference but you can try something like this to see if it works too.

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           \Mame\Mame64.exe
args                 [name]
rompath              \Mame\Roms\Mainlist
romext               .zip;.7z
system               Arcade
info_source          listxml
exit_hotkey          Escape
pause_hotkey         Num1+Down
artwork    marquee         $HOME/Mame/Marquee
artwork    snap            $HOME/mame/video;$HOME/mame/snap

Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 12, 2020, 12:39:29 AM
I tried both, I get the same error.

For info, I've put the AM folder in the Mame folder.

Should I try to put the content of the AM folder in the Mame folder ? I'm wondering if it would get it to start from the d:\mame where I manage to get the command line to work
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: akafox on July 12, 2020, 09:21:35 AM
I have a half a mind to say delete your mame ini and AM and start fresh....

this is too weird  :o
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 12, 2020, 01:16:47 PM
I have a half a mind to say delete your mame ini and AM and start fresh....

this is too weird  :o

That's exactly what I started doing. I deleted everything and I'm starting from scratch.

I'm not even installing AM for now, I'm just trying to get the Mame command line to work from outside the D:\mame folder.
I set the inipath in Mame.ini to where the ini file is, but Mame doesn't look there. Using the -sc command, it pulls an .ini file that doesn't have the rompath and inipath I set, and since I only have one mane.ini file, I can"t figure where he pulls  that other .ini file from.

Next attempt is to put my good mame.ini file in the directory where the command line starts from, I'm going totally blind there.
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 12, 2020, 01:28:13 PM
Ok some progress here, I made a copy of my mame.ini file and put it in c:\users\me, which is the default folder my command line starts from, and the command line works.

I'm going to install AM now and try, while crossing fingers, that this sorts it all out
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 12, 2020, 06:30:15 PM
No luck, I still get the same error in AM, it's going with the other mame.ini file that doesn't exist.

I don't understand how this works, is there a default folder that AM runs the mame command line from ? That's probably where I should put my mame.ini file but I don't know how to find that location.

Any idea ?
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 12, 2020, 07:07:53 PM
I'm confused. Didn't you say above that this worked?

Code: [Select]
D:\Mame\Mame64.exe -inipath D:\Mame toki
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 12, 2020, 07:47:20 PM
It worked from the command line.

I put the same line (without the rom name) in AM, and I get the error files not found.
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: progets on July 12, 2020, 08:17:53 PM
Setting the "inipath" in the mame.ini is pointless for the mame.ini. If the file is never read then neither are its contents including "inipath" and "rompath".

Once you had the command working from the command line you should just need to adjust the AM emulator file to get it to work.

Try just this
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           D:\Mame\Mame64.exe -inipath D:\Mame
args                 [name]
rompath              D:\Mame\Roms\Mainlist
romext               .zip;.7z
system               Arcade
info_source          listxml
artwork    marquee         $HOME/Mame/Marquee
artwork    snap            $HOME/mame/video;$HOME/mame/snap
Title: Re: Help : Mame, can't start games in Attract Mode
Post by: addcparis on July 13, 2020, 11:43:43 AM
It WORKS ! Yay

Setting up the inipath in AM was not enough though.

AM needs to be run in Admin mode (Right click, properties, Run as admin), even when logged in to windows with an admin account.

I'm all good now, thanks a lot for the help, I'm really happy you helped me sorting it out.
Title: Re: [Solved] Mame, can't start games in Attract Mode
Post by: akafox on July 17, 2020, 06:54:17 AM
Run in root?...err I mean Admin mode...  :o

That is bizarre...or is that normal for Windows?