Jump to content
LaunchBox Community Forums

Autoboot lua scripts in MAME


spycat

Recommended Posts

I recently came across this
https://github.com/Bob-Z/RandoMame

So far I've tested out the electron_cass.lua with my electron_cass softlist games and things work ok.

Just for initial testing I added the electron_cass.lua file to my MAME root folder.
I set my Default Command-Line Parameters for tapes as
electron -autoboot_delay 2 -autoboot_script electron_cass.lua -cass
 

  • Like 2
  • Unusual Gem 1
Link to comment
Share on other sites

Nice find!!  Thanks!

I tested the same and it worked great!  I subsequently tested putting the lua script into its own folder.  I created a folder under MAME called softlists and placed the script in there.  Then for the command line, just added the folder name and a / in front of the script.

electron -autoboot_delay 2 -autoboot_script softlists/electron_cass.lua -cass

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

An autoboot lua script for use with MAME's mtx_cass software list games.
The attached mtx_cass.zip contains the lua script. Unzip and move the mtx_cass.lua to where you keep your other lua scripts.
My lua scripts are in a folder within MAME called scripts. If you keep your's in a different location, then alter the parameters below to suit.

LaunchBox Default Command-Line Parameters:
mtx512 -autoboot_delay 1 -autoboot_script scripts/mtx_cass.lua

mtx_cass.zip

Link to comment
Share on other sites

  • 7 months later...

Two lua scripts for use with Philips VG 5000 cassette (vg5k software list) emulation with MAME via LaunchBox.

RandoMame's vg5k.lua plays the tape at normal speed and sends RUN once loaded.
The two luas in the attached zip use tape fast loading; one is for games that require RUN once loaded, and the other is for games that don't.
See the ReadMe in the attached zip for more information.
 

vg5kLuaScripts.zip

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

Using RandoMame's svi318_cass.lua script with the Spectravideo svi318_cass software list / Spectravideo No-Intro set with MAME via LaunchBox.
This lua handles BASIC and Binary games.

My LaunchBox Default Command-Line Parameters (lua is in my MAME/scripts folder)
svi328 -autoboot_delay 6 -script scripts/svi318_cass.lua -cass

The lua worked fine with the vast majority of BASIC games.
With a handful of BASIC games, however, the lua's sending of RUN arrived too soon and corrupted on screen, causing tape loading to fail. There's a custom lua in the attached zip for those games.

I met two issues when using the lua with Binary games.
The first issue was with the lua itself and affected the loading of all Binary games.
Editing the lua and changing
emu.keypost('BLOAD "CAS:",R\n')
to read
emu.keypost('BLOAD"CAS :",R\n')
fixed that issue for me.
The second issue (after fixing the first one) was not a lua one as such and affected some but not all Binary games.
By default, the lua sends CLOAD which expects a BASIC game.
A Binary game, by right, should reject CLOAD with a Device (I/O) error, causing the lua to rewind the tape and switch to using BLOAD.
Some Binary games, however, fail to flag an error and so the lua, being none the wiser, continues with CLOAD.
There's a custom lua in the attached zip for those games.

The svi318 and svi328 systems use the same software list / No-Intro set, and the luas (RandoMame's and customs) are compatible with both.
I came across the odd game that didn't work properly with svi318 but did with svi328, nothing to do with the luas. So I use svi328.
 

svi318CustomLuas.zip

  • Like 2
Link to comment
Share on other sites

On 3/3/2024 at 11:25 PM, spycat said:

An autoboot lua script for use with MAME's mtx_cass software list games.
The attached mtx_cass.zip contains the lua script. Unzip and move the mtx_cass.lua to where you keep your other lua scripts.
My lua scripts are in a folder within MAME called scripts. If you keep your's in a different location, then alter the parameters below to suit.

LaunchBox Default Command-Line Parameters:
mtx512 -autoboot_delay 1 -autoboot_script scripts/mtx_cass.lua

mtx_cass.zip 472 B · 5 downloads

Does the mtx need a bios file and where do I put it?
Do the roms need to be put in a special directory like mtx512 or other?

By following the default command line
LaunchBox Default Command-Line Parameters:
mtx512 -autoboot_delay 1 -autoboot_script scripts/mtx_cass.lua

I can't get the roms to boot?

Edited by launchretrogirl2562
Link to comment
Share on other sites

1 hour ago, launchretrogirl2562 said:

Does the mtx need a bios file and where do I put it?
Do the roms need to be put in a special directory like mtx512 or other?

By following the default command line
LaunchBox Default Command-Line Parameters:
mtx512 -autoboot_delay 1 -autoboot_script scripts/mtx_cass.lua

I can't get the roms to boot?

No, don't move anything around.  Your MAME setup and Software List sets need to all be working before using the scripts.  You can test your MAME setup outside LB which helps identify issues as can see the command window as shown below:

Assumptions on using below test line: 1) you are launching command window in MAME root directory outside of LB  2) using Gold Mine as a test game  3) your LUA file is in directory ...\MAME\scripts\mtx_cass.lua

mame mtx512 goldmine -autoboot_delay 1 -autoboot_script scripts/mtx_cass.lua

If doesn't work in command line won't work in LB.  The command errors will likely give you insight on issue. 

A few possible reasons to double check if errors in command above (see snaps below):

  1. If the command above works and launched game then likely means you had setup MAME within LB using auto setup so you will need to alter the path in LB to include your Software List directory rompath or there is some specific issue with naming in LB.  Helpful then if you have screen shots of your LB setup to help troubleshoot (MAME emulator settings, example game entry settings).
  2. If command doesn't work then likely one of these:
  • your MAME.ini isn't pointing to your directory where your Software List files are located and set in the "rompath" entry in the INI file.  This should point to the root Software folder.  It will be the folder that contains:  ...\MAME\software\mtx_cass\goldmine.zip    for purpose of test above.
  • you don't have a complete MAME roms Arcade set and/or the MAME files are not named properly as they will have the bios and needed files to run the MTX emulation
  • you do not have a correct/current set of XML files in your MAME Hash directory:   ..\MAME\hash\mtx_cass.xml
  • you haven't downloaded the Software List Mame set which is separate and an addon to the MAME rom arcade files set (need both sets). 

 

 

Screenshot2024-10-20122925.thumb.png.f3ab7dc2e5ef5c648237a6230e97d586.pngScreenshot2024-10-20122745.thumb.png.9eef20c886afd7e14eeac4b0aaff6e9a.pngScreenshot2024-10-20123115.thumb.png.90b265fcd9fc8c94547f2e03d1f52258.png

Edited by sundogak
added screen shots
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

The required bios is mtx512.zip
There are 3 associated devices mtx_cfx.zip  mtx_sdxbas.zip  mtx_sdxcpm.zip
I don't use any of these devices and the cassette games work ok.
Not sure, but these devices may be related to the flop and hdd softlists.

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, sundogak said:

No, don't move anything around.  Your MAME setup and Software List sets need to all be working before using the scripts.  You can test your MAME setup outside LB which helps identify issues as can see the command window as shown below:

Assumptions on using below test line: 1) you are launching command window in MAME root directory outside of LB  2) using Gold Mine as a test game  3) your LUA file is in directory ...\MAME\scripts\mtx_cass.lua

mame mtx512 goldmine -autoboot_delay 1 -autoboot_script scripts/mtx_cass.lua

If doesn't work in command line won't work in LB.  The command errors will likely give you insight on issue. 

A few possible reasons to double check if errors in command above (see snaps below):

  1. If the command above works and launched game then likely means you had setup MAME within LB using auto setup so you will need to alter the path in LB to include your Software List directory rompath or there is some specific issue with naming in LB.  Helpful then if you have screen shots of your LB setup to help troubleshoot (MAME emulator settings, example game entry settings).
  2. If command doesn't work then likely one of these:
  • your MAME.ini isn't pointing to your directory where your Software List files are located and set in the "rompath" entry in the INI file.  This should point to the root Software folder.  It will be the folder that contains:  ...\MAME\software\mtx_cass\goldmine.zip    for purpose of test above.
  • you don't have a complete MAME roms Arcade set and/or the MAME files are not named properly as they will have the bios and needed files to run the MTX emulation
  • you do not have a correct/current set of XML files in your MAME Hash directory:   ..\MAME\hash\mtx_cass.xml
  • you haven't downloaded the Software List Mame set which is separate and an addon to the MAME rom arcade files set (need both sets). 

 

 

Screenshot2024-10-20122925.thumb.png.f3ab7dc2e5ef5c648237a6230e97d586.pngScreenshot2024-10-20122745.thumb.png.9eef20c886afd7e14eeac4b0aaff6e9a.pngScreenshot2024-10-20123115.thumb.png.90b265fcd9fc8c94547f2e03d1f52258.png

I had to change my emulator settings for it to work. But your detailed explanation helped me cause I also forgot to add the path to the rompath list in mame. So thanks again.
And include the bios ofcourse.

mtxlb.thumb.PNG.2a3dc66db4dc24096d1d9cad88a68335.PNG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...