Articles posted June 2006

More MAME Testing

The update to MAME 0.106u7 is now available for download. With this version, I have added back DirectDraw support, but using the new renderer underneath. In order to get some more testing, I've made a precompiled binary version available here.

In order to run with the new Direct3D support, use -video d3d on the command line. In order to run with DirectDraw support, use -video ddraw on the command line. And if you want to try the really slow GDI support, use -video gdi on the command line. I'd appreciate it if folks could try it out on their systems and report any problems here on this blog post.

Some interesting things to try out:


MAME 0.106u4 is out

I've posted an updated version of MAME over at This should fix most of the major issues I introduced in the last one. :)

Also, since some people want to give it a try but aren't currently set up to compile it, you can grab an unofficial pre-built version here for experimentation.

Creating New Layouts

This post is inspired from a message board post indicating that it sounded like it was a lot harder for non-programmer types to make layout files than it was in the previous system. Well, looking at my previous two posts on the layouts, I can understand why. The new system has a lot of flexibility, which can be intimidating. And then I discussed converting old .art files, which makes things sound a heck of a lot more complicated than they need to be.

So, in the hopes of convincing people that the new system is actually simpler, let's talk about making a layout that adds a bezel. I'll assume you have the bezel artwork, either with embedded alpha channel, or with a separate mask alpha, all ready to go. We'll call the bezel artwork file mybezelname.png and the mask file (if necessary) mymaskname.png.

Now, presumably, you've loaded this artwork into some kind of image editing problem, so you know the dimensions of the image. Let's say it is bezelwidth pixels wide and bezelheight pixels tall. The one remaining piece of information you need to figure out is where does the screen go, relative to the artwork? Keep in mind that if the screen is horizontal, then the screen height should be 75% of the screen width. For example, if, within your artwork, the screen should be 1000 pixels wide, then it should be 750 pixels tall. If you're dealing with a vertical game, then reverse those numbers.

Once you figure out where the screen should go relative to the artwork, make a note of the top, left, bottom, and right coordinates of the screen position. We'll call those tscrpos, lscrpos, bscrpos, rscrpos, respectively.

Now all you need to do is write a .lay file that contains a single element to hold your artwork, and then a view that positions your artwork and the screen at the right positions. Below I've written a simple template. Just plug in the values I mentioned above into the template and you're ready to go. Note that, unlike the previous system, there is no wacky math to learn. You can work entirely in pixels.

<?xml version="1.0"?>
<mamelayout version="2">
    <element name="bezel">
        <image file="mybezelname.png" alphafile="mymaskname.png" />

    <view name="Bezel Artwork">
        <screen index="0">
            <bounds left="lscrpos" top="tscrpos" right="rscrpos" bottom="bscrpos" />

        <bezel element="bezel">
            <bounds left="0" top="0" right="bezelwidth" bottom="bezelheight" />

If there are questions, please post them here and I will try to answer them.

MAME 0.106u3 is out

The new renderer is now on by default. Please heed the warnings that are posted in the whatsnew file!

If you'd like to try out some of the things I've posted about here, here are some tips:

Cyberball is the only game that has multiple screen support. Unfortunately I seem to have busted partial updates, so it's not going to look perfect, but you can try it by running

mame cyberbal -numscreens 2

I've updated the built-in overlays for Star Castle, Solar Quest, Sundance, Tailgunner, Battle Zone, and Red Baron. So if you run those vector games, you should be able to get decent speed at full resolution because the artwork is composited by your graphics card.

I've also written updated layout files for Space Invaders and Turbo. Download those files and add them to the existing ZIP files with all the artwork. You should be able to run the games with full artwork at reasonable speeds now. All the artwork is scaled up to whatever resolution you're currently running at.

If you go into the menus, you'll find that there is a new "Video Options" menu, which lets you select which view is currently active. Several built-in views are provided. Feel free to play around with those.

At higher resolutions, the standard MAME font is kind of fuzzy and chunky. You can use pretty much any .BDF font for the main font now, so I recommend getting a decent high-resolution one, renaming it to ui.bdf, and placing it in the same directory as the MAME executable. MAME will scale it to whatever resolution you're running at. I'm currently using this BDF font for testing, which is a 40pt rendering of one of the sans-serif Free UCS Outline Fonts.