The Dragon King
Using Display Files 
About Mame Hooker Overview:

One of the primary things you can do with display files is make your own artwork file with digits/leds, ect and have mame (and thus mame hooker) control the states of the artwork. Before you begin, be sure to setup mame hooker for display files via the previous tutorial.

Getting this to work is a very technical and complicated process:

Step 1. Click on the "Mame Hooker Display Files" link on this site and download the display file you wish to use.

Step 2. Extract the zip file to the mamehooker directory.

Step 3. Play the game.... the display file should be working.

Seriously that's it... enjoy!

(Those that aren't interested in the technical aspects can stop reading right here.)

Ok maybe you want to know HOW they work. Fair enough.

Each display file consists of a folder with some images (and optionally a background image), a ".dis" file, and an ini file for the rom(s) preconfigured to control the display. The images and .dis file are converted from, and based upon mame's official artwork files. It is an extremely similar format.

A typical display file looks like this:


There isn't much to it really. The "layout" section consists of positional data (which you should NEVER fill out here, that's what the default.dis is for) and optional background image value (image=) and that's it. After that a display file can have an infinate number of image groups (image1, image2, ect...). Image groups have settings similar to the layout except the positional data is a multiple of the display and not a fixed value (1=entire width or entire height). That helps with scaling. A new variable is the "length" entry. Length refers to the number of images in the group. The ini file will use a function to turn one and only one image on in a group and this is how we get blinky lights and animation! The final "image" entry is a little bit different here as you want to throw a # in the name somewhere so that the display file can enumerate multiple images. For example, the first image group with the name light_cadet_#.png and a length of two must have the images "light_cadet_0.png" and "light_cadet_1.png" (The first number is always 0, not 1, thus the 0 and 1 entries and not 1 and 2)

There are a few more special variables you can sue in a display file but those are for a different tutorial.

Anyway, over to the INI portion, which is storted in the INI folder and is like any other ini used to control outputs:

MameStart=lds gorf
'This game had six rank lights built into it's bezel.
'You start the game at "Space Cadet" and get "promoted" as you increase your score.
'The Ranks are list below.

'Space Cadet Lamp
lamp0=sds 1 %s%

'Space Captain Lamp
lamp1=sds 2 %s%

'Space Colonel Lamp
lamp2=sds 3 %s%

'Space General Lamp
lamp3=sds 4 %s%

'Space Warrior Lamp
lamp4=sds 5 %s%

'Space Avenger Lamp
lamp5=sds 6 %s%

Note the heavy comments. I try to add comments to any file I give you for clarity's sake. Anyway, any display file you want to use needs to be loaded when mame starts so in the cleverly named "MameStart" entry you add a load display file function. In this case "lds gorf". Remember, you can use the function tool to add functions, you don't need to memorize them. As for controlling the display file, each output controls an image group. We simply put a "set display file" function on each output and have it control a different group. Note that image groups in a display file are always named [Image1], [Image2], ect... and whne you call the set display file function, the number refers to the number after the word "Image" in the display file.

And that's it for you curious types that wanted to know how display files work. They aren't very complicated at all. Just for the record though all mame artwork files with animations have already been converted by me or are in the process of being converted by me so there is no need to make this type of display file unless you just want to tweak one of mine.