Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Any way to save/auto-enable cheats in MAME?  (Read 6951 times)

0 Members and 1 Guest are viewing this topic.

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Any way to save/auto-enable cheats in MAME?
« on: May 20, 2011, 04:19:59 pm »
This has probably been asked before but I can't find the answer so I'll ask again. Is there a way to save enabled cheats in a particular game so the automatically start up the next time you launch it from a front-end? I've recently moved from 0.105 to 0.142 and the option to add/edit cheats is now gone too, so I can't even assign activating a cheat to a button or certain button commands...?

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Any way to save/auto-enable cheats in MAME?
« Reply #1 on: May 21, 2011, 09:29:58 am »
Anyone? If you need a 'for example'; mny games have unlockable characters etc. I'd want enabling by default.

nitz

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 507
  • Last login:November 24, 2015, 07:57:29 pm
Re: Any way to save/auto-enable cheats in MAME?
« Reply #2 on: May 21, 2011, 10:56:48 pm »
I really thought this was possible by putting a : in front of the cheats you always want activated in the cheat file as shown in this thread http://forum.arcadecontrols.com/index.php?topic=18170.0 but it only seems to work with the underclocking cheat. Maybe it works with some others as well, I guess you could give it a try.

Failing that and assuming no one else has the answer, I can think of a couple "hacky" style options:

1) Using the data in the cheat file, you should be able to use a hex editor to hack the rom to enable the cheats you want. This probably won't work with all cheats, but I think it could work with the hidden character type cheats you mentioned to make them always enabled. One drawback I can think of though is that when you try to run it, mame will complain that the checksum is incorrect or whatever, and you'll have to press a key to continue. This could be a problem with a front end, since the front end may keep the focus until the emulator runs, meaning you can't send a keypress to the command line, but you can't run the emulator until you send that keypress. I'm thinking you could change the checksums and such in the mame source code and compile it to get around this, but this is a lot of work if you have a large number of games you want to do this on, so it probably isn't worth the trouble.

2) An easier way I can think of is to enable the hidden characters and save the game state and then load it next time you play. I think that would work, but again it probably wouldn't work with other types of cheats. You could even compile mame to accept key presses from autohotkey (easy to do) and make the save/load messages invisible to make the effect seamless, ie. you start your game and the appropriate key presses are sent to load the save state and you automatically have your hidden characters enabled.

These probably aren't the kind of solutions you're hoping for, but they could work if there are no other options.