View Full Version : cp wizard help, mame compile error
whatchitfoool
03-13-2011, 10:36 AM
i cant seem to figure out how to use control panel (CP) wizard the way i want to. or any way i like for that matter.
i want to bring up the controls when mame is paused. using (1) button. and i want to resume the game with the same button.
-so, you're playing an arcade game. you press the pause button. the game is paused (in the background) and you see the control layout. you press the same button once to resume the game.
that sounds like the option (2) for cp wizard[found on CPwizard home site (http://www.headsoft.com.au/index.php?category=cpwizard), but when i try to compile it fails. im compiling 0.141, and i've tried it with the 3 U diffs from mame. im also putting in the highscore diff. so i can successfully compile 0.141 + any patches; but when i add the cp bezel patch, i fail.
...
Compiling src/osd/windows/drawgdi.c...
Compiling src/osd/windows/drawnone.c...
Compiling src/osd/windows/input.c...
Compiling src/osd/windows/output.c...
src/osd/windows/output.c: In function 'LRESULT output_window_proc(HWND__*, UINT, WPARAM, LPARAM)':
src/osd/windows/output.c:234: error: 'mame_pause' was not declared in this scope
make: *** [obj/windows/mame/osd/windows/output.o] Error 1
Finished!
0 Hours 43 Minutes and 21 Seconds Elapsed.
so does anyone know how i could do what i want to do?
whatchitfoool
03-15-2011, 02:31 PM
actually, id settle for having to have cpwizard running, using its "show key" to bring up the panel (/pause), and then using an exit key to return directly to the game. i have it set up close to this, and this recommended. but it flashes hyperspin and takes a few sec to come up, and then it only pauses the first time you do it. after that, it will still show, but not pause mame. Very frustrating.
you don't have to compile mame, i configured all without recompile
and you have to use hyperlaunch
and it is good idea to disable menu animations and window opening/minimizing animations in windows cause windows do this animation even if window is hidden in ahk script
whatchitfoool
03-15-2011, 03:37 PM
how did you do it? how does one use it with hyperlaunch?
i have all the windows stuff turned off
well in hyperhq you just change execution from normal to hyperlaunch for mame wheel
you should also disable esc hotkey in hyperlaunch script:
just comment hotkey line in mame section like this:
;*************************************MAME******** ******************************
else if (systemName = "MAME" && executable = "mame.exe")
{
hideDesktop()
;Hotkey, %exitEmulatorKey%, CloseProcess
Runwait, %executable% %romName%, %EmuPath%, Hide UseErrorLevel
Process, waitClose, %executable%
exitapp
}
and recompile
whatchitfoool
03-15-2011, 04:09 PM
im using hpyerlunch 2, and it is enabled for mame. ill try changing the esc key
whatchitfoool
03-16-2011, 09:59 AM
changing the keys didnt help. mame and cpwizard should work together outside of HS, and they dont even do that.
maybe an AHK script would help?
chillinwater
03-16-2011, 10:17 AM
shouldnt need a script unless you want cpwizard to run before and while mame is starting up.
there is a script here for that using HL 1.0
Mame\CPwizard (http://www.hyperspin-fe.com/forum/showpost.php?p=53007&postcount=28)
The Mame default pause key is "p"
if cpwizard is configured correctly to recognize mames pause key, default or one you configured in mame, and cpwizard is already running in the background (via windows start-up or Hyperspin startup)
then pressing the configured "pause" key should display cpwizard.
If not you just need a little more tweaking.
whatchitfoool
03-16-2011, 11:07 AM
it does that.
BUT, it only works once.
example
1. launch game in game in mame
2. pause
3. cpwizard comes up. (mame is paused in the background)
4. return to mame via cpwizards exit key
5. game is playing like normal
*everything is working like it should at this point
6. pause again.
7. cpwizard comes up. (MAME is NOT paused in the background)
8.return to mame via cpwizards exit key. bring up the non paused game
9. plays normaly
10. repeat 6-9
but if i exit back and start a new game, i can start at the top of the list.
on a side note, as a peeve, HS flashes between steps (1) and (2) / (6) and (7); and then again [but quicker] between (4) and (5) / (8) and (9). id like to resolve that as well, but thats just kinda nitpicking
whatchitfoool
03-16-2011, 11:19 AM
for the sake of being complete, this is the script im using for mame. hyperlunch 2, based off BBB's base and other cpwizard one.
Run, "Q:\CPWizard\CPWizard\CPWizard.exe" -emu "%systemName%" -game "%romName%" -timeout 15000
sleep, 14000
Gui +AlwaysOnTop -Caption +ToolWindow
Gui, color, 0
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%,
Runwait, %executable% %romName%, %emuPath%, Hide UseErrorLevel
sleep,1000
gui destroy
if(ErrorLevel != 0){
if (ErrorLevel = 1){
Error = Failed Validity
}else if(ErrorLevel = 2){
Error = Missing Files
}else if(ErrorLevel = 3){
Error = Fatal Error
}else if(ErrorLevel = 4){
Error = Device Error
}else if(ErrorLevel = 5){
Error = Game Does Not Exist
}else if(ErrorLevel = 6){
Error = Invalid Config
}else if(ErrorLevel = 7 || ErrorLevel = 8 || ErrorLevel = 9){
Error = Identification Error
}else{
Error = Mame Error
}
MsgBox Mame Error - %Error%
}
ExitApp
;Required
CloseProcess:
;Doesnt have to do anything but make sure to have the line before and after this line.
return
this is working fine tho, and my problems are confined to what is mentioned above
chillinwater
03-16-2011, 11:38 AM
yeah cpwizard is ported over to 2.0 already in your script.
and thats just for mame launching nothing else.
just to narrow things down abit.
try disabling cpwizard in script and realtime (close it, kill it, shut it down, whatever)
then use mames pause key (does it pause everytime as expected?)
if yes then cpwizard config problem
if no then mame config problem
if it only causes problems when used with the script then may be some conflict with running it via script while running in background problem
And for the HS flashing issue ( i get that too) I know that cpwizard supports a "blackscreen" internally if enabled to prevent that at least a little bit if turned on.
May be able to create a wrapper (invoked by a key press) that throws up an extra blackscreen before and after cpwizard pops up....hmmm I'll look into it but I'm paralyzed till I get my computer back from Sony. may be a while.
whatchitfoool
03-16-2011, 02:35 PM
mames pause works fine. i can unpause and pause ,at will, and it works every time. EVEN if i have cpwizard running.
cpwizard has a show key and an exit key. when the show key is pressed, it is supposed to pause mame, hide it, and then show cpwizard menu. (i enabled the cpwizard option to directly show only the CP). the exit key is to close cpwizard, bring mame back and unpause it.
this works the first time i do it, but any following times it does not. but if i close down and lunch again, it works the first time again.
and by work i mean pause mame. the 2nd and following times it just hids it and brings up cpwizard. mame never pauses
chillinwater
03-16-2011, 03:26 PM
Ok so this is what I do and maybe it wont work for you.
(cpwizard seems to be the problem with your description)
I have never used cpwizards "show" key" or "exit" keys to close cpwizard or to "upause" mame.
I hit mames pause key, cpwizard pops up, I navigate around a little bit, scroll down to exit and hit mames menu select key to close Cpwizard . This should be the same key you use when navigating mames tab menu and then select some sub menu.
Then I unpause Mame with its key.
(maybe this is the cause?)
Ive never had to configure much else and never had the problem your having but this is all from memory since I dont have cpwizard installed on this suck a@s loaner computer and I cant dig into cpwizard atm.
So sorry I'm afraid I cant be any help.
whatchitfoool
03-16-2011, 04:58 PM
There are now 3 primary ways to use CPW and the new default method will not mess with state saves as it does not use Mame's pause key.
Method 1 (Recommended Default):
Mame Output System ON, Use Show Key ON, Send Pause ON, Pause Mode= Message System, Detect Pause OFF (as per this image (http://www.headsoft.com.au/images/cpwpause.png))
With these settings CPW uses the Show Key set in the Input Options to display the CPW menu. This means CPW no longer interferes with save state. It also can unpause Mame automatically when you exit CPW. No diff patch is necessary!
NOTE: Using this method you cannot set the Show Key to be the same as Mame's pause key.
that is how i have cpwizar set up. works the first time and wont work after.
i have tried this on 2 diffrent systems. idk whats going on.
im currently using mame 0.141u3 with the hi score diff, if that somehow matters
whatchitfoool
03-22-2011, 06:43 PM
i got it worked out.
from the way you select buttons in Cpwizard, it is possible to bind multi keys to it. and it is possible to bind keys more then once. long story short, i ended up binding the exit key and back key to the same input. and becasue 1,l,&I can look so similar, i failed to notice. it wasnt untill a 3rd reinstall i caught what was happening.
works good now - except for it flashing HS when i pause...
(jk)