Author Topic: Please help with MAME/bat/lnk =P  (Read 2457 times)

gamesmame

  • Full Member
  • ***
  • Posts: 97
    • View Profile
Please help with MAME/bat/lnk =P
« on: April 22, 2021, 08:33:41 AM »
Please i have a dobout..  :) I make a bat with code:

Code: [Select]
mame64.exe pegasus -romimage1 roms\pegasus_cart\galaxy_hangman.bin -autoboot_command "\n\n\ng\n\n1\n1\n1"
and i make(create) a .lnk (atalho) and i put this code in AM:

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           cmd
args                 /c "[romfilename]"
rompath              M:\Emulators\Aamber Pegasus\Games
romext               .lnk;.bat
system               Aamber Pegasus
info_source          thegamesdb.net
exit_hotkey          Escape


Load game ok...
You see in AM i create hotkey ESC, but, when i press ESC close "bat" .lnk ok... but MAME its on working in background... how i solve this?  :-\

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Please help with MAME/bat/lnk =P
« Reply #1 on: April 22, 2021, 11:30:50 AM »
if you use batch or links, you need an external software too.
you received in your last post an AHK script.

or you add it complete to AM.
Probably works:
Code: [Select]
executable           M:\Emulators\Aamber Pegasus\mame64.exe
args                 pegasus -romimage1 "[romfilename]" -autoboot_command "\n\n\ng\n\n1\n1\n1"
rompath              M:\Emulators\Aamber Pegasus\Games
romext               .bin
system               Aamber Pegasus
info_source          thegamesdb.net
exit_hotkey          Escape
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

gamesmame

  • Full Member
  • ***
  • Posts: 97
    • View Profile
Re: Please help with MAME/bat/lnk =P
« Reply #2 on: April 22, 2021, 03:07:32 PM »
if you use batch or links, you need an external software too.
you received in your last post an AHK script.

or you add it complete to AM.
Probably works:
Code: [Select]
executable           M:\Emulators\Aamber Pegasus\mame64.exe
args                 pegasus -romimage1 "[romfilename]" -autoboot_command "\n\n\ng\n\n1\n1\n1"
rompath              M:\Emulators\Aamber Pegasus\Games
romext               .bin
system               Aamber Pegasus
info_source          thegamesdb.net
exit_hotkey          Escape

YES!! worked ok.. loads game and close MAME right!!! thanks man you is the best!!! but i have one more question...

The code its ok when i load the galaxy_hangman.bin ... Loads game ok, the code press automatic the "G" in keyboard, and one second after press automatic 1... 1... 1... everything its perfect!! but i have 3 games only for this system...   gwarhang(galaxy_hangman.bin) and invaders11 and tank11... only have one diference in code its... for run gwarhang i need press "G" its ok in this code... but for run invaders i need a press "i" after the Load, and for run Tank i need press "T" after load, how i make this in code in args? have a "IF" option or maybe anithing?

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Please help with MAME/bat/lnk =P
« Reply #3 on: April 22, 2021, 08:30:27 PM »
direct config load in Mame
it seems that there exist a command -debugscript (see here)
probably it's possible to load this commands from textfile.
but I don't know how it works.

OR

read rom from romlist and load commands from Rating field too
See similar here

-Goto your romlist : your_AM_folder\romlists\your_emulator.txt

-there is something like this:
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
MyGame1;MyGame1;MyEmulator;;;Konami;Action, Fighting;1;;;;;;;MyGame1;;;;;;
MyGame2;MyGame2;MyEmulator;;;Konami;Action, Fighting;1;;;;;;;MyGame2;;;;;;
MyGame3;MyGame3;MyEmulator;;;Konami;Action, Fighting;1;;;;;;;MyGame3;;;;;;

-the last column is for Rating. Just add your command behind the correct romfile:
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
MyGame1;MyGame1;MyEmulator;;;Konami;Action, Fighting;1;;;;;;;MyGame1;;;;;;"\n\n\ng\n\n1\n1\n1"
MyGame2;MyGame2;MyEmulator;;;Konami;Action, Fighting;1;;;;;;;MyGame2;;;;;;"\n\n\nT\n\n1\n1\n1"
MyGame3;MyGame3;MyEmulator;;;Konami;Action, Fighting;1;;;;;;;MyGame3;;;;;;"\n\n\ni\n\n1\n1\n1"

-set this config in AM:
Code: [Select]
args                 pegasus -romimage1 "[romfilename]" -autoboot_command "[Rating]"or
Code: [Select]
args                 pegasus -romimage1 "[romfilename]" -autoboot_command [Rating]
AM loads your rom and read the entry from "Rating"-field too
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

gamesmame

  • Full Member
  • ***
  • Posts: 97
    • View Profile
Re: Please help with MAME/bat/lnk =P
« Reply #4 on: April 23, 2021, 12:45:49 PM »
Code: [Select]
"[Rating]"

MAN!!! you is incrible  8)!!! and AM to  ;D Man this code Rating help me perfect!! this Rating is a incrible option!!!  :o