How to: Use MAME <version> Extras as material for Pause

Turranius

Member
Supporter
RL Member
tldr; Grab the software here ftp://misc:[email protected]/Tur-MAME Extras to Pause or from the bottom of this post.

If you downloaded the "Mame <version> Extras" torrent from your favorite torrent site, you might want to use it as material for Pause in RocketLauncher.
Attached to this post, you'll find both a Windows program and a Linux script that takes care of that. (Update. I've removed the Linux script as it no longer works with "Mame 0.172 Extras".)

As for the Windows version, just download it anywhere and run it. It will extract 7za.exe the first time you run it and create an INI file the first time you press "Start", so it'll remember your settings the next time around.

What do you need other then this? The MAME <version> Extras torrent, found on the most pleasurable of torrent sites.

Windows version:
Tur-MameExtrastoPause4.jpg

RocketLauncher location: Specify the full path to your RocketLauncher installation, or just click Browse. Its the folder containing RocketLauncher.exe and should have a "Media" sub-folder already.
Extras Location: Specify the full path to your downloaded "MAME <version> Extras". Just point it to the root of it.
Only copy matches for existing roms: If you check this, you are asked to specify the path where your MAME roms or XML are located. If you select ROMs, only the roms you have will get their media copied. If you select XML, only the media for the games in the XML will be copied. Basically, if you use the full set with the full XML, you do not need this set. If you have your ROMs cleaned up, select them. If you use the full ROM set but a modified XML, select the XML.
Extensions: This also shows if you check the above checkbox with ROMs. What format are your roms in? the default, zip, should be fine for most users (do not specify the ".").

Next comes a lot of checkboxes. What media do you want copied? The recommended medias are already checked. You might want to uncheck "Artwork" as they can contain a few crappy images for a few games. Up to you.

There are also a "debug" checkbox. The "Show Arrays" one will show you the files it finds before processing. If you run into problems and it crashes, I might want to see that...

Click Start to go. It will show the following window to describe its progress.

Tur-MameExtrastoPause2.jpg

Description on checkboxes:

Artwork: It will extract .png files from the Extras artwork archive. This will be copied, as is, to your RocketLauncher/Media/Artwork/MAME/<RomName> folder.
Control Panel: It will copy the cpanel .png files from the Extras cpanel folder. This will be copied to your RocketLauncher/Media/Controller/MAME/<Romname> folder and renamed to CPanel.png.
Manuals: It will copy the manuals .pdf files from the Extras manuals folder. This will be copied to your RocketLauncher/Media/Manuals/MAME/<Romname> folder and renamed to Manual.pdf.

Flyers: It will copy the flyers .png files from the Extras flyers folder. This will be copied to your RocketLauncher/Media/Artwork/MAME/<Romname> folder and renamed to Flyer.png.
As for the rest, they are also put into the Artwork folder and renamed for each ROM.
Cabinets: Renamed to Cabinet.png.
Marquees: Renamed to Marquee.png.
PCB: Renamed to PCB.png.
Snaps: Renamed to Snap.png.
Titles: Renamed to Title.png.

It also does the same for artpreview, bosses, endings, gameover, howto, logos, scores, select & versus. They all go into your RocketLauncher/Media/Artwork/MAME/<Romname> folder.


Hint: If you ONLY use the media from the "MAME <version> Extras" torrent, you may want to delete the following three folders when there is a new version to ensure that no old files linger in there:
RocketLauncher/Media/Artwork/MAME
RocketLauncher/Media/Controller/MAME
RocketLauncher/Media/Manuals/MAME
 

Attachments

  • Tur-MAME Extras to Pause 0.98.zip
    950 KB · Views: 107
Last edited:

djvj

Administrator
Staff member
Developer
Re: How to: Use MAME <version> Extras as material for HyperPause

Great guide Turranius! Certainly the linux requirement could be bypassed if someone converted your script to ahk or the like. Moving files is very easy to script.
 

Turranius

Member
Supporter
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

Yes. Perhaps I can remake it in AHK or Autoit instead so people does not have to download 18GB from my FTP each new release.

I'll get on it =)
 

bleasby

RocketLauncher Developer
Developer
Re: How to: Use MAME <version> Extras as material for HyperPause

On the hyperspin forum there is an ahk script that I created for the same end.
Anyone that wants to improve the script is more than welcome to use it.
 
Last edited:

djvj

Administrator
Staff member
Developer
Re: How to: Use MAME <version> Extras as material for HyperPause

bleasby, for obvious reasons, you should make a thread with it here.
 

Turranius

Member
Supporter
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

I'm almost done with an autoit program for it. Keep calm and chive on.
 

yashijoe

New member
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

I use the knewlife (from HS forum) script in the mame extra folder and it makes everything in few minutes.
Copy the code in a text file and change extension to au3.
It requires AutoIt to be run.

Code:
#include <file.au3>

;THis must be executed from MAME folder
$mame = @ScriptDir ;"d:\Hyperspin\Emulators\MAME\mame.exe"
$artpath = @ScriptDir & "\HyperPause\Media\Artwork\MAME"
$manpath = @ScriptDir & "\HyperPause\Media\Manuals\MAME"
$roms = "d:\Hyperspin\Games\Mame"

Dim $arts[8] = ['manuals','flyers','pcb','cabinets','marquees','cpanel','snap','titles'] ;add new types here
Dim $artn[8] = ['Manual','Flyer','PCB','Cabinet','Marquee','Control Panel','Snap','Title'] ; add new names here
Dim $artp[8] = [$manpath,$artpath,$artpath,$artpath,$artpath,$artpath,$artpath,$artpath] ;add new paths here

$i = 0
$romslist = _FileListToArray($roms)

Func _PathArray($szPath)
	; Set local strings to null (We use local strings in case one of the arguments is the same variable)
	Local $drive = ""
	Local $dir = ""
	Local $fname = ""
	Local $ext = ""
	Local $pos

	; Create an array which will be filled and returned later
	Local $array[5]
	$array[0] = $szPath; $szPath can get destroyed, so it needs set now

	; Get drive letter if present (Can be a UNC server)
	If StringMid($szPath, 2, 1) = ":" Then
		$drive = StringLeft($szPath, 2)
		$szPath = StringTrimLeft($szPath, 2)
	ElseIf StringLeft($szPath, 2) = "\\" Then
		$szPath = StringTrimLeft($szPath, 2) ; Trim the \\
		$pos = StringInStr($szPath, "\")
		If $pos = 0 Then $pos = StringInStr($szPath, "/")
		If $pos = 0 Then
			$drive = "\\" & $szPath; Prepend the \\ we stripped earlier
			$szPath = ""; Set to null because the whole path was just the UNC server name
		Else
			$drive = "\\" & StringLeft($szPath, $pos - 1) ; Prepend the \\ we stripped earlier
			$szPath = StringTrimLeft($szPath, $pos - 1)
		EndIf
	EndIf

	; Set the directory and file name if present
	Local $nPosForward = StringInStr($szPath, "/", 0, -1)
	Local $nPosBackward = StringInStr($szPath, "\", 0, -1)
	If $nPosForward >= $nPosBackward Then
		$pos = $nPosForward
	Else
		$pos = $nPosBackward
	EndIf
	$dir = StringLeft($szPath, $pos)
	$fname = StringRight($szPath, StringLen($szPath) - $pos)

	; If $szDir wasn't set, then the whole path must just be a file, so set the filename
	If StringLen($dir) = 0 Then $fname = $szPath

	$pos = StringInStr($fname, ".", 0, -1)
	If $pos Then
		$ext = StringRight($fname, StringLen($fname) - ($pos - 1))
		$fname = StringLeft($fname, $pos - 1)
	EndIf

	; Set the array to what we found
	$array[1] = $drive
	$array[2] = $dir
	$array[3] = $fname
	$array[4] = $ext
	Return $array
EndFunc   ;==>_PathArray

While $i < UBound($arts)
	For $rom in $romslist
		$filedata = _PathArray($rom)
		FileCopy($mame & "\" & $arts[$i] & "\" & $filedata[3] & ".*",$artp[$i] & "\" & $filedata[3] & "\" & $artn[$i] & ".*",8)
		ToolTip($artn[$i] & " > " & $filedata[3])
	Next
	$i = $i + 1
WEnd

You just have to edit path at the beginning.
Code:
$mame = @ScriptDir ;"d:\Hyperspin\Emulators\MAME\mame.exe"
$roms = "d:\Hyperspin\Games\Mame"
 
Last edited:

Turranius

Member
Supporter
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

Ok, heres my version.

It will ask on startup for the paths and also for which media you want copied.

It will extract 7za.exe the first time you run it, in the same folder as its running from. Hens the large size of it.
 
Last edited:

bleasby

RocketLauncher Developer
Developer
Re: How to: Use MAME <version> Extras as material for HyperPause

bleasby, for obvious reasons, you should make a thread with it here.

Yea I know. :eek:
Nothing to say except the usual excuse, no time! :(
 

djvj

Administrator
Staff member
Developer
Re: How to: Use MAME <version> Extras as material for HyperPause

yashijoe, at the top of that script is an Include, which means users need to have autoit installed to use. Compiling it will remove that installation requirement, but you would also need to move the settings to an input box or an ini.

Thanks to both of you for your solutions.
 

yashijoe

New member
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

yashijoe, at the top of that script is an Include, which means users need to have autoit installed to use. Compiling it will remove that installation requirement, but you would also need to move the settings to an input box or an ini.

Thanks to both of you for your solutions.

Credit to knewlife.
 

Marcoqwerty

Member
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

Turranius warning download error on Chrome...

Cattura.PNG
 

Potts43

New member
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

Ok, heres my version.

It will ask on startup for the paths and also for which media you want copied.

It will extract 7za.exe the first time you run it, in the same folder as its running from. Hens the large size of it.

I've been using a simple batch file to do this but yours sounds better. Can I just ask before I download and run it:

Where do you put this before running it?
...in mame <version> extras\ ????

Thanks
 

Turranius

Member
Supporter
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

You can put it anywhere you want. It will ask for all paths needed. I recommend putting it in its own folder though as it will extract 7z from itself the first time its run.
 

DHG

New member
Supporter
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

I tried this on my test pc and it worked no problem.... When I tried in my hyperspin cabinet with the exact hyperspin folder I get this

Line 2921 (File "E:MAME Extras to HyperPause.exe"):
Error: Subscript used on non-accessible variable
 

DHG

New member
Supporter
RL Member
Re: How to: Use MAME <version> Extras as material for HyperPause

I tried this on my test pc and it worked no problem.... When I tried in my hyperspin cabinet with the exact hyperspin folder I get this

Line 2921 (File "E:MAME Extras to HyperPause.exe"):
Error: Subscript used on non-accessible variable

Ok, disregard, I have this solved.

Another question... lets say I have multiple pieces of artwork or videos I want to have available...

For example in my folder I have
cabinet.png
flyer.png

What would I name a second file...
Same with manuals and videos?
 
Top