Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: akafox on February 04, 2015, 09:32:57 PM

Title: Attract-Mode and Kega Fusion
Post by: akafox on February 04, 2015, 09:32:57 PM
When I try to load Kega Fusion from attract mode kega will not load sound. I thought maybe it was because it loaded from the command line. (yeah yeah..but i test everything) No. No problem there. (Or from the GUI) Just when I load it from attract-mode. So I guess it is something do so with the sound.  i.e. Kega thinks the sound is being used so it will not let me enable sound at all in kega?   ??? Anybody got any ideas?
Title: Re: Attract-Mode and Kega Fusion
Post by: omegaman on February 05, 2015, 08:28:59 AM
I am running it through attract-mode on win 7 with no problems. It would help those who want to help you, if you gave more information like what OS you are using. 
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 05, 2015, 08:46:47 PM
Not sure how the "number one rule to get computer help" slipped my mind  :o *sigh* 3 hours sleep will do that i guess.

I am running Linux 64-bit Mint 17.
Laptop for now with 2 gigs ram and 2.0 dual core

It may be kega. There is another front-end http://www.mameau.com/mahcade/ (http://www.mameau.com/mahcade/) but it has not been updated for a year. That and it doesn't work as well as I'd like it. (Yeah Yeah I'm picky but aren't we all?  :P ) I think I had the same problem when I was using this front-end as well so I went with a different sega Emulator (Gens I think) I'm thinking it's the emulator like I said but could I gut some of yo guys to test that for me..or at least help me fix it Thanks. :) I can use Gens/g7 emulator and I do not have that problem as Kega but I can't load Gens on my "cab" for some reason
Title: Re: Attract-Mode and Kega Fusion
Post by: nitrogen_widget on February 06, 2015, 03:43:29 PM
is system sound disabled or just sound in the emulator?
If you goto the audio menu & change the quality does anything happen?
Do you have pulse audio installed?

I notice when i run attract on my linux distro i get some weird message about pulsaudio.
however i'm only running mame & i get sound in that.
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 06, 2015, 08:58:37 PM
Quote
is system sound disabled or just sound in the emulator?

No. The system sound is fine. It just seems to be Kega. it's [kega] is acting like I have no way of producing sound. As if I have no sound or the sound system is being used so it doesn't (or can't) share. Even when I try to click enable it. (i.e. Click sound . then un-tick disable sound) Kega will always give me a sound disabled message. How ever started normally kega will work just fine.

Quote
If you goto the audio menu & change the quality does anything happen?

I can change anything in the sound menu except for enabling the sound it will not let me un-check it when launched from attract-mode.

Quote
Do you have pulse audio installed?

I think so yes.Should I try to un-install it (or at least change the default (a lot of people having problems with pulseaudio on linux for a lot of things (some think it's "evil"  ;) )

I don't seem to get  errors about pulse audio when loading attract mode that I can see
Title: Re: Attract-Mode and Kega Fusion
Post by: omegaman on February 07, 2015, 07:46:52 AM
Man, my first guess was you were running linux since you used the term "GUI" in that context. Anyway, I'm an old school linux guy before the days of mint and UBuntu when distros like slackware and debian ruled the day. Back then it was much harder to find a sound driver that worked much less other dependable drivers. And, It wasn't until distros like red hat and SUSE came along that things started getting better. My long winded point is that linux always had sound issues based on primitive driver support. I am sure things are much much better now though.  But, as you already probably know hardware compatibility was always issue number one when dealing with linux and probably still is. It could very well be an attract-mode issue but I would install something like UBuntu to see if the problem still exist. I am sure Raygun will respond sooner or later.
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 07, 2015, 03:07:00 PM
I say Linux Mint but I have another computer that has Lubuntu 14.4 on it. Mint being Ubuntu based (or at least debain). However it might be attract mode. I tried a different front end for linux (mahcade/wahcade- based on mamewah) and it loaded kega, sound and all, just fine.

 However I noticed today that I can't setup my Dpad in kega for some reason. (although my mint will run it without a problem.) All my other programs find it..except kega.*shrugs*  :-\ so I might have to go with gens/g7. I'll just have to install a 32 version of linux? (i only have 2 gb anyway). But that a post for another forum.  I'll stay 64-bit if I can we can fix this.

 This does help development and furthers Attract mode in a small way I hope. I just would like to figure it out so that others after me don't have to tear their hair like I have and those who have helped me.
Title: Re: Attract-Mode and Kega Fusion
Post by: nitrogen_widget on February 07, 2015, 07:26:51 PM
Quote
is system sound disabled or just sound in the emulator?

No. The system sound is fine. It just seems to be Kega. it's [kega] is acting like I have no way of producing sound. As if I have no sound or the sound system is being used so it doesn't (or can't) share. Even when I try to click enable it. (i.e. Click sound . then un-tick disable sound) Kega will always give me a sound disabled message. How ever started normally kega will work just fine.

Quote
If you goto the audio menu & change the quality does anything happen?

I can change anything in the sound menu except for enabling the sound it will not let me un-check it when launched from attract-mode.

Quote
Do you have pulse audio installed?

I think so yes.Should I try to un-install it (or at least change the default (a lot of people having problems with pulseaudio on linux for a lot of things (some think it's "evil"  ;) )

I don't seem to get  errors about pulse audio when loading attract mode that I can see

I would install the pulse audio control panel if it isn't already and then check to see if anything is muted.
I remember having so many issues a few yrs ago with pulse audio & XBMC  where some video's had sound but some didn't.
Drove me nuts.
had to uninstall & go pure Alsa.
Title: Re: Attract-Mode and Kega Fusion
Post by: omegaman on February 08, 2015, 06:15:06 AM
Ok, reading through the thread again it seems like you've checked the obvious culprits. But, just for the sake of a sanity check lets look at some troubleshooting steps. First, linux will in some cases  select the the wrong sound output hardware depending on integrated sound or an add on card but that doesn't seem to be the issue here. Second, I would check the fusion.ini and make sure the sound is not disabled. Third, and just for the sake of trying it :

Set Sound Preferences
If you use a PC with an integrated audio device and it has no sound when playing a media file on a player, try these simple steps to set Sound Preferences for your PC. It works for me for the audio device I have.

Go to Menu > Applications > Preferences > Sound to bring up the Sound Preferences window.
Under the Hardware tab, change Profile to Analog Stereo Duplex from the drop-down menu.
Click "Test Speakers" to check if it works.
As the items available from the drop-down menus might differ depending on the hardware devices detected by the system, you might want to try other items in the menus to see if they work for your devices.
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 08, 2015, 07:07:50 PM
Well ok first I didn't un-install pulse for some reason i'm scared it will break something..so i will try in a v box first. However according to my Fusion.ini it should be using ASLA:

Code: [Select]

;---------------------------------
; Sound Options
;---------------------------------

ALSADeviceName=plughw
OSSDeviceName=/dev/dsp
UsingALSA=1
libmpg123path=/usr/local/lib/libmpg123.so
CurrentWaveFormat=1
SoundOverdrive=0
SoundSuperHQ=0
SoundDisabled=0
SoundFilter=0

I can run Kega Fusion without problem if I load it "by itself" via gui (click "start" > games > kega fusion) or via the command line (./Fusion "path to rom.zip") It loads fine sound and all. However if loaded from attractmode or whacade it will start loaded with sound disabled (even if it and not let me enable it at all when started that way. All other sound works music, videos, desktop sounds, ect. but still no sound from kega.

 I have tried this on 3 different computers (all linux ubuntu based 64-bit one desktop two laptops) still no sound when loaded from a front end.
   
    I guess the reason I find that odd is because that's how frond ends work (normally) just pass the command line over and kega runs fine from the command line. But we hate to have to type now..because you know we don't like keyboards attached to our arcade cabinets like they had in the 80's ;)
Title: Re: Attract-Mode and Kega Fusion
Post by: omegaman on February 08, 2015, 08:15:37 PM
Well then, this is definitely an odd one. I am sure the Developer will weigh-in on this sooner or later. And just to be clear, its only Fusion that is giving you a problem when launched from attract-mode? If so, can you play any ambient music when you launch fusion. That might help narrow down the problem. 
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 08, 2015, 10:02:33 PM
Quote
... its only Fusion that is giving you a problem when launched from attract-mode? If so, can you play any ambient music when you launch fusion

yes it's only fusion everything else works just fine. If I launch fusion with sound I can get no other sound to play (video, music, desktop sounds ect.). However once I disable the sound, or try to launch it from attract mode, I can play whatever sound I want (even with the emulator still running). So I guess my sound system is not "locked" (being used somehow by something) it just will not enable sound when launched from attract mode..nor will it let me enable it unless I stop attract mode. I even turned off all the sound in attract mode and disabled the sound plug in.
Title: Re: Attract-Mode and Kega Fusion
Post by: omegaman on February 09, 2015, 05:53:20 AM
I can see why you are frustrated :p  Have you tried a different emulator like retroarch? It has a nice genesis plus gx core that has been modified and supposedly 100% compatibility. I have started converting most of my emulators over to retroarch cores with great success. And most of the cores used have a high level of accuracy. It would be interesting to see if the genesis plus gx core works on your system with attract-mode. That would narrow down things even more. 
Title: Re: Attract-Mode and Kega Fusion
Post by: raygun on February 09, 2015, 08:10:26 AM
Ugh, audio on linux problems!  Unfortunately I don't think I'll be able to help much on this one...

All Attract-Mode is doing is feeding its audio data to OpenAL.  When an emulator gets launched, it stops all audio channels and forks a new process to run the emulator.

So it might be that Attract-Mode isn't doing enough to release the audio channels before it launches the emulator (?).

I'll open an issue on the bug tracker for this...
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 09, 2015, 12:29:47 PM
Quote
omegaman:
Have you tried a different emulator like retroarch?

Yes I have in fact both pico drive and gens gx. They work fine with attract mode..however I can not get more than 35fps from it. (though on the other i can get 60) I'm not sure why. Retroarch has come a long way. However it was built originally for an ARM cpu (I think) and it works great on my WII. I'll keep trying that. I'd use gens/G7 if I could get the ia32-libs to install and work. I did it once..but now they are not even in the repo!? So I might just go 32-bit for now. Oddly enough on one of my computers retroarch crashes after loading a game.

Quote
raygun:
All Attract-Mode is doing is feeding its audio data to OpenAL.  When an emulator gets launched, it stops all audio channels and forks a new process to run the emulator.

That's what I thought too. Attract mode is not running per say.."just waiting to be allowed to come back to the front of the line".

Quote
So it might be that Attract-Mode isn't doing enough to release the audio channels before it launches the emulator (?).

that's what I suspect is going on...but why just kega fusion? Works fine with everything else.

Quote
I'll open an issue on the bug tracker for this...

Thanks

   I thought it might have just been Kega Fusion. But I can get kega to load from wahcade with sound and all just fine. (At first I was having problems with whacade too but that was an error on my part.) Also I can get any (if not every) emulator to work without problem through Attract mode just not kega fusion. *shurgs*  ???

Title: Re: Attract-Mode and Kega Fusion
Post by: nitrogen_widget on February 10, 2015, 04:48:28 AM
have you tried:
http://mednafen.sourceforge.net/

or mess?
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 11, 2015, 03:50:43 PM
Yes I have tried MESS, but it's a pita and will only work when it wants to. At least for sega CD anyway.  As for mednafen I didn't know that it did sega. I just used it for my TG-16. So i'll try it. Thanks. (I had an old version of mednafen..the repositories are old I guess) Well looks like I didn't test mednafen after all. I get so sound with it through/from Attract-mode. Here is the error:

Code: [Select]
Initializing sound...
  Using "ALSA" audio driver with SexyAL's default device selection.ALSA Error: snd_pcm_open(&alsa_pcm, id ? id : "hw:0", SND_PCM_STREAM_PLAYBACK, 0) Device or resource busy
Error opening a sound device.

But I get sound from every other program (music vids ect.) even while it is running, just no sound from mednafen.

As for mess everything works fine sound and all. Maybe I am just being picky is all.
Title: Re: Attract-Mode and Kega Fusion
Post by: nitrogen_widget on February 12, 2015, 03:30:12 AM
Looks like pulseaudio might be the issue.
http://ubuntuforums.org/showthread.php?t=1412855
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 13, 2015, 11:02:24 AM
Ok so here is what I figured out. Kega Fusion will just not play nice. As for mednafen I fixed that. You have to change the settings in the conf file for the sound settings to dsl. (If you use sdl in snes9x you'll get the sound from snes 9x AND attract mode.) I got retroarch to work on another computer just fine. (I have a nNvidia gfx card in the other). dolphin, desmuMe, yabause, I can't run with my little laptop. as for pcsx and epsxe..I'm having problems running them. I'll come back and post my findings if anyone really wants to know.
Title: Re: Attract-Mode and Kega Fusion
Post by: raygun on February 13, 2015, 05:58:38 PM
Ok so here is what I figured out. Kega Fusion will just not play nice. As for mednafen I fixed that. You have to change the settings in the conf file for the sound settings to dsl. (If you use sdl in snes9x you'll get the sound from snes 9x AND attract mode.) I got retroarch to work on another computer just fine. (I have a nNvidia gfx card in the other). dolphin, desmuMe, yabause, I can't run with my little laptop. as for pcsx and epsxe..I'm having problems running them. I'll come back and post my findings if anyone really wants to know.

Ok, sounds like you are figuring it out and it might not be attract-mode after all.  That's good!  :)  Please do post your findings when you find out more.
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 18, 2015, 09:19:14 PM
Ok so it gets wierd-er. I got Kega Fusion to work just fine through attract mode. No sorry I have no idea how or what. I can run it without problem on one computer, but on another I get no sound. To make it worse I can't get the one that plays sound to notice my d-pad..on the one without sound it will find my d-pad no problem. (Yes the d-pad works with everything else)  :o I have not be able to find a clue to the problem. During this time i have made a list of emulators and fixes. If you'd like a "write up" on how to set up attract mode for linux I should be able to put one together. Here are my findings..well the best I can do anyway:

fceux works normal
gens/GS works normal
Kega Fusion does work..except it will not close from fullscreen in linux
mame works
mess works
mednafen change sound to sdl
pcsx  works
epsxe works
retoarch works..with a little effort
snes9x 1.52 works (alsa normal) (dsl both attractmode and 9x)
stella works
visualboy advance unsure
*yabause N/A (I can't run it)
mudapenplus works
nestopia works
bsnes/hagin works
zsnes works
zinc no sound from emulator even without attract mode
freedo via wine works..like crap
*dolphin I can't run it
desmuMe unsure
final burn alhpa via wine works
dgen works
Note: there is a 3DO emulator native to linux but i am having trouble running it and the main page is in russian (I think)
* My computer is old
Title: Re: Attract-Mode and Kega Fusion
Post by: raygun on February 19, 2015, 07:02:49 PM
hi akafox, it would be great if you could post the emulator configuration files for the emulators you have configured that aren't in there by default on attract-mode.  we can add them to the distribution so that there are more default configurations available to everyone...
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on February 22, 2015, 09:27:54 AM
Sure I can do that. But I won't be able to do all of them..like I said old computers. Which ones do you need or want? Just the one you don't already have huh? ;) Also do you want them posted here or a new thread. or do you just want a zip file of them?
Title: Re: Attract-Mode and Kega Fusion
Post by: raygun on February 22, 2015, 12:28:26 PM
Sure I can do that. But I won't be able to do all of them..like I said old computers. Which ones do you need or want? Just the one you don't already have huh? ;) Also do you want them posted here or a new thread. or do you just want a zip file of them?

I guess just the ones that you think might be useful to others.  They aren't huge or anything so could just be posted in a message with the Insert Code option.   Alternatively you could submit them as pull requests on github... https://github.com/mickelson/attract/tree/master/config/emulators
Title: Re: Attract-Mode and Kega Fusion
Post by: akafox on August 02, 2015, 06:02:57 AM
Yeah I know it's old..I hope it pops up as new (as reply). Ok So windows kega fusion is fine. I can use WINE in linux to run it yes but I lose performance so I really want to use native linux kega fusion. So for you peguins out there would you please test this for me..or am I the only one with this problem. I have searched yes..and I know that kega drops from full screen with the esc key when using that switch from the command line. Again works great in windows (like is should) but not linux anybody got any ideas? I have gens/g7 runs great. tried mess and retroarch get slow performance from both. Haven't tried osmoose yet...can't get it yo compile on a 32 bit system. medefen does sega consoles fine. It would just be nice to use kega that's all. Maybe i'll gripe on the forums there and someone will see it...

EDIT: I went to mednafen for sega master system. MESS will work also.