About ROM's. CHD's etc...
O.K. You've picked your version of MAME, you've downloaded it and installed it. Now your going to need to know about roms. Roms are the data extracted from the chips on an arcade game's circuit board. The MAME program emulates the processors, sound and graphics chips and uses roms to supply the game data.
You can download roms from several sources the best of which are P2P networks or newsgroups like alt.binaries.games.mame. Legally to have a rom on your PC you need to own the original chip. So to have the whole set or roms you need to own nearly 7000 arcade machines (you'll need a big house!). You must not distribute them or supply them with MAME. BIG BIG NO NO! There are a few legal roms here on MameDEV which are free to use. I'm not going to preach too much about this as nearly all MAME users don't own a single arcade machine and only want to re-live good times gaming. The risks are yours.
Roms strangely enough live in the roms folder. It's recommended that you keep them zipped but if for some strange reason you want to extract them, the files need to be put into a folder named the same as the original zip. e.g. puckman.zip would need to be extracted into a folder called puckman in the roms folder. (There isn't much point to this as the unzipping in MAME is so fast you won't notice it and extracted roms are up to 50% bigger than the equivalent zip.)
Parents & Clones
Be careful when getting roms as there are two types of sets. Parent sets contain a complete set of roms for a game whilst clone sets are for variants of a game and only contain roms that are different. The error a lot of people make is that they download a clone set, install it correctly and then find the game won't work as it's missing roms. These roms are in the parent set which hasn't been downloaded. To get the game to run you need BOTH sets.
What is a rom?
MAME uses three different types of rom data consisting of extracted rom files, BIOS files and CHD files. Standard ROM data is the most common and normally contains the main game program, graphics and music. There were a few systems that used floppy's and even cassettes but these are already put in the standard rom zip file.
Some systems require BIOS files to get them to work. For example Metal Slug which is a NEO-GEO game requires you to have the neogeo.zip BIOS file in your roms folder. BIOS files are kept separate as the contents are common to several games.
Here's what a rom zip file looks like...
Key things in rom files that affect whether MAME will run it include the name of each file, the size and the CRC. The name and the CRC are used to determine if the rom file is correct and if the size is wrong there may be data missing.
Use a program like CLRMame the check your roms for problems as it will compare what MAME is expecting to what you've got. It can fix several problems and will highlight more serious errors.
With more modern games needing so much data, hard disks or CD's were used to store the data. MAME supports these files in the form of CHD (Compressed Hunks of Data) files. Games that require CHD files need both a rom zip file and a CHD file which is stored separately to roms. For example Carnevil requires you to have carnevil.zip plus a folder called carnevil containing the file carnevil.chd. Note that the CHD file is NOT zipped. Confused? here's an example...
And the CHD folder...
It's fairly straightforward but has confused so many.