Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: DJMattB241 on January 26, 2014, 11:47:59 pm
-
Hey all,
Is there any way to bind a key to just bring up the cheat menu? I know you can bring up the menu and go to cheats, but I'd rather not expose all the control remapping options and video options and stuff, but allow for the cheats.
Alternatively, is there any way to make all of that read-only except the cheats? Or have it not save once you leave the game?
Basically I have a cheat button, but I don't want people to be able to jack up the controls and stuff.
-
I don't think there's a hotkey specifically programmed to do this right out of the box with MAME. However, there are other software solutions that you could look into to do what you want in the background while MAME is running. Autohotkey is such a utility that can be set to execute keypresses. For example: You could write a script that when tab is pressed, Autohotkey will automatically send keyboard commands to go to the cheat menu with that single keypress. (Down 3 or 4 times and the enter key to get to the cheat menu). If you have Hyperspin as your frontend, you can integrate this by using Hyperlaunch which has Autohotkey support - not sure which Front end you are using).
Read more here: http://www.autohotkey.com/docs/Hotkeys.htm (http://www.autohotkey.com/docs/Hotkeys.htm)
In the meantime, you could always back up your CFG folder so that if the controls get jacked up, you can just restore the folder from your back-up.
DeLuSioNaL29
-
Simulated keypresses don't work on mame, remember?
You'd have to use v-joy or similar joystick trickery.
Probably your most realistic bet is to try to get the feature added to HBMAME or a similar build.
-
Make your config files not writeable.
I use an IceBox to do this.
http://www.gizmag.com/usb-windows-icebox-freezes-hard-disk/12880/ (http://www.gizmag.com/usb-windows-icebox-freezes-hard-disk/12880/)
Then users can do whatever they want, but a reboot restores everything back the way it was.
Joseph Elwell.
-
Simulated keypresses don't work on mame, remember?
You'd have to use v-joy or similar joystick trickery.
Probably your most realistic bet is to try to get the feature added to HBMAME or a similar build.
Am I correct in assuming simulated keypresses do work if Mame is compiled with Force_DirectInput enabled?
-
I didn't address the single key cheat button in my original reply because the last time I setup my cabinet the version of MAME I was using supported pressing a single button and displaying ONLY the cheat portion of the menu with no way to get into the rest of the menu system. Not sure when this was removed.
I can see in my old default.cfg
<port type="UI_CHEAT">
<defseq type="standard">KEYCODE_HOME</defseq>
<newseq type="standard">KEYCODE_W</newseq>
</port>
I don't see an option to configure this in .149.
Joseph Elwell.
-
I got this working in Lua. Note that this uses the cheat plugin, not the -cheat command line flag.
-- mame -autoboot_script cheat_button.lua
--
-- This script opens the "Plugin Options" > "Cheat" menu when a button is pressed.
-- You must enable "cheat" in plugin.ini, or the menu will be blank.
frame_sub = emu.add_machine_frame_notifier(function()
local input = manager.machine.input
local ui = manager.ui
-- example buttons:
local seq = input:seq_from_tokens("KEYCODE_F12 or JOYCODE_BUTTON1")
if not ui.menu_active and input:seq_pressed(seq) then
emu.show_menu("Cheat")
end
end)