Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: laserbones on May 02, 2014, 09:59:16 am
-
I currently have a cocktail table with a 16:9 monitor. cocktail mode is great but it butts the 2 game screens up against each other in the middle of the monitor screen. Is there a way to increase the gap to push them closer to the two players? Thanks!
-
Yes you should be able to do this via a custom layout file.... hit up Mr. Do's Artwork for some examples via looking at mame artwork.
-
The bottom of this page has proved helpful:
http://mamedev.org/devwiki/index.php?title=Layouts_and_Rendering_for_MAME_Artwork_System (http://mamedev.org/devwiki/index.php?title=Layouts_and_Rendering_for_MAME_Artwork_System)
-
For anyone needing it here is the code I used to adjust the gap in my cocktail table. As mentioned I'm working with a 1920x1080 monitor in portrait mode. You'll need to modify the code a little if your setup is different. Place the code below in a default.lay file in a folder that is titled the same as your rom. the "y" parameter is where you can adjust the middle gap between the two cocktail screens. This is also for 4:3 games.
<mamelayout version="2">
<view name="Cocktail + Gap (4:3)">
<screen index="0">
<bounds x="0" y="-3.9" width="4" height="3" />
<orientation rotate="180" />
</screen>
<screen index="0">
<bounds x="0" y="0" width="4" height="3" />
</screen>
</view>
</mamelayout>
-
I've never messed with layout files, but this sounds really interesting to play with. Could you give a little more detail as to how to make this work?
Where exactly do the layout file and folder need to be? How do you create the .lay file? Is it just a text file renamed? Does it have to be compiled into a fresh mame executable? The mamedev wiki doesn't seem to specify any of this, unless I'm having reading comprehension problems... wouldn't be the first time! ;D
-
You don't need to recompile MAME. Just place that code into a text doc and save with the extension to .lay once you have that file make a folder in the artwork subdirectory of your MAME directory that is named the same as your game. IE: battletoads, at least for MAME .151, is titled btoads.zip so I placed the default.lay file into a "btoads" folder in my artwork directory. There should be an artwork directory in your MAME install by default. Most people use it for custom bezels but I personally like the black letterbox look around my games so I just used this to adjust the margin/gap between the cocktail screens.
So to clarify, place the code above in a default.lay file you create in something like notepad. Then place the default.lay in your artwork folder which should be something like the following if you were doing it for a game like Battle Toads C:\MAME\Artwork\btoads\default.lay
I'm sure there are ways to make this a default but seeing as how I don't use that setup for all games I just applied it to the few I needed. Once you add that file you will be able to select the setup the same way you select cocktail or 4:3 mode. In other words, it will be in the same list when you hit Tab in MAME and then go to your video settings.
-
Nice! That worked perfectly, just as you described. :cheers:
I have no current intention of building a cocktail table, but this at least makes it a feasible option.