Hello! You may be reading this for several different purposes. You may wish to know how to use CPMaker, you may want to make attract mode videos, or you may have purchased one of my LED controllers and you would like MAME to use it. Either way, I hope that this document will help you accomplish your goal.
BuddaMAME came about as an amalgamation of four different projects I have been involved with in the BYOAC community.
The first project didn't really have a name, but involved a way to display an image when pause is pressed in MAME. This project came about from a post by Howard_Casto on BYOAC. Howard thought that it would be a "brilliant" idea to display an image of the user's control panel when pause is pressed. That way the user and any guests unfamiliar with his control panel could be easily reminded of which controls perform which functions.
Basically, this project patched MAME to take any image in the current directory named "controls.png", adjust its aspect ratio so that it would not be distorted when displayed, and integrate the control panel image into MAME's artwork system. This project was rather involved because arcade games are displayed at many different resolutions, and at several orientations. Some games display upside down, some rotated, and so forth.
Initially, I published the source code to this project as a patch file, since my ISP limits me to a scant two megabytes of Web storage. The BYOAC community came to my rescue, when elpresidente, a BYOAC member who happens to own a web hosting company, graciously offered to host my source and binary files.
After the completion of the artwork display project, I discovered a way to easily and quickly assemble images. I could also blend percentages of images. The blending effect causes the control to be partially drawn and thus appear dim. No other control panel artwork generator supports dimming. This method involves a free source code library known as ImageMagick. ImageMagick was designed to work on Linux, but was portable to Windows. Once the ImageMagick code was able to be compiled into MAME, the CPMaker project was born.
The ImageMagick source code is quite large (20+ megabytes) and adds several megabytes to the compiled MAME executable. For these reasons, CPMaker can also be compiled as a separate executable, and the executable can be run outside of MAME to generate control panel artwork.
The third project which BuddaMAME encompasses is the MAME Movie Maker project. A user on BYOAC named Trimoor came up with the idea of using MAME to generate a series of screen shots which could be assembled into a movie. There were attract mode movies available over the Internet, but I did not like them because they took up too much space, had bad sound, and did not properly display the attract mode.
A very long discussion on BYOAC has ensued which is one of the largest threads ever on that message board. After adding many features and changing a few over time, the MAME Movie Maker project has become very successful and can create accurate attract mode movies for a large percentage of the games in MAME.
The fourth and final project supported by BuddaMAME is the GameCab Deluxe LED controller. There was a project announced on BYOAC in early 2004, called LAME, which was going to be a programmable LED controller. Unfortunately, this controller and its developers seemingly dropped off the face of the earth in March of 2004. Somehow, I found out about the project and I became interested in designing my own LED controller.
I breadboarded my circuit and posted a video of it on BYOAC. There was a great deal of interest in the controller, and therefore I have partnered with GameCab to produce and market these controllers. This interest was also fueled by the announcement of the availability of transparent microswitch buttons.
Naturally, being the maintainer of BuddaMAME, I will support my controller. However, I have chosen to incorporate the Light Signal Engine, developed by a BYOAC member named gl.tter, into BuddaMAME. All the source to BuddaMAME is free. Since the announcement of my controller, other controllers have been announced as well. So long as the controller uses the freely available API that gl.tter and I have developed, any LED controller will work with BuddaMAME.
Depending on what BuddaMAME projects you are interested in, you may want to download some or all of the source code, binaries, and example files.
All downloads are on the BuddaMAME
home page
Download CPMaker
source code
Download ImageMagick
library source code
Download
supplementary files
Download
BuddaMAME v0.98 binary and source
Download
CPMaker image library
The MAMExxx.ZIP file contains any MAME source code files that have been altered from the original distribution, plus any files necessary to compile BuddaMAME without CPMaker and LSE functionality.
The CPMLIBS.ZIP file has never changed from the beginning of this project. It is derived from ImageMagick version 6.0.6. A few files were changed slightly from the ImageMagick distribution in order to get the files to compile cleanly with the MAME compiler.
The CPMSRC.ZIP file contains other source code. It contains the source code to LSE (with my own alterations from gl.tter's stock source), the source to the DLL which drives my LED controller, all the source necessary to build the standalone executables, and the source necessary to build CPMaker functionality into MAME. The source in this directory is not dependent on any particular version of MAME. This source may change from version to version, unlike the source in CPMLIBS.ZIP.
CPMSUPPL.ZIP contains supplementary files. There is a copy of this documentation there, as well as examples of panel files, layout files, a sample cpmaker.ini, and PHP source for CPMaker.
CPMIMAGE.ZIP contains a library of image pieces which I created from original artwork created by a BYOAC member named Frostillicus. CPMaker takes the image pieces, such as a black joystick, green button, and whatnot, and assembles them into a whole image. Not all piece types were copied from Frosty's original.
You may want to compile BuddaMAME yourself. BuddaMAME as distributed is not compiled with any processor-specific optimizations. I will not provide instructions, tools, or help in compiling standard MAME. If you need help with that then consult the documentation on mame.net.
The makefile, as distributed, will not compile the internal CPMaker libraries. This is so that people who want to make movies can do so easily. It will not compile the Light Signal Engine (LSE) code, either.
To enable the internal CPMaker libaries, change the following line in
makefile to read:
BUILD_CPMAKER = 1
If you would like to enable the Light Signal Engine, make sure this line
in the makefile is in there and uncommented:
BUILD_LSE = 1
Your MAME directory should have a subdirectory named "src", with a subdirectory under that named "buddamame". If you have downloaded all the source, under the buddamame subdirectory you should see the following subdirectories:
buddaled cpmaker homepage libs lse php
You should also see a readme.txt and a makefile. The makefile in the src\buddamame directory is for building all the separate standalone executables supported by this project. The readme.txt file explains the purpose of the various subdirectories listed above.
In order to use the internal CPMaker functionality, you will need a cpmaker.ini file in the same path as whatever executable you are running, whether it is MAME, cpmaker.exe, or whatever. This file sets key variables, such as path names. CPMaker will not create any images without a cpmaker.ini. A sample cpmaker.ini is included in this directory and in the binary distribution.
Buddabing's note: I am considering migrating this to a standard .ini file format, with command line options available to the various executables to change the various paths. For now, the cpmaker.ini must exist and must be comma-delimited.
In the cpmaker.ini, set the path names to match where you have extracted the sample panels and the image library, if they are not set to the defaults.
Before creating your own artwork, I recommend getting started by getting the included panel files to work. You can use the existing panel files as a template for creating your own.
To test BuddaMAME, try running it from a command line with the -log option.
mame gridlee -log
Try pressing pause. You should see the background image of a HotRod control panel, overlaid with a joystick, some buttons, and a trackball. Notice that only the controls actually used in the game are active. So, the trackball and one button are drawn normally, and the unused controls are dimmed out.