Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: gamesmame on April 22, 2021, 08:33:41 AM

Title: Please help with MAME/bat/lnk =P
Post by: gamesmame 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?  :-\
Title: Re: Please help with MAME/bat/lnk =P
Post by: hermine.potter 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
Title: Re: Please help with MAME/bat/lnk =P
Post by: gamesmame 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?
Title: Re: Please help with MAME/bat/lnk =P
Post by: hermine.potter on April 22, 2021, 08:30:27 PM
direct config load in Mame
it seems that there exist a command -debugscript (see here (https://docs.mamedev.org/commandline/commandline-all.html))
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 (http://forum.attractmode.org/index.php?topic=3932.msg27472#msg27472)

-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
Title: Re: Please help with MAME/bat/lnk =P
Post by: gamesmame 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