(This is common but not required it may be omitted from drivers for systems with framebuffer- or GPU-based video rendering.) A GFXDECODE_START structure, linked to one or more gfx_layout structures, to define a machine's graphics layout.A list of input devices and DIP switches.(When the driver has multiple source files, this is done in a header file placed in /src/mame/includes.) This holds the driver data and all associated methods. A declaration of a class derived from driver_device.video - Video board drivers go here in /src/mame, video IC drivers go here in /src/devices.Īny driver in MAME typically consists of: machine - Non-CPU IC and subsystem drivers go here. Only necessary for games that have unusual screen layouts. includes - Headers for entire systems go here. cpu - CPU cores and disassemblers go here. Since there is some overlap, and since only some are relevant to writing a driver, only a subset of them will be described. Under each of these are several subdirectories. /src/devices - All core subsystems (CPU cores, audio chips, etc.) go here./src/mame - All MAME-specific subsystems (drivers, sound boards, video boards, etc.) go here.There are two directories in the MAME codebase that are relevant for writing a driver the rest should be ignored unless one is porting MAME to a different platform - in which case, good luck.
A guide on how to work with MAME's core systems.A good starting point for a larger guide on the MAME source base.A step-by-step guide on how to emulate a single game in MAME.An explanation of the most common structures found in drivers.This series of articles should provide some insight into the way MAME works on a driver level and provide a good starting point for anyone who wants to contribute to pre-existing drivers in MAME. MAME can provide a good starting point, but can itself be quite daunting to get into. Emulating any system can be a daunting task, even to experienced software engineers.