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: Set maximum to boot into mame game on start up  (Read 4337 times)

0 Members and 1 Guest are viewing this topic.

sgc1

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:May 20, 2024, 03:20:45 pm
  • I want to build my own arcade controls!
Set maximum to boot into mame game on start up
« on: January 30, 2015, 06:48:06 pm »
Hi can any one advise if upon boot up of maximum arcade you can auto start a particular mame game,

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Set maximum to boot into mame game on start up
« Reply #1 on: January 31, 2015, 08:58:02 pm »
Maximus doesn't have that option, but you can fake it if you'd like.

There are two parts to making it work:
  • Overriding the 'remembered' system and game
  • Sending Enter a couple times at startup to start the 'remembered' game

For both parts, you'll need AutoHotKey installed.

Part 1 - Set the Remembered game

Maximus tries to remember the last played system and game so they're the defaults if you hit select. If you actually want to start up the game that Maximus remembered, you can skip Part 1. If you want to always start a particular game, do the following:

Run Notepad

Copy/Paste these lines into Notepad:
Code: [Select]
ConsoleActive = MAME
FavoriteSelect = 2
FavoriteNum = ["Favorites": 14, "Games": 5]
IniWrite, %FavoriteSelect%,preferences\default.ini, %ConsoleActive%,FavoriteSelect
IniWrite, %FavoriteNum%, preferences\default.ini, %ConsoleActive%, FavoriteNum
IniWrite, %ConsoleActive%, preferences\default.ini, General, ConsoleActive
Run, "maximus arcade.exe"

Save the file as MaxAlwaysMAME.ahk in your MA "Frontend" directory (make sure the Save As type is All files so you don't get .txt appended to the name) My file name is C:\Games\MaximusArcade\Frontend\MaxAlwaysMAME.ahk

Make a shortcut to MaxAlwaysMame.ahk and run that (every time) instead of running MA directly.

The first 3 lines specify what you want to be selected.
ConsoleActive is the console you want. (MAME - easy enough)
FavoriteSelect is which Favorite list your want to appear. This number is based on the order that the lists appear in preferences, NOT the order they appear in line 3.
FavoriteNum is which Game (from the top) should be selected in each list. Since MA only stores the number of the item, not the name, this number would have to change if you make changes to your list which would change the desired game's position in the list. As written, the code selects the 5th game of my Games list, and the 14th game on my Favorites list. Since Favorites is my second list in the Preferences program, that's the one which appears when I select the MAME emulator.

Part 2 - Sending 'Enter'

Run Notepad

Copy/Paste these lines into Notepad:
Code: [Select]
WinWait,ahk_class ImlWinBackdropClass
WinWait,ahk_class ImlWinCls
Sleep 1000
Send {Enter Down}
Sleep 300
Send {Enter Up}
Sleep 2000
Send {Enter Down}
Sleep 300
Send {Enter Up}

Save the file as StartDefault.ahk in your MA "Frontend" directory (make sure the Save As type is All files so you don't get .txt appended to the name) My file name is C:\Games\MaximusArcade\Frontend\StartDefault.ahk

Open Maximus Preferences, and select the Options tab.

Under Options, select the Startup tab.

Enable 'Run Application On Startup'
Browse to StartDefault.ahk (or enter the path directly)
Leave Command Line: blank
Set Window State: to hidden

Click Close

If both parts are working, Maximus will auto-start to the same game each time. Keep in mind though, that you'll still see Maximus starting up. We're not hiding any of that. And any changes to your lists might throw things off.

You may also need to adjust the sleep delays. There are fancy ways to tell when to send the keys, but fixed delays might be good enough for your purposes.

sgc1

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:May 20, 2024, 03:20:45 pm
  • I want to build my own arcade controls!
Re: Set maximum to boot into mame game on start up
« Reply #2 on: February 01, 2015, 04:52:46 am »
Thanks very much I will give it a try ,will let you know how I get on.

pakitt1

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:January 07, 2016, 04:08:14 pm
  • I want to build my own arcade controls!
Re: Set maximum to boot into mame game on start up
« Reply #3 on: December 07, 2015, 06:51:27 am »
I am looking to do the same thing...however I will only have 1 Rom in the Rom folder(not a complete mame romset) so my question is what would the number values have to be set at in the .ahk file...thanks in advance