Author Topic: Attract Mode as Shell loads but sound doesn't work at the beginning  (Read 3878 times)

pirracas77

  • Newbie
  • *
  • Posts: 7
    • View Profile
Hello:
I have set up Attrac Mode as shell.

The fist problem is that Attrac Mode gives me a black screen after the splash logo.
It shows again something just after moving the joystick or push some buttoms.
After that the problem is that I have no sound until I run a game. Like even the intro video doesnt play sound. As soon as I run and quit any game I then have menu sounds, etc.
It seems like all necessary Windows items are not yet loaded.

I don't have this problem if I run Windows normally and then, I launch AM.

I'm running AM 32bits.
« Last Edit: December 21, 2020, 06:16:31 AM by pirracas77 »

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #1 on: December 20, 2020, 10:16:59 PM »
-check that sounds are correct activated
>check that main sounds are activated and not disabled
>check that any external sound software switches correctly (and of course, that drivers of sound card works correct)

-disable console in AM:
start AM > press TAB key > General > Hide Console : yes

-try another version of AM:
>the newest version of AM
>an earlier version/former version of AM

-try another architecture of AM
>x86 version of AM
>x64 version of AM

-modify properties of .exe > properties > compatiblity > set hook : run as administrator > OK
right mouse button on attract.exe >
« Last Edit: December 21, 2020, 12:31:32 AM by progets »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #2 on: December 21, 2020, 12:35:12 AM »
I split your post into a new thread. That post was a couple of years old and AM has been modified a lot since then.

Let people know what OS and version of AM you are running where you are having the problem.

Check your attract.cfg to make sure there are lines like these in there.
Code: [Select]
sound
sound_volume         100
ambient_volume       100
movie_volume         100
« Last Edit: December 21, 2020, 12:36:59 AM by progets »

pirracas77

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #3 on: December 21, 2020, 12:54:07 AM »
Thanks a lot for your quick answer.

-check that sounds are correct activated
>check that main sounds are activated and not disabled
>check that any external sound software switches correctly (and of course, that drivers of sound card works correct)
Yes, the sound works again just running/exit a game.

Quote
-disable console in AM:
start AM > press TAB key > General > Hide Console : yes

Yes, It was already disabled.

Quote
-try another version of AM:
>the newest version of AM
>an earlier version/former version of AM

I'm currently running 2.6.1. Any advice about versions to try?

Quote
-try another architecture of AM
>x86 version of AM
>x64 version of AM

I'm running a windows 32 bit version in a old PC, so I cannot choose here

Quote
-modify properties of .exe > properties > compatiblity > set hook : run as administrator > OK
right mouse button on attract.exe >

I dont have this option in my Windows XP.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #4 on: December 21, 2020, 12:58:17 AM »
Windows XP is no longer supported by AM. Search the forum and you can find a modified version (just for XP) that might work for you.

You can also try older versions of AM that did support XP but I think they are a few years old.
« Last Edit: December 21, 2020, 01:02:24 AM by progets »

pirracas77

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #5 on: December 21, 2020, 01:02:15 AM »
Windows XP is no longer supported by AM. Search the forum and you can find a modified version (just for XP) that might work for you.

Really? I downloaded mine from http://attractmode.org/download.html

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #6 on: December 21, 2020, 01:11:57 AM »
Your OS is almost 20 years old. Even MicroSoft hasn't supported it for years.

To get it to work you'll need to use FFmpeg 3.4 or older which is in the notes at URL you mention (http://attractmode.org/download.html).

If the older version of FFmeg doesn't work, you can likely get it to work but maybe not with the latest version of AM.

pirracas77

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #7 on: December 21, 2020, 02:06:01 AM »
Your OS is almost 20 years old. Even MicroSoft hasn't supported it for years.

To get it to work you'll need to use FFmpeg 3.4 or older which is in the notes at URL you mention (http://attractmode.org/download.html).

If the older version of FFmeg doesn't work, you can likely get it to work but maybe not with the latest version of AM.

thanks for the suggestion.

AM is working very well for me. Only this issue appears when I set up it as shell. I will try with FFmeg different versions anyway.


pirracas77

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Attract Mode loads but sound doesn't work
« Reply #8 on: December 21, 2020, 06:02:59 AM »
Just one strange behaviour.

The behaviour is normal if I launch attract-console.exe instead of attract.exe. The startup is faster and the sounds work from the beginning.

Does it give you any clue?

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode as Shell loads but sound doesn't work at the beginning
« Reply #9 on: December 21, 2020, 10:43:11 PM »
Going back just a couple of years AM only had a console mode. The no console .exe is newer so most people have never ran Windows XP using a no console .exe. I don't know if it has anything to do with your issue but it's worth mentioning.

You say that your hardware is old, which also means it's slow. It's possible that you need to introduce a pause or sleep statement before running AM as the shell because your computer hasn't loaded all the drivers (i.e. sound) when it launches AM.

I'll also mention that linux requires a lot less resources than windows. You might consider running linux on your old hardware to get the best performance. If you have a spare hard drive or USB stick you might give this a try without scrapping your existing Windows XP build.

One last though, run AM was a shell using attract.exe and then run a game to get the sound working in AM. Examine the \attractmode\last_run.log for differences in the output before and after the game is run. Save this log as a different name if you don't see anything. Next run AM as a shell using the attract-console.exe run a game and exit. Now you can compare the two last_run.log files for differences.
« Last Edit: December 21, 2020, 11:12:47 PM by progets »

pirracas77

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Attract Mode as Shell loads but sound doesn't work at the beginning
« Reply #10 on: December 23, 2020, 05:43:56 AM »
Thanks for the suggestions.

I'm sure the issue is nothing to do with AM but to the operating system.

I finally managed to work it cheating the SO.
I mean, I load previously a simple "cmd.exe" before AM is lauched. With this, I ensure that all drivers needed by AM are loaded first of all.

I gather all this things in a .bat file and then I call this file as shell in the windows registry.

 
Code: [Select]
@echo off
start "" /min C:\WINDOWS\system32\cmd.exe
start "" /b C:\Attract-Mode\attract.exe
taskkill /F /IM cmd.exe

I get almost a complete invisible OS. Just a little minimized window previous to AM.

I wonder if there is another way to ensure load all items needed...


Regarding to linux, well, I would be glad to use it but I'm not sure if all my emulators have a replication in linux (i.e. visualpinball, daphne)



hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Attract Mode as Shell loads but sound doesn't work at the beginning
« Reply #11 on: December 23, 2020, 02:21:22 PM »
@ pirracas77
probably you can remove this little windows with this tool : bat to exe converter.
with this tool you can create hidden / invisible exe files (batch files, thats suppress cmd window).
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

pirracas77

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Attract Mode as Shell loads but sound doesn't work at the beginning
« Reply #12 on: December 27, 2020, 06:19:26 AM »
Thanks @hermine.potter.

Unfortunatlly this small minimized window  is due to cmd.exe execution. There is no way to hide it.

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Attract Mode as Shell loads but sound doesn't work at the beginning
« Reply #13 on: December 27, 2020, 08:20:31 AM »
tested and compiled with this code:
Code: [Select]
@echo off
start "" /min C:\WINDOWS\system32\cmd.exe
start "" /b calc
ping 127.0.0.1 -n 20
taskkill /F /IM cmd.exe
cmd popup suppressed

AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM