Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: fkane on August 26, 2013, 11:07:29 am
-
Built a cabinet with a single red button on the side intended to power it on and off. It's wired to an IPAC2.
Works fine if I assign this button to "sleep/wake" (apart from leaving the button lights on through my pac-drive). But, I'd rather have it actually power down. When I assign this button to "power" through the IPAC2's software, I'm able to power down OK. But, pressing it won't cause it to power up - even though it seems the USB bus still has power. I set my BIOS to allow power-up from a USB keyboard, but somehow the BIOS knows the IPAC2 isn't a "real" keyboard - it will only power up when I plug in a real USB keyboard and hit a key.
Anyone else run into this and have a solution? I'm using Mala as a front-end if that's relevant. Bonus points if anyone has a way to turn off my Pac-Drive / LED Blinky powered button lights on sleep or power down as well. I know I can configure Mala to cleanly shut everything down when it gets a certain keystroke, but the problem is getting that same keystroke to power the system back up since it's one button.
-
Hi Fkane,
I too am using an IPAC, and haven't yet done this on my system, but I was thinking about it. One thing that I noticed on my motherboard is that even if I set the system to power on via Key Press (albeit USB or PS2), there are jumpers on my motherboard (ABIT IC7-G), which need to be toggled in order for this function to work in addition to making the changes in BIOS. This might not be your issue, but it may be something to look in to.
-
It works fine with a real USB keyboard, so I suspect it's not a jumper issue.
I suppose I could just cut my computer's wires to its own power button and wire them instead to my big red button. Would that work - is there anything special about a computer power button?
-
Argh. When powering off using the case's power button, Mala prevents Windows from shutting down. Seems it is not responding to the close command Windows 7 is giving it. So, wiring my button to the case's power button wouldn't do the job either.
I think I need to have my power button tell Mala to shut itself down and then shutdown the computer - that should be possible if I leave it connected to the IPAC and tell Mala about whatever key it emulates. But, the trick is getting that same button to power the system back up. In principle that would work if the "wake on USB keyboard" BIOS function worked with the IPAC, but it doesn't on my system.
Does power on via USB keyboard press work for anyone with an IPAC, or is it something weird about my system?
-
cant you exit mala with P1 start + p2 start then shut down windows? Optionally, cant you set MaLa to shutdown windows on exit?
-
Well, yes, but this is a dedicated cabinet with no keyboard or easy access to the computer inside. I want one button to shut down Mala and Windows (that much I can manage,) but then that same button needs to power the system back on.
-
exit mala with P1 +p2 start, then wire an arcade button into the PC to shut it down.
-
Thanks. That would work, but my concern is that it's too complicated for my kids, wife, and visitors to figure out. Anything more complicated than a single power button won't fly for anyone but me. It must be possible!
-
welp, with the way I posted you can shut down the PC when mala exits, then use the power button to turn it back on. My PC has problem killing MaLa when I hit the power button. If you figure it out, be sure to post, Im curious!
-
It works fine with a real USB keyboard, so I suspect it's not a jumper issue.
I suppose I could just cut my computer's wires to its own power button and wire them instead to my big red button. Would that work - is there anything special about a computer power button?
Ahh, sorry, I missed that in your original post.
Does your IPAC work when your in your system BIOS (e.g. if you map your joy stick to the up/down arrows, can you navigate your BIOS setup menus?). This might be an indicator that the USB IPAC isn't recognized by your BIOS (it may only be working once your booted up in to the OS). If it does work however, then I agree, one would think that the "keyboard power on" function should work, but there still might be some "under the covers" protocol issues that aren't taking place with the IPAC. Its possible that you might have more success if you try the PS2 (Legacy) connection to/from the IPAC to your PC....might be worth a try.
-
You might check empardopo's allinone
http://forum.arcadecontrols.com/index.php/topic,113882.msg1209264.html#msg1209264 (http://forum.arcadecontrols.com/index.php/topic,113882.msg1209264.html#msg1209264)
I believe it corrects the mala prevents shutdown issue.
Ideally, you'd just wire the button to the poweron of thepc and config windows to do a soft power down when it's pressed again. Sounds like you basically had it that way but Mala was getting in the way, which, I believe is a known issue.
-
Good idea on trying the PS/2 interface. I'll order a cable and try that out.
If that doesn't work, I'll mess around with AllInOne and/or AutoHotKey to see if I can intercept the shutdown and force Mala to close. Thanks for the link - hadn't run across AllInOne before.
-
Wire it to the power pins on your motherboard, not the ipac.
-
The only appeal of going through the IPAC is that I could tell Mala to shut itself down cleanly, instead of resorting to some other process forcing it to close upon shutdown. I could envision a kid hitting the power key at just the wrong time leading to a corrupt file or something. If only Mala handled shutdown properly, this would be so simple - I would just wire the button the the motherboard's power switch and be done with it.
Thinking about it some more, I wonder if my BIOS wasn't recognizing my power button as a keyboard press because I mapped it to "power" in the IPAC instead of a "normal" key. I think I'll try mapping it to some normal keystroke that Mala recognizes as an exit and shutdown command, and see if that works. I'll follow up.
-
No luck there. Back to the IPAC PS/2 interface idea (plan A) and motherboard power switch / other process to kill Mala at shutdown idea (plan B.)
-
One bit of progress - I came across the attached plug-in that will safely shut down Mala when Windows 7 shuts down. Hooray! I don't know who to thank for writing it, but thanks whoever you are. So, you'd think at this point I could wire my power button to the motherboard's power switch and be done with it.
Now for the sad part - even when powered down, my computer is still giving power to the USB bus, and Mala is not issuing exit commands when shutting down using this plugin. That means I can't have Mala tell LED Blinky to shut all the lights off at shutdown, and I don't see any BIOS options for cutting power to the USB bus when it's off either. So, my "powered off" cabinet still has lights illuminated on it in whatever state they were in at shutdown.
I can't believe how hard such a simple thing is! But for people who don't have such odd BIOS's, perhaps this is useful.
-
The only appeal of going through the IPAC is that I could tell Mala to shut itself down cleanly, instead of resorting to some other process forcing it to close upon shutdown. I could envision a kid hitting the power key at just the wrong time leading to a corrupt file or something. If only Mala handled shutdown properly, this would be so simple - I would just wire the button the the motherboard's power switch and be done with it.
Thinking about it some more, I wonder if my BIOS wasn't recognizing my power button as a keyboard press because I mapped it to "power" in the IPAC instead of a "normal" key. I think I'll try mapping it to some normal keystroke that Mala recognizes as an exit and shutdown command, and see if that works. I'll follow up.
You could do what you are wanting using autohotkey or similar automation scripting engine with button attached to power pins on motherboard. Using a button connected to an ipac, I doubt there is any way you can get it to start up the system.
-
You're right - I contacted Ultimarc and an IPAC cannot start up a powered down system.
I do think AHK is my only hope for shutting off the lights. I was trying to hack the "graceful exit" plugin to call ledblinky.exe 2 before closing Mala, but that didn't work.
-
Just for posterity, here's what I ended up with. To recap, the problem is that my computer has a "feature" - an increasingly popular one - that power keeps going to the USB bus even when power is off, so you can charge your iDevices at all times. And with my BIOS, there seems to be no way of disabling it. This means my Pac-Drive-powered LED lights stay on even when the system is off, which is just silly - and my family nags me about leaving the cabinet on all the time and wasting power, even though it is in fact sleeping or shut down.
Shutting off the LED's at shutdown proved to be a delicate operation; it must be timed perfectly with other things going on at shutdown it seems. Plus, Windows' + Mala's startup time is enough to annoy a user who expects to push the power button and quickly start playing. So, I just gave up on having my cabinet's power button actually power down the system and lights. Given that power would still be flowing to my IPAC and Pac-Drive anyhow, there seemed to be little to gain from shutting down vs. sleeping. I put a piece of tape over the blinking light on the case when it sleeps, and kept my power button wired to the IPAC and mapped to sleep/wake. I also set up Windows to automatically sleep after an hour of idle time.
Now, the problem was getting my Pac-Drive lights to shut off when sleeping, and to start back up on waking. Initially I set up an AutoHotKey script to run "ledblinky.exe 2" upon sleep, and "ledblinky.exe 1" upon wake, but this ended up confusing the Mala plugin since this causes the ledblinky process to get a new process ID.
So, I set up a new screensaver animation with LED Blinky's animation editor that just does nothing, and assigned that to be LED Blinky's front end screensaver. When AutoHotKey gets notified that Windows is about to sleep, I tell ledblinky to start its screensaver - which turns off the LED's. When it wakes back up, I end the screensaver, putting ledblinky back to its previous state for Mala.
It is a sick hack, but so far it seems to work. Here's my AutoHotKey script if anyone else finds it useful (obviously substitute your own path to ledblinky - and set up that do-nothing screensaver animation first.) I compiled this script to an exe and put it in my Startup folder.
OnMessage(0x218, "func_WM_POWERBROADCAST")
Return
func_WM_POWERBROADCAST(wParam, lParam)
{
If (lParam = 0) {
; PBT_APMSUSPEND or PBT_APMSTANDBY? -> System will sleep
If (wParam = 4 OR wParam = 5) {
RunWait, c:\arcade\mala174\mala174\plugins\ledblinky\ledblinky.exe 5
}
; PBT_APMRESUMESUSPEND oder PBT_APMRESUMESTANDBY? -> System wakes up
If (wParam = 7 OR wParam = 8) {
RunWait, c:\arcade\mala174\mala174\plugins\ledblinky\ledblinky.exe 6
}
}
Return
}
-
another option would be to have the PC on a smart power strip, and your pac-drive plugged into a powered usb hub, which is plugged into one of the slave ports on the smart power strip..when the pc shuts off, the power strip kills power to the other outlets and therefore shuts off the usb hub.
-
Now, the problem was getting my Pac-Drive lights to shut off when sleeping, and to start back up on waking. Initially I set up an AutoHotKey script to run "ledblinky.exe 2" upon sleep, and "ledblinky.exe 1" upon wake, but this ended up confusing the Mala plugin since this causes the ledblinky process to get a new process ID.
So, I set up a new screensaver animation with LED Blinky's animation editor that just does nothing, and assigned that to be LED Blinky's front end screensaver. When AutoHotKey gets notified that Windows is about to sleep, I tell ledblinky to start its screensaver - which turns off the LED's. When it wakes back up, I end the screensaver, putting ledblinky back to its previous state for Mala.
Very impressive solution! :cheers: