# Attract-Mode Support Forum

## Attract-Mode Support => General => Topic started by: xod on November 03, 2018, 04:44:44 AM

Title: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 03, 2018, 04:44:44 AM
I registered to report a bug and relaized that the bug report subforum just links to github. Since I have no github account (the interface is horrible enough to keep me away, for anything) and already registered here, I was thinking if you don't want this bug report in here, then I would be grateful if someone posts following report in below paragraph to github on account (note the different semantics of "account" now) of me or him/herself if need be.

Ok, so I have set everything up for running MAME 0.78, and no matter what myriads of custom config (related to paths and args) I could come up with, the AM refused to launch emulator (just a brief "black screen" for a few milliseconds, after which attract mode GUI returned back). As I examined the log file (and attract-console), I saw no wrong. The paths and args expanded as intended and yet nothing happened. I copied that exact expanded commandline into console and executed with success. Ths was perplexing, very perplexing. I lanched DebugView to see if it had functionality to intercept and log the "commandline" (precesses and args) invoked by a given process (in this case, AM). While I had DEbugView open, I ran AM again, and suddenly...YES. I thought to myself: "wtf!!!". I exited AM, closed DebugView and ran AM again, and again it refused to launch emulator. I lanched DebugView again and repeated, and again AM DID lanch emulator. I wondered if it had anything to do with DebugView's window set to "always in front", so launched another app to verify, this time Task Manager. So I launched task manager with and without "always on top" (in that order), with the result of success and failure (in that order). I further examined by changing AM's window mode to the other options, and it becomes clear that..

Attract mode can only successfully launch emulator if..

1) at least one app (for example Task Manager) runs with it's window being in front layer ("always on top").
or
2) Attract-Mode runs in windowed mode.

System:
CPU: AMD Athlon 64 X2 5200+ (2GB RAM)
GPU: ATI Radeon HD4550 (512MB VRAM)
OS: Windows 7 Home Premium 32-bit
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: keilmillerjr on November 03, 2018, 09:22:14 AM
Both of those two items are not valid in my case. I have been running my arcade with windows 10 1606 enterprise an hd5450. Boots straight to attract with nothing else (no explorer). However, I have never run such an old mame version.

Are you running a fresh install of windows?
What apps do you have open? Is explorer running?
Can you post your emulator config file?
What terminal command are you using to launch separately of attract?
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 03, 2018, 02:19:51 PM
Both of those two items are not valid in my case. I have been running my arcade with windows 10 1606 enterprise an hd5450. Boots straight to attract with nothing else (no explorer). However, I have never run such an old mame version.

I assumed that most users are not suffering from this, or else we'd be reading about it, alot.

Quote
Are you running a fresh install of windows?

I installed the OS about 4-5 years ago. Although I have never experienced such behavior with any other app. None.

Quote
What apps do you have open? Is explorer running?

Different apps at different times (includes explorer). Sometimes nothing.
Doesn't matter in which combo. The one and only pattern I can see is that at least one app (window) must be "always on top" for AM to successfully launch emulator. I just tried again without any app "always on top", and mame was not launched (through AM that is, launching mame independently is always successful). This time I tried yet another app, VLC, and set it's window "always on top", and as expected, mame was launched successfully. I will later disable the TortoiseHg Overlay Icon Server to see if that has any effect. Btw, by "explorer", do you mean as file manager, or as desktop shell ? I have not tried terminating explorer as desktop shell yet, but I'd rather lanuch an app "always on top" rather then kill explorer for AM to work. Not that I woulnd't love to get rid of the former annoyance (random app "always on top") though.

Quote
Can you post your emulator config file?

You mean AM's MAME.cfg, or MAME's mame.ini ?

Quote
What terminal command are you using to launch separately of attract?

Anything that's valid, like: c:\path\to\mame.exe 1942 -rompath e:\path\to\mameroms.
But also I take, for validation, the expanded (by AM) commandline, like..

Code: [Select]
[name] -rompath [rompath] -d3d -d3dfilter 1 -d3deffect scan75 -d3dscan 75 -skip_disclaimer -skip_gameinfo
..which is expanded to..

Code: [Select]
C:\__etr7priv\Applications\mame078b\mame.exe 1942 -rompath C:\__etr7priv\Emulation\MAME/ROMs\0.78/ -d3d -d3dfilter 1 -d3deffect scan75 -d3dscan 75 -skip_disclaimer -skip_gameinfo
..and I copy that expansion to command processor console and execute, and it runs without any problem.

-edit-

I closed the TortoiseHg Overlay Icon Server without postive outcome.

If I had modded this windows installation I would suspect that could possibly be the problem, but I have not touched it, unlike my old XP which I modded with various desktop shells, custom icons (tango) reinforced by an on-boot always executing program, hacked uxtheme.dll, etc. But again, I have not touched this Win7 installation.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: keilmillerjr on November 03, 2018, 02:27:45 PM
Not sure if it matters, but your mixing slashes and backslashes in your path.

Try closing all apps including explorer (shell).
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 03, 2018, 02:40:10 PM
Not sure if it matters, but your mixing slashes and backslashes in your path.

I have only used backward slash in the paths I set. It's Attract-Mode that adds forward slashes. But it doesn't matter, since I have copied AM's expanded commandline, pasted into command processor console, and executed (very) successfully. Also, backward/forward slash doesn't explain why I have to ha at least one random app's window "always on top" for AM to successfully execute MAME.

Quote
Try closing all apps including explorer (shell).

Sure.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 03, 2018, 03:01:57 PM
I did terminate explorer as desktop shell, with positive outcome.

So, an updated statement:

Attract mode can only successfully launch emulator if..

1) at least one app (for example Task Manager) runs with it's window being in front layer ("always on top").
or
2) Attract-Mode runs in windowed mode.
or
3) Explorer shell is not running.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: qqplayer on November 03, 2018, 05:42:58 PM
I did terminate explorer as desktop shell, with positive outcome.

So, an updated statement:

Attract mode can only successfully launch emulator if..

1) at least one app (for example Task Manager) runs with it's window being in front layer ("always on top").
or
2) Attract-Mode runs in windowed mode.
or
3) Explorer shell is not running.
1 Try resfix plugin.

Code: [Select]
minimum_run_time     103 Try AM console version to check if your launching comand is right.
4 Create a .bat file with your AM launching command to check if there is some issue.

I have mame 0,78 working without poblems on w8,1 and mltiple AM versions.So its not an AM problem.

Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 04, 2018, 10:08:42 AM
1 Try resfix plugin.
Code: [Select]
minimum_run_time     103 Try AM console version to check if your launching comand is right.
4 Create a .bat file with your AM launching command to check if there is some issue.

I have mame 0,78 working without poblems on w8,1 and mltiple AM versions.So its not an AM problem.

1) What does resfix do ? (edit: nevermind, I thought I had to find and download it)
2) It seems that "minimum_run_time" is the setting name of old(er) AM version, and whose modern equivalent is "nb_mode_wait" ? In any case I have tried both from 1 all the way up to 240, without success. AM waits for chosen amount of seconds, and then continues. Also what is the intended semantics for "non-blocking" in this case ? I ask because it sure as heck is BLOCKING (and definitely NOT non-blocking). So if I have 240 seconds, the AM GUI blocks/sleeps for 4 minutes after which is responsive again.
3) I have already checked the log (both "last_run.log" as well as "attract-console.exe") and there is nothing wrong there.
4) Why a .bat file ? I doubt AM, instead of simply outputting any error to either stderr or stdout, would instead set some error level ! That would make no sense, and I doubt that's what you meant.

Some additional info: I set "nb_mode_wait" to 240, and as soon as I (attempted to) launch an emulator/game, I went over to the Process Explorer window that was waiting for me, and I saw attract.exe without a child (mame.exe).

Downloaded Process Monitor, and while I have no familiarity (only tested it for a few minutes 10+ years ago), I have created a filter (to capture mame.exe activity, if it is even starting..), and using that, mame.exe seems to start.....and quit 1-2 seconds later:

Started:  2018-11-04 18:57:36
Ended:    2018-11-04 18:57:37

If developer needs extensive log from Process Monitor, just let me know.

-edit-

Oh I forgot, Process Monitor provides the commandline that mame.exe was invoked with:
Code: [Select]
C:\__etr7priv\Applications\mame078b\mame.exe 1942 -rompath C:\__etr7priv\Emulation\MAME/ROMs\0.78/ -d3d -d3dfilter 1 -d3deffect scan75 -d3dscan 75 -skip_disclaimer -skip_gameinfo
Also, as requested, MAME.cfg (Not needed IMO, but anyway):
Code: [Select]
# Generated by Attract-Mode v2.4.1#executable           C:\__etr7priv\Applications\mame078b\mame.exeargs                 [name] -rompath [rompath] -d3d -d3dfilter 1 -d3deffect scan75 -d3dscan 75 -skip_disclaimer -skip_gameinfoworkdir              C:\__etr7priv\Emulation\MAMErompath              ROMs\0.78romext               .zip;.7zsystem               Arcadeinfo_source          listxmlartwork    marquee         Marqueesartwork    snap            Snaps;Flyers
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: qqplayer on November 05, 2018, 03:27:42 PM
Try this ,put your roms in this rompath, edit or create your mame.ini adding the rompath directory.

Code: [Select]
# Generated by Attract-Mode v2.4.1#executable           C:\__etr7priv\Applications\mame078b\mame.exeargs                 "[romfilename]"rompath              C:\__etr7priv\Applications\mame078b\mame.exe\roms\romext               .zip
Once you get this basic config working add all the other -config options.

Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 05, 2018, 06:24:29 PM
Try this ,put your roms in this rompath, edit or create your mame.ini adding the rompath directory.

Code: [Select]
# Generated by Attract-Mode v2.4.1#executable           C:\__etr7priv\Applications\mame078b\mame.exeargs                 "[romfilename]"rompath              C:\__etr7priv\Applications\mame078b\mame.exe\roms\romext               .zip
Once you get this basic config working add all the other -config options.

I did that, except I pointed 'rompath' to my actual rompath, and same problem as before. Not sure why you suggest putting the roms in<mameroot>\mame.exe\roms\, I'm over 100% certain that won't help the slightest.

For everyone's information, my SNES9X emulator's Attract-Mode config gives no problem at all. I do NOT have to have at least one random application window "always on top", or terminate explorer shell or whaetver. AM -> SNES9X is always successful.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: toothlessgrinn on November 06, 2018, 12:03:16 AM
Here's my 2 cents if its worth at least one.... Imho I think your args. Have way to much going on. Try leaving it at default setting and delete working path line. Think its conflicting with its self cuz its got too much going on. My mame config is default and have no issues running any version of mame. And my working path is blank.

Good luck.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 06, 2018, 02:08:23 AM
Here's my 2 cents if its worth at least one.... Imho I think your args. Have way to much going on. Try leaving it at default setting and delete working path line. Think its conflicting with its self cuz its got too much going on. My mame config is default and have no issues running any version of mame. And my working path is blank.

Good luck.

I have cut down on them. It was simple to begin with, but since I could not launch MAME through AM, I started modifying and adding properties (including workdir and explicitly including rompath in args) and that's the story of how my .cfg ended up bloated like that.

But all the cleanup doesn't help. And since I use Process Monitor to monitor mame.exe, I can see the exact args that are given to it by AM, and like before the cleanup, there is no problem there, the args are as expected and correct. As I have written before, there there is a breakage on MAME's execution when following things are combined.

MAME is launched by AM (important: NOT when MAME is lanched by user directly, or NOT when AM launches another emu, like SNES9X).
+
Explorer shell IS running, or AM is NOT running in windowed mode, or there is NOT ONE SINGLE (other) application window that is "always on top".

With the comination/circumstances like above, MAME will start but 1-2 seconds later it will have exited (NOT crash). And here's the important part, regardless of when MAME fails to keep executing due to the combination above being TRUE, or when it succedes to keep executing due to the combination above being FALSE, the ARGUMENTS that mame.exe is given by attract.exe is ALWAYS one and the same CORRECT arguments (I can clearly see that with Process Monitor). Therefore, the problem has absolutely nothing to do with arguments passed to mame.exe. The problem is raised by one of the parts involved (AM or MAME or any part of Wiindows 7 Home Premium 32-bit SP1). That other users do not seem to suffer could be due to them not running Wiindows 7 Home Premium 32-bit SP1, or that those that do suffer are not posting in forums or report bugs, and just stop with any FE alltogether or move on to some other FE.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: toothlessgrinn on November 06, 2018, 07:42:50 PM
then you have a bad capacitor. and yes that can cause issues with programs. cuz there should be no issues then. i dont know why any one is ha ving such issues .... wait what layout are you using? may sound nuts but squirrel is kinda touchy with the layouts. if your using a custom one sometimes they make am do crazy crap. seriously. took me months to figure this one out!! i switched to am3.2 i think and mame .191 and everything works flawlessly. daphne nes snes and atari 2600. i even have wii remotes for light guns. so if none of this is helpful im sorry but i tried. lol

good luck
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 07, 2018, 05:47:46 AM
I use default layout (attrac-man), and the problem cannot have much to do with layouts (I have tested to verify as well).

Has anyone tested any AM version on Win7 Home Preium 32-bit (SP1), testing MAME (0.78) with it ?
I suppose in the upcoming days I'll download newest mame with a few new roms, and see if that version raises problems as well.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: toothlessgrinn on November 07, 2018, 08:36:33 AM

i dont understand how people are having such problems. mine WORKS FLAWLESSLY

then you need a new board and get windows 64 bit. mame DOES NOT need any args to work. even the older versions.
SOMTHING is conflicting so that tells me either you have a bad BOARD  or your CODE is off some how or yor windows instal is CORRUPT cuz it aint ATTRACT MODE!!

ATTRACT MODE NEEDS NOHELP TO WORK AND ALOT OF YOU "TINKERS" ARE FILLING YOU CONFIGS WITH UNNEEDED CRAP AND WONDER WHY IT DOESNT WORK....

im a hardware guy i am by NO means a command line/code person and mine works FINE!

sorry for the caps but goddamn ......
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: dukpoki on November 07, 2018, 09:46:35 AM
I'm assuming you've done the basics?  Like re-installing AM from scratch?  I would do that.  Then setup Mame with the default arguments that AM provides then test it again.  This way you can rule out the code, or any lingering funky AM settings as the cause.  If that doesn't work,  then try downloading a different version of Mame--preferably the most recent (0.78 seems ancient and it's recommended to use something more recent because the jump and advances in emulation fixes are massive and well worth it).  Just grab a single test rom from somewhere and try it out.  This way you can rule out the version of Mame as the cause.  If it still doesn't work, then test it out on a different computer so you can rule out if it's your rig or not.

Oh and one other thing.  Make sure in your mame.ini that's found in your Mame executable folder, that for "rompath", you have all your directories to your Mame roms listed.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 07, 2018, 04:50:42 PM

I have written again and again that there are no problems with the args. Did you read ? Can you stop trolling ?

Quote
i dont understand how people are having such problems. mine WORKS FLAWLESSLY
Good for you!

Quote
then you need a new board and get windows 64 bit. mame DOES NOT need any args to work. even the older versions.
SOMTHING is conflicting so that tells me either you have a bad BOARD  or your CODE is off some how or yor windows instal is CORRUPT cuz it aint ATTRACT MODE!!
According to your post (quote further down) you're no commandline/code person, and yet you keep telling me that "my code" is very off and so on. Now if I only knew what code it is so I can send to you to inspect, thanks.

Quote
ATTRACT MODE NEEDS NOHELP TO WORK AND ALOT OF YOU "TINKERS" ARE FILLING YOU CONFIGS WITH UNNEEDED CRAP AND WONDER WHY IT DOESNT WORK....

:)

Quote
im a hardware guy i am by NO means a command line/code person and mine works FINE!

:)

Quote
sorry for the caps but goddamn ......

Yep!
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 07, 2018, 05:23:37 PM
I'm assuming you've done the basics?  Like re-installing AM from scratch?  I would do that.  Then setup Mame with the default arguments that AM provides then test it again.  This way you can rule out the code, or any lingering funky AM settings as the cause.  If that doesn't work,  then try downloading a different version of Mame--preferably the most recent (0.78 seems ancient and it's recommended to use something more recent because the jump and advances in emulation fixes are massive and well worth it).  Just grab a single test rom from somewhere and try it out.  This way you can rule out the version of Mame as the cause.  If it still doesn't work, then test it out on a different computer so you can rule out if it's your rig or not.

It's very new AM installation. Just a few days ago actually that I installed AM for the very first time. But of course I will try reinstall after I try new mame version. The reason I chose old mame (0.78) is because it's remarkably less demanding than newer ones. While I do not know for certain whether the higher demand of newer MAMEs is mostly due to simpler (and less efficient) code, or due to more accurate emulation, I'm assuming that there is a remarkably higher accuracy which has a role in the performance demand. For example, this system did not run bsnes/higan (most accurate SNES emulator) well 2-3 years ago that I tested, so I continued with SNES9X which I have no problems with.

Quote
Oh and one other thing.  Make sure in your mame.ini that's found in your Mame executable folder, that for "rompath", you have all your directories to your Mame roms listed.

I have mame.ini's rompath set to the same location as MAME.cfg's rompath. And as I wrote earlier, if there was anything wrong with the rompath or the args then MAME should fail everytime, and not fail depending on window manager related stuff (no window set "always on top") or explorer shell not running etc..
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 07, 2018, 06:43:28 PM
So, I..

* A BIOS-pack (including Neo Geo BIOS)
* A rom (Ghost Pilots)
* Extracted emu into desktop, and put the roms in C:\MY\ROMS\ (just my alias for my real rompath)
* Lanuched AM, set up MAME 0.203 as new emulator, and configured (exe: C:\PATH\TO\MAME\mame.exe, args: [romfilename], rompath: C:\MY\ROMS\)
* Created romlist

I executed AM -> MAME 0.203 -> Ghost Pilots, and a brief black screen, after a very short while, control was returned back to AM. I went ahead and created mame.ini (mame -createconfig) and changed it's roms property to point to C:\MY\ROMS. Again executed AM -> MAME 0.203 -> Ghost Pilots, screen went black, but this time without returning control back to AM. Waited half a minute, and pushed Esc, control was returned back to AM. Then thought whattahell, try again. This time the game launched, success. I closed AM. Removed the "always on top" setting for the task manager window, and launched AM -> MAME 0.203 -> Ghost Pilots again, screen went and remained black. Many seconds later I pushed Esc and returned back to AM. I tried again, and success. As I was writing THESE WORDS I decided to try again. This time I needed to Esc out of the insisting black screen two times to have success, i.e the third execution of MAME 0.203 -> Ghost Pilots. There seems to be an annoying Windows <-> AM <-> MAME conflict.

FYI, Beside SNES9X, I have also added Fusion (Mega Drive, aka Genesis) emulator, and like SNES9X, I have yet to experience problems with that.

Btw, MAME 0.203 executable has a size of 1/4 GB, while 0.78 is around 5.3 MB. I know, 0.203 emulates far more systems .... systems that I do not need (this PC will run them like shit).
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: dukpoki on November 07, 2018, 08:54:22 PM
I find it very weird that your argument is "[romfilename]".  It should just be "[name]".  If i change mine to "[romfilename]", mine doesn't work.  With that said however, you said you got it to work eventually so...*shrug*.  Next time you get a black screen, try Alt+Tab and see if it gives focus to Mame.  As far as Mame versions go, yes the newer versions are both larger in size and more demanding because of the increase in accuracy + the merging of multisystems aka merging of Mame+Mess (which happened in v0.162).
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 08, 2018, 04:59:02 AM
I find it very weird that your argument is "[romfilename]".  It should just be "[name]".  If i change mine to "[romfilename]", mine doesn't work.  With that said however, you said you got it to work eventually so...*shrug*.

As I have examined the various related settings, I can tell how AM behaves in this regard. Consider the three configurations below, and notice the outcome (final commandline).

executable: mame.exe
command arguments: [name]
rompath: C:\PATH\TO\ROMS\
outcome: mame.exe gpilots

executable: mame.exe
command arguments: [name] -rompath [rompath]
rompath: C:\PATH\TO\ROMS\
outcome: mame.exe gpilots -rompath C:\PATH\TO\ROMS\

executable: mame.exe
command arguments: [romfilename]
rompath: C:\PATH\TO\ROMS\
outcome: mame.exe C:\PATH\TO\ROMS\gpilots.zip

Notice that when args contains "[name]" it will expand to "gpilots", so if you have no mame.ini -> rompath set correctly, you then have to qualify with "-rompath [rompath]" to generate successful commandline. If args on the other hand contains "[romfilename]" then AM will expand that to "gpilots.zip" (notice the full filename, including the .zip suffix) and automatically prefix the value of "rompath" to it result in "C:\PATH\TO\ROMS\gpilots.zip".

I just like to cover all the holes so to say (including mame.ini -> rompath being valid). Normally I would have chosen config 2 (args: "[name] -rompath [rompath]") because you are exclicitly giving mame a path to (more) roms (notice the plural suffix "s"), potentially multiple ones, separated by semicolon, rather than letting MAME "figure out" that there are more roms in the single directory of that particular rom and search there for additional ones, which a user without prior knowledge may not be sure about.

So to cover all holes, one should choose config #2 and set mame.ini -> rompath to the same value as MAME.cfg -> rompath.

Quote
Next time you get a black screen, try Alt+Tab and see if it gives focus to Mame.  As far as Mame versions go, yes the newer versions are both larger in size and more demanding because of the increase in accuracy + the merging of multisystems aka merging of Mame+Mess (which happened in v0.162).

I will, thanks. But indeed AM -> MAME 0.203 is even worse experince for me: huge RAM waste, and more importantly, cannot even set some window to "always on top" and have AM -> MAME executed each and every time.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 08, 2018, 10:19:54 AM
So I tried Alt+Tab after launching AM -> MAME 0.203, and it did work (on second Alt+Tab, each time). Then I tried the same with AM -> MAME 0.78 (without having any application window "always on top"), and in the brief moment (some milliseconds) that AM GUI (layout) went away I did Alt+Tab and it did work there too. But after a while that I try AM -> MAME 0.78 again, no matter what, it does not work, period. On the other hand, I successfully launched AM -> MAME 0.203 without even needing Alt+Tab. Hehe, I'm getting tired of all this.  :D
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: dukpoki on November 08, 2018, 10:30:17 AM
Hehe, I'm getting tired of all this.  :D

Totally feel the same way at the moment because I'm having the same problem with running pcsx2 via batch files (http://forum.attractmode.org/index.php?topic=2583.0).  lol
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 08, 2018, 01:57:39 PM
Hehe, I'm getting tired of all this.  :D

Totally feel the same way at the moment because I'm having the same problem with running pcsx2 via batch files (http://forum.attractmode.org/index.php?topic=2583.0).  lol

I have read others using bat scripts as bridges. What is the actual reason for that though ?
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: dukpoki on November 09, 2018, 07:23:31 AM
I have read others using bat scripts as bridges. What is the actual reason for that though ?

Not sure really.  I'm personally trying to get batches to work because PCSX2 doesn't have a great per game config system built-in to the emulator itself in the same way say, Dolphin does.  The way PCSX2 handles it, is to have a folder with separate ini files and then launch the game via command prompt with the directory to the ini as part of the argument.   That is the only reason i'm trying to use batch scripts--to setup individual games with their own specific arguments.  Now i know there's other various ways to go about doing it for example creating lnk files or using the "custom argument" field that's built-in AM itself (press Esc+down) but I like working with batch files.  (btw there's also a limitation in lnk shortcuts where the "target" field has a maximum character limit which becomes problematic to some code/game combinations, especially games with long names.)
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: toothlessgrinn on November 09, 2018, 09:33:00 AM
this other guy is telling you you args are WRONG also ... so WHAT? DUDE YOU AINT PAYING ATTENTION! what part of ATTRACT MODE NEEDS NO HELP TO RUN MAME OF ANY KIND do you not UNDERSTAND??? im telling you your sht is wrong and so is someone else!

i have been dicking with this frontend for over 8 months trying to figure it out and one thing i know for a FACT is if your even a space off in your code/command/args IT STOPS WORKING so then YOUR ARGS ARE WRONG!!

i GENUINELY gave you my thoughts and your being a rude sob !

mine works JUST fine now and im telling you MY EXPERIENCES with it and you cant even thank a MF for trying? oh noooo....

im a troll.....

have a good day.....

Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 09, 2018, 01:06:26 PM
Not sure really.  I'm personally trying to get batches to work because PCSX2 doesn't have a great per game config system built-in to the emulator itself in the same way say, Dolphin does.  The way PCSX2 handles it, is to have a folder with separate ini files and then launch the game via command prompt with the directory to the ini as part of the argument.   That is the only reason i'm trying to use batch scripts--to setup individual games with their own specific arguments.  Now i know there's other various ways to go about doing it for example creating lnk files or using the "custom argument" field that's built-in AM itself (press Esc+down) but I like working with batch files.  (btw there's also a limitation in lnk shortcuts where the "target" field has a maximum character limit which becomes problematic to some code/game combinations, especially games with long names.)

Ok, per-game config is understandable, and I would personally go the batch script route myself.

When I was on WinXP I rememember that I could not "execute" shortcuts (lnk files) because they were Explorer-level file types and were alien to Win32 filsystem APIs. Has that changed, or do you launch shortcuts as argument to explorer ? (if it's possible then I can tell that that didn't cross my mind back then)
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: rand0m on November 09, 2018, 01:51:39 PM
I have read others using bat scripts as bridges. What is the actual reason for that though ?

Not sure really.  I'm personally trying to get batches to work because PCSX2 doesn't have a great per game config system built-in to the emulator itself in the same way say, Dolphin does.  The way PCSX2 handles it, is to have a folder with separate ini files and then launch the game via command prompt with the directory to the ini as part of the argument.   That is the only reason i'm trying to use batch scripts--to setup individual games with their own specific arguments. Now i know there's other various ways to go about doing it for example creating lnk files or using the "custom argument" field that's built-in AM itself (press Esc+down) but I like working with batch files.  (btw there's also a limitation in lnk shortcuts where the "target" field has a maximum character limit which becomes problematic to some code/game combinations, especially games with long names.)

following arguments would work provided a sub-folder with exact same name as rom is in "Game Configs" folder. You only need to create two basic game configs (templates) i.e. hardware and software then copy and rename to rom name. Few games will require fixes on top of that.

"[romfilename]" --fullscreen --nogui --cfgpath="Path\to\Game Configs\[name]"

Or you can use Spectabis (link: https://spectabis.github.io/) which can boot directly using game config profile.

@xod (thread starter) provided no reason comes to mind why you would be having this issue, have you tried MameUI? progettosnaps has archived versions, you should be able to grab mameUI v0.78.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 09, 2018, 03:58:30 PM
@rand0m

I have downloaded that, but not installed (will do another day). In the meantime, I have modified my MAME.cfg to:

Code: [Select]
exec: cmd.exeargs: /c C:\PATH\TO\mame.exe "[name]" -rompath "[rompath]" -d3d -d3dfilter 1 -d3deffect scan75 -d3dscan 75 -skip_disclaimer -skip_gameinfo 1>%USERPROFILE%\Desktop\AM-MAME-log.txt 2>&1rompath: C:\PATH\TO\ROMS\
Now, when I have a non-minimized window "always on top" and run AM -> MAME 0.78, I get the log:
Code: [Select]
loading 41e_30.rom  loading 41e_35.rom  loading 41e_31.rom  loading 41e_36.rom  loading 41_32.rom   loading 41_gfx5.rom loading 41_gfx7.rom loading 41_gfx1.rom loading 41_gfx3.rom loading 41_09.rom   loading 41_18.rom   loading 41_19.rom                       Average FPS: 59.999447 (79 frames)
But when NOT having a non-minimized window "always on top", then each time I got:

Code: [Select]
loading 41e_30.rom  loading 41e_35.rom  loading 41e_31.rom  loading 41e_36.rom  loading 41_32.rom   loading 41_gfx5.rom loading 41_gfx7.rom loading 41_gfx1.rom loading 41_gfx3.rom loading 41_09.rom   loading 41_18.rom   loading 41_19.rom                       41e_30.rom   NOT FOUND41e_35.rom   NOT FOUND41e_31.rom   NOT FOUND41e_36.rom   NOT FOUND41_32.rom    NOT FOUND41_gfx5.rom  NOT FOUND41_gfx7.rom  NOT FOUND41_gfx1.rom  NOT FOUND41_gfx3.rom  NOT FOUND41_09.rom    NOT FOUND41_18.rom    NOT FOUND41_19.rom    NOT FOUNDERROR: required files are missing, the game cannot be run.
But after a minute or so when I tried again multiple times (still without a non-minimized window "always on top"), each time I got:

Code: [Select]
loading 41e_30.rom  loading 41e_35.rom  loading 41e_31.rom  loading 41e_36.rom  loading 41_32.rom   loading 41_gfx5.rom loading 41_gfx7.rom loading 41_gfx1.rom loading 41_gfx3.rom loading 41_09.rom   loading 41_18.rom   loading 41_19.rom                       Unable to start video emulationError setting cooperative level: 88760245
What does that cooperative level imply, and that value ?

Tomorrow or the day after I'll try MAMEUI 0.78, thanks.

* edit *

And btw, in both cases, when execution of MAME 0.78 fails and when it succeeds, the args passed to MAME are exactly one and the same valid arguments, character by character.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: dukpoki on November 09, 2018, 06:49:09 PM

"[romfilename]" --fullscreen --nogui --cfgpath="Path\to\Game Configs\[name]"

Wow i feel stupid for not thinking of that. :P  Haha (at least I did eventually manage to get the batch files to work)

@xod:  Along with MameUI, another thing you could do is try one of RetroArch's really old Mame cores.  Any of their Mame cores with a date (for example: Mame 2010 core) would mean it's the older variant.  Not exactly sure which one 0.78 romset would fall under though for use, or if you'd have to download a new set.  But the older cores would be perfect for you because they would optimized for weaker hardware setups.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 09, 2018, 07:00:57 PM
@xod:  Along with MameUI, another thing you could do is try one of RetroArch's really old Mame cores.  Any of their Mame cores with a date (for example: Mame 2010 core) would mean it's the older variant.  Not exactly sure which one 0.78 romset would fall under though for use, or if you'd have to download a new set.  But the older cores would be perfect for you because they would optimized for weaker hardware setups.

Yes, that's what I had in mind. 0.78 = 2003, does RA have that ?
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: dukpoki on November 09, 2018, 09:35:42 PM
@xod:  Along with MameUI, another thing you could do is try one of RetroArch's really old Mame cores.  Any of their Mame cores with a date (for example: Mame 2010 core) would mean it's the older variant.  Not exactly sure which one 0.78 romset would fall under though for use, or if you'd have to download a new set.  But the older cores would be perfect for you because they would optimized for weaker hardware setups.

Yes, that's what I had in mind. 0.78 = 2003, does RA have that ?

Yup they do.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: progets on November 10, 2018, 12:47:21 AM
1. the mame emulator mame.ini "rompath" must always be set correctly otherwise split romsets or roms that use .chd files won't work
2. mame.cfg AM file must contain the rompath to build an AM romlist but doesn't need to be used for "args" statement (because the mame.ini "rompath" takes care of this)
3. you should never configure the AM exit key option unless the emulator doesn't provide this option (this should be blank in the AM mame.cfg)
4. you can use RA to run the mame2003 core but let there be no mistake that the RA mame2003 core and the the full mame .078 elmulator operate differently (in some cases better and in some cases worse)

See this post of links to other options that will help you to the correct fix http://forum.attractmode.org/index.php?topic=2589.msg17688#msg17688.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 10, 2018, 12:35:38 PM
1. the mame emulator mame.ini "rompath" must always be set correctly otherwise split romsets or roms that use .chd files won't work
2. mame.cfg AM file must contain the rompath to build an AM romlist but doesn't need to be used for "args" statement (because the mame.ini "rompath" takes care of this)

I already have mame.ini -> rompath set and valid, but I like to cover all holes.

Quote
3. you should never configure the AM exit key option unless the emulator doesn't provide this option (this should be blank in the AM mame.cfg)

I don't use it for MAME.

Quote
4. you can use RA to run the mame2003 core but let there be no mistake that the RA mame2003 core and the the full mame .078 elmulator operate differently (in some cases better and in some cases worse)

Whichever 0.78 edition that will will coopeate with AM is welcome. Else a later version with nearly same performance will have to do, unless it all fails, in which case I'll have to experiment with some other FEs.

Quote
See this post of links to other options that will help you to the correct fix http://forum.attractmode.org/index.php?topic=2589.msg17688#msg17688.

I have tried many, including explicit resolution (same as OS), but I understand explicit resolution is of no use for d3d renderer, is that true ? In any case, I have to have d3d since the ddraw renderer cannot be configured to give same CRT-ish quality as the 3d3 renderer (either that or I hasted in my experiment).

Btw, as I have written before, on some sessions I can alt+tab into MAME after having lanched it through AM, like some users report (regarding various emulators). But the big difference for me is that, unlike those other users, MAME quits 1-2 second later returning control back to AM, so the alt+tab has to be pressed immediately after launching. Again, that works on some sessions only (AM sessions, not MAME sessions), on others it doesn't work at all.

Thanks for the comment.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 12, 2018, 02:56:53 PM
I have now tried MAMEUI 0.78. In MAMEUI, I configured roms folder, so now the <MAMEUI root>\ini\mame.ini's rompath option points to my roms folder. Running it directly, everything is fine. Running it through AM, always complains about missing roms:

Code: [Select]
1-n3a.bin    NOT FOUND1-n4.bin     NOT FOUND1-n5.bin     NOT FOUND1-n6.bin     NOT FOUND1-n7.bin     NOT FOUND1-c11.bin    NOT FOUND1-f2.bin     NOT FOUND2-a1.bin     NOT FOUND2-a2.bin     NOT FOUND2-a3.bin     NOT FOUND2-a4.bin     NOT FOUND2-a5.bin     NOT FOUND2-a6.bin     NOT FOUND2-l1.bin     NOT FOUND2-l2.bin     NOT FOUND2-n1.bin     NOT FOUND2-n2.bin     NOT FOUND08e_sb-5.bin NOT FOUND09e_sb-6.bin NOT FOUND10e_sb-7.bin NOT FOUNDf01_sb-0.bin NOT FOUND06d_sb-4.bin NOT FOUND03k_sb-8.bin NOT FOUND01d_sb-2.bin NOT FOUND02d_sb-3.bin NOT FOUNDk06_sb-1.bin NOT FOUND01m_sb-9.bin NOT FOUNDERROR: required files are missing, the game cannot be run.
Surely it seems that there is some strange error handling going on ? I mean, it looks (refer to my previous experiences, and other users') like there is some conflict with AM <-> MAME* video/graphics, and that MAME* has flawed error handling, and instead wrongly executing code that outputs that roms are missing ? It sure looks like that, what else could it be ?

Anyway, tomorrow or the day after I will try AM -> RetroArch.

Ok, the always roms errors was due to my customization of MAME.cfg. Now that I fixed it, the error message is always:

Code: [Select]
Unable to start video emulationError setting cooperative level: 88760245
In other words, just like regular 0.78, except the roms are not listed/enumerated (regular 0.78 enumerates the roms whether there is any kind of error or not).
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: rand0m on November 13, 2018, 05:43:34 AM
The error relates to DDraw/ DirectX.
Post #2 lists some solution (dx runtime files): https://steamcommunity.com/app/343000/discussions/0/215439774852237513/
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 13, 2018, 06:44:17 PM
The error relates to DDraw/ DirectX.
Post #2 lists some solution (dx runtime files): https://steamcommunity.com/app/343000/discussions/0/215439774852237513/

I searched google myself earlier, but unfortunately by copy-pasting an entire line from error message, instead of just the errorcode + one or more words. Thanks for the link.

Even though I'm not using ddraw ? (d3d here), I'm guessing it's a d3d problem and that ddraw is just a layer on top of d3d. I believe ddraw was directly supported by gpu hardware eons ego, but I think my (although over a decade old now) gpu's ddraw driver sits atop the d3d driver. That could be an explanation. But I admit I know nothing about DirectX (programming wise), so I'm just speculating.

I'm not much in the mood of "updating" directx and reinstalling gpu drivers (the latter really) for now, so I'll try the other paths first (RetroArch etc), and if that is fruitless, I'll just have to bite the sour apple I guess.
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: xod on November 13, 2018, 07:47:41 PM
Update: Someone mentioned AM v2.0.0-rc2 in another thread, I tested it and it works, so sweet :)
Title: Re: Bear with me and this bug report please (AM not launching emulator).
Post by: toothlessgrinn on December 05, 2018, 02:13:34 PM
smmfh............