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
Site News

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


  

Author Topic: Auto Load "Save States"  (Read 242 times)

0 Members and 1 Guest are viewing this topic.

BlackBadger22

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • I want to build my own arcade controls!
Auto Load "Save States"
« on: August 22, 2017, 07:32:11 pm »
Im running Mame64 through a front end.

My goal is this
When game is selected and loaded up that it automatically goes to a save state that has "set number" of credits pre inserted.
I always have friends playing on my machines and I feel it isn't as fun without a little challenge.
Basically that game will load right to the save state where the credits are loaded and you have to press start and when you are out the only thing to do is back out of the game.

HELP ME ARCADE WORLD!!

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2929
  • 0x2b|~0x2b?
Re: Auto Load "Save States"
« Reply #1 on: August 23, 2017, 11:22:28 am »
You can use MAME's Lua plugin system to do this.

I just quickly modified my savestate_plugin.zip (untested):
Code: [Select]
-- license:BSD-3-Clause
-- copyright-holders:Ben Baker
local exports = {}
exports.name = "savestate"
exports.version = "0.0.1"
exports.description = "SaveState plugin"
exports.license = "The BSD 3-Clause License"
exports.author = { name = "Ben Baker" }

local savestate = exports

function savestate.startplugin()
emu.register_prestart(function()
end)

emu.register_start(function()
manager:machine():load("auto")
end)
   
emu.register_stop(function()
end)

emu.register_pause(function()
end)

emu.register_resume(function()
end)
end

return exports

All it does is load the save state "auto" when the game starts. You can change it to whatever name you want. So all you have to do is set the game up how you want then save the state with the name you want and it should auto-load to this state.

abispac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 887
Re: Auto Load "Save States"
« Reply #2 on: August 23, 2017, 04:22:17 pm »
load games,insert credits ,exit game, go to savesta folder, set properties to read only. you are done

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31