The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: arcadeswede on August 31, 2011, 04:25:36 am

Title: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: arcadeswede on August 31, 2011, 04:25:36 am
Hi!

I'm trying to find a way to make mame save/load my state in a game with ONE single button.
Now I have to press for example: F5 and then A to save my state, and the same way with loading the state.

I found this thread in the forum:
http://forum.arcadecontrols.com/index.php?topic=33233.0 (http://forum.arcadecontrols.com/index.php?topic=33233.0)

But I can't find the file in the mame source folder that they are talking about (I'm using mame 0.143).
It seems like the version they have is an old one though.

I have Mame 143u1 and I know how to compile.

Could someone help me find this code (file) to edit?

Regards
Victor
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: equlizer on September 01, 2011, 01:12:16 am
Right now i have save to: joy down + button 1.  But then it asks where to save it to and thats where im stuck too :(  I want it just to save auto to slot 1 and load from slot 1
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: arcadeswede on September 01, 2011, 01:27:30 am
Yeah, that's exactly what I'm looking for!
Just one button to quicksave and quickload.

I don't care about saving/loading from different slots.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: VoxT3R on September 01, 2011, 08:06:19 pm
Hi guys....

I too am looking to figure out a solution to this problem.

I have mapped out a save state configuration on my arcade cabinet buttons, but I'm them presented with a 'Select position to save to' prompt.

All i would like it to do is save it to slot 1 for example. Then on the load state map I've set up, I would like it to just load the slot 1 and not prompt me with the 'Select postion to load from' prompt.

Any solutions to this would be fantastic ;D Any mame cabinet gurus out there with any ideas?

Thanks in advance.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: kalice63 on September 02, 2011, 01:24:28 am
I hold mapped out a drop tell configuration on my arcade compartment buttons, but I'm them presented with a 'Select opinion to book to' punctual.

All i would equivalent it to do is reserve it to interval 1 for lesson. Then on the weight suggest map I've set up, I would equal it to virtuous worry the interval 1 and not fast me with the 'Superior postion to sedimentation from' punctual.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: VoxT3R on September 02, 2011, 11:47:06 am
I hold mapped out a drop tell configuration on my arcade compartment buttons, but I'm them presented with a 'Select opinion to book to' punctual.

All i would equivalent it to do is reserve it to interval 1 for lesson. Then on the weight suggest map I've set up, I would equal it to virtuous worry the interval 1 and not fast me with the 'Superior postion to sedimentation from' punctual.

Not sure what your getting at kalice63... I think I will need to down a few pints and several shots of vodka to make sense of what you wrote pal!  :dizzy:
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: equlizer on September 10, 2011, 02:21:24 pm
Anyone find a solution for this?  I hate having to keep a keyboard around just for that :(
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: equlizer on September 16, 2014, 08:37:36 pm
Bump for an old topic that still has not been solved.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: Slippyblade on September 16, 2014, 09:12:39 pm
I don't really see how a single button can be used for load AND save.  How would MAME know which action to perform?  It's not exactly like it's a toggle action.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: equlizer on September 16, 2014, 10:07:43 pm
1 button would be to save to state 1 and 1 button to load state 1.  2 separate buttons.  2 separate functions.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: eds1275 on September 17, 2014, 02:47:20 am
I would also love a way to set up an easy save/load system. My buttons are all connected to u360's and therefore have no number value. Perhaps this is something we could ask the mame devs to implement?
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: equlizer on September 17, 2014, 11:43:31 pm
I found this but dont know what to do with it:


#IfWinActive, ahk_class MAME ; MAME

F7:: ; SAVE

Sleep, 30
Send, {F8 Down}
Sleep, 30
Send, {F8 up}
Sleep, 30
Send, {m Down}
Sleep, 30
Send, {m Up}
Sleep, 30
return


F2:: ; LOAD

Sleep, 50
Send, {F9 Down}
Sleep, 50
Send, {F9 up}
Sleep, 50
Send, {m Down}
Sleep, 50
Send, {m Up}
Sleep, 50

return


Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: ratsflif on September 18, 2014, 03:05:24 pm
That looks like an AutoHotKey script.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: equlizer on September 23, 2014, 01:25:49 am
now im having issues with mame not saving games.  when i press the key to save i get the error: failed to save file or failed to open file for load operation
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: yotsuya on September 24, 2014, 12:30:28 am
This can only end in tears.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: dfwdennis on March 29, 2016, 10:55:42 pm
I was fairly easily able to make this change to a Mame 0.156 build by editing the src/emu/ui/ui.c file to no longer prompt for the file selection but to instead just hardcode the file to 'a'.  After that change, I was able to map one of my arcade buttons to save and one to load and it works like a charm.  If anyone would like to know how to make this same change then just let me know.
Title: Re: Mame Save/Load State with One Button. Need help finding file to edit.
Post by: MomoneDk on March 31, 2016, 02:03:30 am
Since Mame "i don't remember" until Mame 169, you can do that (every button load/save cheat)  if you remove these chapters in UI.C or UI.CPP:

// okay, we're waiting for a key to select a slot; display a message

and

// check for A-Z or 0-9

I know it worked already with mame 127 but before, i don't remember, need to test.

Until Mame 169 there was no problem to compile with this modification, but since mame 170 this cheat does not work anymore, i have to search.