MAME With Marquee Screen
MAME and dynamic marquees; Howto, the simple way... I hope.
I was asked by sputnikim to share some knowledge I've gained regarding dynamic marquees using MAME. I am happy to contribute because I did hit some walls so I hope this can be of use to others.
The usual stuff but mainly: you are responsible for backing up your stuff prior making changes.
The point of this guide is having dynamic marquees using native MAME features. Don't expect much if you use third party software.
Also, english is not my native language so if you feel there is a better way to describe/explain something, let me know.
This guide assumes you have a working setup already and know your way around basic MAME emulation.
This guide is for 2 screens. More should work as well if you follow the same rules.
This guide assumes you are using Windows.
Chapter I (The resources)
For those who need more I have a few links you should read. These are the best I can point you to but feel free to contribute because layout files are powerful and there's much to cover.
If you want results though, skip to Chapter II.
The best links are:
MAMEdev.org - Layouts and Rendering for MAME Artwork System because knowledge is power.
MAMEdev.org - LAY File Basics - Part I and let me know if they ever do a part 2.
Mr Do!'s Arcade - MAME Artwork FAQ and contact Mr. Do! if you have the skills. The community needs you.
MAMEdev.org - Layout Files Because Neo's destiny is to return to the source.
Chapter II (The do's)
- Backup your mame.ini.
- If you have "MAME Extras" chances are you are using them while also seeding. If so, go to "artwork" folder and copy the .zip files of the games you play somewhere else.
- MAME Extras includes marquees.zip if you want to use those. Not all game have marquees yet so if you do your own or download images, save them as PNG.
- This is all manual labor and takes some time but it only needs to be done once, per game. Do share your work (more on this later).
Chapter III (Finally, something useful)
- Open mame.ini and change the following lines:
artpath "artwork;Z:\path_to\custom\layouts;F:\path_to\MAME 0.234 EXTRAs\artwork" (I think the order matters so put your custom folder first or simply use \mame\artwork default folder)
video d3d ("auto" should default to d3d but i don't trust it)
numscreens 2 (revert this to 1 if playing on one screen or it may crash otherwise)
resolution0 0x0@60 (use adequate refresh rate for your monitors)
resolution1 0x0@60 (auto width x height forcing 60Hz. Got major performance issues after wrong detection of second monitor refresh rate)
view0 Standard (use on your primary screen: where the game runs)
view1 Marquee_Only (can be whatever. Just make sure it's the same in all your .lay files. Avoid spaces or use double quotes)
On to the next step.
- Find a marquee. Outrun will be used as example.
This is where it gets tricky so let's start with the simplest case scenario where the primary screen runs the game with no bezel or any other artwork and the secondary screen will have the marquee.
- First create a "default.lay" file. This is just an XML file with a .lay extension. In this case it needs to be like this:
<!-- outrun.lay --> <mamelayout version="2"> <element name="Marquee"> <image file="outrun_marquee.png" /> </element> <view name="Marquee_Only"> <marquee element="Marquee"> <bounds x="0" y="0" width="3056" height="965" /> </marquee> </view> </mamelayout>
<--!Everything between "arrow" marks are comments and not needed. I'll use this space to explain the code above. First line is obviously just a comment. I suggest you use it for easy identification. <mamelayout> must be "2". MAME wont accept anything else. Now we need elements to use. You can name it whatever you want. Here it's marquee for the sake of easy explanation. The image file does not accept paths. the image must be in the same dir as "default.lay" which for MAME means a .zip file. The "view name" however, must be the same used in mame.ini view1 which was "Marquee_Only". This view will use the "Marquee" element (the image) starting at the axis x=0 y=0 (top left of the screen) and defines the image as 3056px wide and 965px tall which is, the size of the image but you can set the size you want. Try to keep the aspect ratio or it'll look bad.-->
From here it's all more complicated. Chances are high that one is using at least bezels in their arcade cabinet and now want to upgrade to dynamic marquees.
Lets take 1941 as example now. Copy MAME 0.234 EXTRAs\artwork\1941.zip to the path you defined in mame.ini "artpath" and open it.
This is a bit bigger file and no marquee element. This means one marquee element has to be added.
- find a marquee for 1941 game and call it, a.e., "1941_marquee.png"
To keep this simple, right below the <mamelayout> tag add:
<element name="marquee"> <image file="1941_marquee.png" /> </element>
- now we need a view to use this element. To keep this simple, right before </mamelayout> tag add:
<view name="Marquee_Only"> <marquee element="marquee"> <bounds x="0" y="828" width="4000" height="965" /> </marquee> </view>
- If the .lay file of the game already has a marquee element defined, only the <view name> has to be defined.
In order to test, run the game, press tab, select "screen #1" and you should see the "Marquee_Only" option available.