The NEW Build Your Own Arcade Controls
Main => Software Forum => Topic started by: sega_mad on July 24, 2011, 04:09:05 pm
-
Tittle pretty much says it all.
Only last about 1 second (sounds like a C.D stuck on a single note, and trying to replay it really fast)
Only does it when installed in cabinet running genuine Arcade screen, if I run the same computer on a VGA screen, it exits perfectly!!
It's also odd that when I exit the Model 2 emulator (which is very similar to CPS3), it does not display this issue??
Thanks
-
Yup they do that. It's a bug in the sound drivers in mame.
-
Thanks for the answer,
But I'm running CPS3...not MAME...will that still affect it?
Like I said, doesn't do it on my computer screen, only Arcade screen..with JPAC.
Thanks
-
Thanks for the answer,
But I'm running CPS3...not MAME...will that still affect it?
Like I said, doesn't do it on my computer screen, only Arcade screen..with JPAC.
Thanks
You are going to have to be more specific..... CPS3 refers to "capcom play system 3." That is the name of the real life pcb system. If there is an emulator (perhaps nebula's cps3 emulator?) then it is most likely based upon mame's source and therefore has similar issues that mame would.
Typically whoever makes a stand-alone system emulator also contributes source code for mame's drivers and vice-versa.
-
Thanks for the answer,
But I'm running CPS3...not MAME...will that still affect it?
Like I said, doesn't do it on my computer screen, only Arcade screen..with JPAC.
Thanks
You are going to have to be more specific..... CPS3 refers to "capcom play system 3." That is the name of the real life pcb system. If there is an emulator (perhaps nebula's cps3 emulator?) then it is most likely based upon mame's source and therefore has similar issues that mame would.
Typically whoever makes a stand-alone system emulator also contributes source code for mame's drivers and vice-versa.
Well the MAME driver is mine, and there was a similar issue in MAME.
On exit CPS3 dumps out a rather large NVRAM file containing the current state of the machine (because they store the entire game in Flash/NVRAM, so rather than a ~1kb file like most games it's huge)
This used to cause the sound in MAME to stutter, because MAME shut off the sound system AFTER saving NVRAM files and such. With tiny files you didn't notice the delay, with the huge CPS3 files you did.
Now MAME mutes the sound before attempting to exit, thus preventing it from doing this.
I guess the CPS3 emu has a similar issue.
The obvious disadvantage here is that the CP3 emulator is closed source, so there is no easy fix.
-
Does it still stutter if you use Alt+F4 to kill it?
If not, an autohotkey script that kills the process instead of letting the emulator exit normally might be a workaround.
Esc::
Process, Close, CPS3.exe
(replace CPS3.exe with whatever the exe for the emulator is, I'm not familiar with it)
-
Does it still stutter if you use Alt+F4 to kill it?
If not, an autohotkey script that kills the process instead of letting the emulator exit normally might be a workaround.
Esc::
Process, Close, CPS3.exe
(replace CPS3.exe with whatever the exe for the emulator is, I'm not familiar with it)
Read what Haze just posted (thanks btw). If you kill it instead of letting it shut down properly then it won't save your progress. Since some of the fighters unlock characters on a time-based system, this could be a bad thing.
My ahk is a little rusty, but the preferred solution would be to:
1. Upon the press of the exit key mute the system volume.
2. Wait until the currently running process (the cps3 emulator) closes.
3. Un-mute the system sound.
-
Don't have time to work on a full solution or test anything, but here's here's something to get you started.
Adjust the sleep time more or less until it mutes for the duration of the stutter.
Esc::SoundSet, +1, , mute ;Mutes
Sleep, 1000
SoundSet, -1, , mute ;Unmutes
ExitAPP
return
-
Hi Bad mouth.
Sorry for the slow reply....been away on work
Thanks for helping out...
I put you script in the mame.cmd file, at the end of the CPS3....like this, but must have done something wrong as it didn't work.
Can you give me detailed instructions please...I can get a little lost
:cps3
cd C:\Program Files\AutoHotkey
autohotkey.exe C:\emulators\m2.ahk %1
Esc::SoundSet, +1, , mute ;Mutes
Sleep, 1000
SoundSet, -1, , mute ;Unmutes
ExitAPP
return
exit
Cheers
Sega_mad
-
I put you script in the mame.cmd file, at the end of the CPS3....like this, but must have done something wrong as it didn't work.
It's part of an autohotkey script, it gets added to the .ahk script, not the cmd file
:cps3
cd C:\Program Files\AutoHotkey
autohotkey.exe C:\emulators\m2.ahk %1
Looks like the cps3 part of your .cmd script is pointing to a M2 ahk script?
Do you have an autohotkey script that launches cps3?
Can you give me detailed instructions please...I can get a little lost
Sorry, but I don't have the time to spend on it. Oddly enough, the only free time I have is at work :lol and I'm not installing ahk on my work computer.
If you can't figure out how to incorporate it into your current ahk script, or aren't using an ahk script to launch cps3, just copy and past this into notepad:
Esc::SoundSet, +1, , mute ;Mutes
Sleep, 1000
SoundSet, -1, , mute ;Unmutes
Then save it as mute.ahk (all file types)
Run it before you run cps3 and see if it works at all.
Since it doesn't have an exit, you'll have to right click on the autohotkey icon in the system tray or
use task manager to stop the script before making changes to the sleep time.
If you get it working the way you want, create a shortcut to it, then copy and past the shortcut into your start folder.
(google how to find your start folder if you need to)
That will make the script run every time your computer boots up and it will run all the time.
(every time you hit esc, it will mute for a second, no matter what programs are running)
It's the simplest way I can think of without getting into your ahk scripts.
If you are launching cps3 through an ahk script, please post a copy of that.
-
Hi Bad Mouth
I really appreciate your time....I know what it's like to have limited time to pursue hobbies (5 and 7 yr old kids)!!
I am running a ahk file on startup of the CPS emulator...this is to hide the splash screen of the emulator on startup.
I can see what it's doing, but have no idea how to write this stuff. I had the same issue with the model 2 emulator (written by the same guy)...and copied and pasted the fix from that to hide this splash screen.
Below is that script...
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
sleep 500
splashimage, off
esc::
send !{F4}
exitapp
Cheers
Sega_mad
-
This should combine them
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
Sleep, 500
splashimage, off
esc::
send !{F4}
SoundSet, +1, , mute ;Mutes
Sleep, 1000
SoundSet, -1, , mute ;Unmutes
exitapp
-
A suggestion....
instead of the sleeps how about some "WinWaitNotActive Model" calls instead? Some games exit quicker than others afterall and I'm pretty sure the window exists until after the save.
-
Something like this perhaps?
esc::
send !{F4}
SoundSet, +1, , mute ;Mutes
WinWaitNotActive, Model
SoundSet, -1, , mute ;Unmutes
exitapp
Worth a try anyway.
-
Hi Headkaze,
Thanks for the reply.
But it didn't work.
Is there something missing in the script......I don't see anything about mute or sound??
Cheers.
-
I see you've just added some script. Do I just add that after the code you already wrote for me?
Cheers
-
It was a modification to the first script in Reply #11.
The following line
Sleep, 1000
Changed to
WinWaitNotActive, Model
The idea there is so it waits for the window to close before unmuting the sound again. If there is still sound try the sleep instead.
-
ok, still no go :'(
This is the ahk script as it stands now....
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
sleep 500
splashimage, off
esc::
send !{F4}
SoundSet, +1, , mute ;Mutes
WinWaitNotActive, Model
SoundSet, -1, , mute ;Unmutes
exitapp
Any thoughts??
-
Might try muting before sending the keys to close the program?
esc::
SoundSet, +1, , mute ;Mutes
send !{F4}
WinWaitNotActive, Model
SoundSet, -1, , mute ;Unmutes
exitapp
-
I got those mute lines off the interwebs. Never tried them before just now. :-[
They don't work. :angry:
I'll refrain from posting stuff I haven't used from now on.
(slinks away in shame)
-
Bugger......so is this not possible :'(
-
Try this....
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
sleep 500
splashimage, off
esc::
Send {Volume_Mute};Mutes
send !{F4}
WinWaitNotActive, Model
Send {Volume_Mute};Unmutes
exitapp
(EDITED: moved mute before the closing of the emulator...figured it might help, couldn't hurt)
-
I really am sorry for posting something I hadn't used.
Those lines were from an example I found and are listed on the autohotkey website:
http://www.autohotkey.com/docs/commands/SoundSet.htm (http://www.autohotkey.com/docs/commands/SoundSet.htm)
But they had no effect when I tested it just now.
Send {Volume_Mute} works as expected.
-
No stress. Thanks for helping me out. Off out with family now. Will try when I get home.
Fingers crossed.
Thanks again for all your help.
-
But they had no effect when I tested it just now.
I think that command only works for <= Windows XP
-
Pulling hair out now :'(
Still no go.....
Do I need to mention that I'm using a J-PAC, as opposed to a keyboard??
If I run the CPS3 emulator on its own (outside of Mala, on exit it will stutter also).
If I take my computer out of the cabinet (so no J-Pac), and run it on a LCD screen (instead or Arcade CGA screen)...there is no stutter??
Will the program closemul be any help...not that I know anything about it??
Thanks for all your help to date
-
Have you got Windows 7 or Vista? If so check out this (http://www.autohotkey.com/forum/topic39141.html)
-
Nah.... Running Tiny XP
-
Does this work?
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run whatever you type at the command line to run this
WinWaitActive, first few letters of launch window name that you want to hide
WinWaitNotActive, first few letters of launch window name that you want to hide
sleep 500
splashimage, off
return
$esc::
soundget, volume ;stores the current level of the master volume in a variable called "volume"
soundset, 0 ;sets the master volume to 0, aka mute
send {esc} ;sends escape to exit the emulator
sleep 3000 ;this can be adjusted as necessary
soundset, %volume% ;sets the master level to it's level before we muted it
exitapp ;exits the script
This is to be used in conjunction with Mala and the mame.cmd file we discussed in the other thread.
To me this seems like it should work, but if it doesn't, tell us exactly what seems to be happening and we'll see if we can fix it.
EDIT: Changed the run line in the script, this needs to be whatever you type at the command prompt to run the emu with %1% where the rom name would go.
-
Hi Nits,
Thanks for helping out again
Here is the ahk file. I only used the exit part, as the hiding bit is working perfectly (like you did for model 2)
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
sleep 500
splashimage, off
$esc::
soundset, volume ;stores the current level of the master volume in a variable called "volume"
soundset, 0 ;sets the master volume to 0, aka mute
send {esc} ;sends escape to exit the emulator
sleep 500 ;this can be adjusted as necessary
soundset, %volume% ;sets the master level to it's level before we muted it
exitapp ;exits the script
It's partly working.
it is exiting the emulator without stuttering...but that is where the good news ends.
Now it is muting the sound permantly....I only found this out by looking in the "sound and audio devices"...and saw it muted.
The other problem is the emu is not exiting...it's just minimising.........which is a problem, as it minimises to the botom left of the screen, it blanks out part of my nice layout.
If I start another game, there is no sound at all.
But I think we are making progress.
Cheers
-
Ok I'll tag in:
Looking at first glance:
Again, my ahk is rusty, but the very first "soundset, volume" should be changed to "soundget, volume"...... You aren't storing anything with soundset ;)
The script isn't actually exiting anything. It's exiting itself, but in terms of shutdown procedure all it is doing is sending the "esc" key to the emulator. We learned from previous attempts that send key isn't working on your system so that won't work.
Pretty sure the "$" in front of the esc:: blocks the esc key right? Well why are we doing that? We just need to detect when esc is pressed, and run our "muting" function when it is... no need to block the key seeing as how esc is also the key to exit the emulator.
So change "$esc::" to "esc::" and remove "send {esc}"
-
Again, my ahk is rusty, but the very first "soundset, volume" should be changed to "soundget, volume"...... You aren't storing anything with soundset ;)
Yep, easy typo to make, do it myself all the time. I actually thought it was my typo at first. Anyway, it should be soundget.
The script isn't actually exiting anything. It's exiting itself, but in terms of shutdown procedure all it is doing is sending the "esc" key to the emulator. We learned from previous attempts that send key isn't working on your system so that won't work.
Send key is working on his system for his Model 2 script in that other thread. So I'm thinking maybe escape just minimizes this emu and doesn't exit it? How about subbing in "send !{F4}" (without the quotes of course) instead of "send {esc}"?
Pretty sure the "$" in front of the esc:: blocks the esc key right? Well why are we doing that? We just need to detect when esc is pressed, and run our "muting" function when it is... no need to block the key seeing as how esc is also the key to exit the emulator.
So change "$esc::" to "esc::" and remove "send {esc}"
The $ prevents the hotkey from activating itself. Otherwise, pressing esc sends esc, which sends esc, which sends esc...and so on. It might not have been necessary here since the script exits anyway, but I'm in the habit of using $ whenever a key sends itself.
The $ could be removed now since send {esc} isn't working anyway.
-
This is what I have now
Emulator keeps running in the backround (after exiting)...I can here the game playing.
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
sleep 500
splashimage, off
esc::
soundget, volume ;stores the current level of the master volume in a variable called "volume"
soundset, 0 ;sets the master volume to 0, aka mute
sleep 500 ;this can be adjusted as necessary
soundset, %volume% ;sets the master level to it's level before we muted it
exitapp ;exits the script
If I exit Mala, then in the taskbar the CPS3 emulator is running
-
It's still running because you need a command underneath esc:: which will exit the emulator. What do you normally press to exit?
-
Nitz + Headkaze + Howard_Casto
Thankyou thankyou thankyou very much.
it's all working now
Nitz's last suggestion was the fix...you're a legend :burgerking:
This is my .ahk file now
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\other_emus\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
sleep 500
splashimage, off
esc::
soundget, volume ;stores the current level of the master volume in a variable called "volume"
soundset, 0 ;sets the master volume to 0, aka mute
send !{F4}"
sleep 500 ;this can be adjusted as necessary
soundset, %volume% ;sets the master level to it's level before we muted it
exitapp ;exits the script
Now all I need to do is fix the "drunken Muppets" window box showing on starup on my zinc games.
http://forum.arcadecontrols.com/index.php?topic=113372.0 (http://forum.arcadecontrols.com/index.php?topic=113372.0)
Nitz,
I applied the same theory of hidding splash screens to Zinc as We've done the CPS3 and Model2...but it didn't work.....it just stayed as a black screen.
I adjusted the sleep time...but no difference.
Any thoughts?
Thanks so much, once again
Sega_mad
-
I applied the same theory of hidding splash screens to Zinc as We've done the CPS3 and Model2...but it didn't work.....it just stayed as a black screen.
I adjusted the sleep time...but no difference.
Any thoughts?
Can we see your script for that?
-
Bugger......deleted it.
Will sort it later on tonight, and post.
Cheers
-
Ok,
Tried to re-create it
Drunken Muppets still shows up
mame.txt = mame.cmd
zinc.txt = zinc.ahk
Cheers
-
I edited your mame.cmd and attached it. Try that. I don't think you even need the ahk script for this actually.
-
Hi Nitz,
No that didn't work. :'(
All I could see was you changed the zinccab to zinc, and stopped it from running the ahk program.......is that right?
I was using zinc cab to configure the controlls, as nothing works under zinc otherwise.
anyway..the "drunken muppets" box still showed up.
-
Please forgive me if I'm wrong (i'm pretty slow at this stuff), but if I'm using if "%1" == ......... then shouldn't Mala hide the dos box like it does in MAME?...is this the same as how you run your zinc games?
Are you using Zinc 1.1...maybe you have an older version that works with Mala?
Cheers
Sega_mad
-
shouldn't Mala hide the dos box like it does in MAME?
Yes it should, I'm really not sure why this isn't working for you. :-\ I'm sure I was running my zinc games this way, but it has been awhile since I've played with it. I'm kinda busy and tired tonight, but I'll try to find some time this weekend to inspect my setup and see if we can get to the bottom of this. Hang tight til then.
-
Cheers mate, much appreciated.
Worst case you could zip your Mala and Zinc files and send them.
"Loadman" said this "MaLa can only hide the initial dos box when it fires off the initial command line." It has no control on what the emu displays, when I was asking earlier under the MALA forum http://forum.arcadecontrols.com/index.php?topic=113372.0 (http://forum.arcadecontrols.com/index.php?topic=113372.0)
Thanks so much.
Have a good weekend.
-
I'd send you a zip of my files, but I don't have them on this machine. May have to grab them from my other machine this weekend though if we can't sort this out.
Before I sign off for the night, here are a couple more things you could try:
Refresh the main gamelist. I kind of doubt this is gonna work in this case, but it's worth a shot, sometimes it fixes little quirks like this when you've changed your configuration somehow.
If that doesn't work, try a fresh install of both Mala and Zinc and see if that fixes it.
-
Well there is some improvement...
I'm not getting the "drunken muppets" now, but on startup I now get a white line down the left side edge of the screen, and along the bottom...and they stay there for the whole game.
Also the frames per second (FPS) shows..and stays the whole game, in the top left corner??
I was already running the latest MALA (only just updated last week), so just downloaded and installed Zinc again.
So just need to remove the lines and FPS
Cheers
-
Update...update..update!!
;D ;D ;D
All good now.
With the reinstall it got me thinking....so I tried another render file...and that was the fix.
I still have to point the exe file to zinc cab..as this has all the default file for the street fighters...if I just point it to zinc then none of the buttons work.
If this is how you do yours, how do you configure your controls?
The only problem I have is with Tekken 1 and 2..if player 1 does a left kick, both players kick!!
Any thoughts on that one?
I have to thank you again for all your help...could never have got it looking so good with out you.
Would just love to get Tekken playing now.
Thanks again
Sega_mad
-
Hi Nitz.
Still playing around with Tekken........it's driving me Nutz!!
Anyway, I have managed to configure all the buttons for Tekken using ZincFe.exe...and if I launch ZincFe it's totally playable...but under the mame.cmd I can't make it launch the Front End thru Mala, and thinking about it, I probably don't want the Fe loading...it needs to go straight to Zinc.exe.....correct??
I'm wondering how you have yours configured??
Are you using an Arcade 6 button setup?
Maybe I could try your controller files? (could you .zip up your complete Zinc folder, less the roms)??
I'm so close...
Frustrating, because the default settings in ZincCab work fine for the SF EX games, just not Tekken!!
Thanks
-
I have to thank you again for all your help...could never have got it looking so good with out you.
No problem, always glad to help out. :cheers:
I was planning to get back to you on the weekend, but had a crazy weekend and now week with work and family obligations.
I don't have access to my emulation rig ATM, but I can tell you that I also used ZincFE to setup my controls and everything works fine for me. You should be able to just set your controls with ZincFE and have Mala go straight to Zinc.exe using the method we've discussed.
I would try this: Reinstall Zinc fresh (don't delete your old setup though just in case), place ZincFE in the same folder, set the controls, and try running zinc.exe from the command line. If that works, try running it from Mala.
I'm not sure what ZincCab does, but I'm using something called AmaZinc to setup my video options. I have that in my Zinc folder as well.
If you can't get this running, I'll zip my Zinc folder sans roms and post it here when I get the chance.
-
Hi Nitz,
Thanks for the reply.
I tried a reinstall...but still same result.
Would you be kind enought to zip you zinc folder (without the Roms), and post here.
Thanks again.
Sega_mad
-
OK, here you go, let me know if this helps you figure things out or if you have any more questions. :cheers:
-
Hi Nitz,
That did the trick ;D ;D ;D
I'm a very happy boy!!
One last thing...on Tekken you have it configured to not use the first punch and first kick ie using buttons 2+3+5+6.
How do I reconfigure it, to use buttons 1+2+4+5.
Cheers, and thanks again for all your help...I'm really stoked!!
Sega_mad
-
Cool, glad I could help again. :cheers:
As for reconfiguring buttons, try running ZincFe.exe, click options, then controller setup. You can use the drop down boxes to set the controls to whatever you want. If your CP is setup for mame defaults, it sounds like you're wanting the following:
Left Punch = Left Ctrl
Right Punch = Left Alt
Left Kick = Left Shift
Right Kick = z
Just set it up like that and you should be good to go!
-
Ok, will give it a crack...and player 2 buttons are??
Update.........
A quick google gave me the player 2 configurations.
All setup now!!
Thanks soooo much, once again.
You're the man :D
-
Nitz, if you're still watching........ Hope you can help.
I'm building a rig for a mate. After installing the operating system, I copied across all the files.
Everything is working correctly, but the CPS3 emulator takes about 10 seconds to exit.
Any idea why this would happen, as I'm using the exact same scripts you wrote for me last time.
Thanks.
-
Try running the emulator with no FE and no scripts running. Do you have the same problem?
-
Didn't think of that. Will try tomorrow.
Still use the escape button to exit?
Thanks for the quick reply.
Cheers
-
Hi Nitz,
Thanks for taking a look at this problem.
The new rig is only a 1.8Ghz CPU, but plays the CPS3 emu games fine......anyway...... that didn't work. When I used escape to exit, all it did was minimise the screen, and the game kept playing.
Here are the AHK and MAME.CMD files if they help.
AHK......
splashimage, C:\emulators\blackimage.bmp, B
setworkingdir, C:\emulators\cps3
run emulator %1%
WinWaitActive, Model
WinWaitNotActive, Model
sleep 500
splashimage, off
esc::
soundget, volume ;stores the current level of the master volume in a variable called "volume"
soundset, 0 ;sets the master volume to 0, aka mute
send !{F4}
sleep 500 ;this can be adjusted as necessary
soundset, %volume% ;sets the master level to it's level before we muted it
exitapp ;exits the script
MAME.CMD
if "%2" == "C:\emulators\mame141" goto mame141
if "%2" == "C:\emulators\other_emus\cps3" goto cps3
if "%2" == "C:\emulators\other_emus\zinc" goto zinc
sleep 2
mame.exe %1
exit
:zinc
sleep 2
cd C:\emulators\zinc
zinc.exe %1
exit
:cps3
sleep 2
cd C:\Program Files\AutoHotkey
autohotkey.exe C:\emulators\m2.ahk %1
exit
:mame141
sleep 2
cd C:\emulators\mame141
mame.exe %1
Cheers
Sega_mad
-
Are you sure that escape is the exit key for that emulator? My guess is that escape causing it to minimize is normal behavior for that emulator and that the exit key is actually something else.
After looking at the script, one thing that jumps out at me is that esc is being used to do some SoundGet and SoundSet commands. It's a known issue that those commands are broken on Vista, 7, and I'm guessing probably 8 as well. That could be causing something to glitch. If your friend is on one of those os's I can suggest a workaround and see if that helps.
:cheers:
-
Hi Nitz,
Escape is the exit key. (I think ahk takes care of that).
I'm building the rig for him.
I've used all my settings, including tiny XP (hacked/stripped down version).
No other changes??
-
Escape is the exit key. (I think ahk takes care of that).
I was wondering if you get the 10 second exit without any scripts running though. When you exit using the normal exit key or Alt-F4 with no scripts running, what happens?
Unfortunately, if he's got the same OS as you and all the same settings and files, it's pretty tough for me to tell what the problem could be without being able to actually inspect his setup.
-
Nitz,
You're right, no script...... ALT F4 and it exits straight away.
So must be something in the script...... Odd that it works for my rig?
Anyway, any idea on the fix?
:cheers:
-
Solved.
I figured it must have been something in the script. I deleted all the sound muting parts, and now it exits straight away, only a very small sound stutter on exit, sometimes not even noticeable.
Thanks for pointing me in the right direction.
:cheers:
-
:applaud:
:cheers: