|
Last updated: 30th June 2004 General LayoutThe first suggestion I'll make is the use of indentation (using a single tab) and blank lines (to separate games). This means that there is consistency across data files and it also improves their readability. e.g. game ( name invaders description "Space Invaders" year 1978 manufacturer "Midway" rom ( name invaders.h size 2048 crc 734f5ad8 ) rom ( name invaders.g size 2048 crc 6bfaca4a ) rom ( name invaders.f size 2048 crc 0ccead96 ) rom ( name invaders.e size 2048 crc 14e538b0 ) ) game ( name invadpt2 description "Space Invaders Part II (Taito)" year 1980 manufacturer "Taito" rom ( name pv.01 size 2048 crc 7288a511 ) rom ( name pv.02 size 2048 crc 097dd8d5 ) rom ( name pv.03 size 2048 crc 1766337e ) rom ( name pv.04 size 2048 crc 8f0e62e0 ) rom ( name pv.05 size 2048 crc 19b505e9 ) rom ( name pv06_1.bin size 1024 crc a732810b ) rom ( name pv07_2.bin size 1024 crc 2c5b91cb ) ) You should also note that the use of double quotes ("s) is far more than just formatting. Like any programming language you must put quotes around anything that contains spaces. This applies to file names (games and ROMs), descriptions, manufacturers and the clrmamepro header items. Descriptions and manufacturers should always use double quotes whether or not they contain spaces. Data File HeaderCMPro data files use a 'clrmamepro' element to specify details such as the emulator name, description, category and the data file version. clrmamepro ( name Calice description "Calice v0.3.2" category "Capcom CPS-1 and CPS-2" version 20010531 author "Logiqx, http://www.logiqx.com/" ) Valid elements are:
GamesYear and ManufacturerThere are two 'semi-optional' fields that can be included for each game; 'year' and 'manufacturer'. However, CMPro displays the manufacturer in the scanner window so it isn't really optional! For the sake of completeness I would recommend you include year and manufacturer. e.g. game ( name invaders description "Space Invaders" year 1978 manufacturer "Midway" rom ( name invaders.h size 2048 crc 734f5ad8 ) rom ( name invaders.g size 2048 crc 6bfaca4a ) rom ( name invaders.f size 2048 crc 0ccead96 ) rom ( name invaders.e size 2048 crc 14e538b0 ) ) Clones and MergingThere are two fields that relate to the merging of ROMs; 'cloneof' and 'romof'. In MAME the 'cloneof' field represents a notional link between the two games and the 'romof' field represents that the ROMs themselves can be shared. CMPro actually ignores the 'romof' field and uses the 'cloneof' value to determine how the ROMs can be shared. However, you should use the MAME meanings of 'cloneof and 'romof' both for the sake of clarity and to allow faultless conversions between CMPro and RomCenter formats. If you don't use these fields correctly then you cannot guarantee that your data file will work as expected in CMPro and RomCenter for all three merge types. ROMsAn example ROM element is as follows: rom ( name invaders.h size 2048 crc 734f5ad8 ) General points to bear in mind:
ROM merging is defined using the 'merge' keyword. e.g. game ( name sisv description "Space Invaders (SV Version)" year 1978 manufacturer "Taito" cloneof invaders romof invaders rom ( name sv0h.bin size 1024 crc 86bb8cb6 ) rom ( name sv02.bin size 1024 crc 0e159534 ) rom ( name invaders.g merge invaders.g size 2048 crc 6bfaca4a ) rom ( name invaders.f merge invaders.f size 2048 crc 0ccead96 ) rom ( name tv04.m1 size 2048 crc cd2c67f6 ) ) In actual fact CMPro works out the 'merge' sub-element itself by checking if a ROM of the same name and CRC exists in parent (specified by the 'cloneof' element). However, in order for your dat to work correctly in RomCenter it must specify the 'merge' sub-element correctly. Always specify the merging information correctly or you cannot guarantee that your data file will work correctly in CMPro and RomCenter for all three merge types. In order to check that merge information is correct, run the data file through DatUtil and check the log file to see if DatUtil found issues with your merging. DisksCMPro includes disk support but at this time, RomCenter does not. MD5 and SHA1 do not both need to be specified in the data file: game ( name jdredd romof acpsx description "Judge Dredd (Rev C Dec. 17 1997)" year 1996 manufacturer "Acclaim" rom ( name coh-1000a.353 merge coh-1000a.353 size 524288 crc 8d8d0764 ) rom ( name j-dread.u36 size 131072 crc 37addbf9 ) rom ( name j-dread.u35 size 131072 crc c1e17191 ) disk ( name jdreddc sha1 83ed8df25d100b1c060f4dde2f162ba31803db7d ) ) SamplesCMPro includes sample support but it will only check that a sample of the correct name exists. Samples are specified as follows: game ( name invaders description "Space Invaders" year 1978 manufacturer "Midway" rom ( name invaders.h size 2048 crc 734f5ad8 ) rom ( name invaders.g size 2048 crc 6bfaca4a ) rom ( name invaders.f size 2048 crc 0ccead96 ) rom ( name invaders.e size 2048 crc 14e538b0 ) sample 1.wav sample 2.wav ) Sample sharing is achieved using the 'sampleof' keyword: game ( name invad2ct description "Space Invaders II (Midway, cocktail)" year 1980 manufacturer "Midway" rom ( name invad2ct.h size 2048 crc 51d02a71 ) rom ( name invad2ct.g size 2048 crc 533ac770 ) rom ( name invad2ct.f size 2048 crc d1799f39 ) rom ( name invad2ct.e size 2048 crc 291c1418 ) rom ( name invad2ct.b size 2048 crc 8d9a07c4 ) rom ( name invad2ct.a size 2048 crc efdabb03 ) sampleof invaders sample 1.wav sample 2.wav ) ResourcesResources are used by MAME for the sharing of common ROMs for a particular system (e.g. NeoGeo, PlayChoice-10, Deco Cassette, CVS). resource ( name neogeo description "Neo Geo BIOS" year 1990 manufacturer "SNK" rom ( name neo-geo.rom size 131072 crc 9036d879 ) rom ( name ng-sm1.rom size 131072 crc 97cf998b ) rom ( name ng-sfix.rom size 131072 crc 354029fc ) ) The ROM details for resources are actually built into CMPro (they are in the 'engine.cfg' file) but it is good practise to include them in your data file for the sake of completeness (and also essential for the RomCenter version of your data file). When a game uses ROMs from a resource it should not specify that it is a clone of the resource (via the 'cloneof' element), it should just specify it shares ROMs (through the 'romof' element). Clones of games that are on the same system should specify their parent in both the 'cloneof' and 'romof' elements as it is the parent itself that specifies the resource (e.g. 'sengokh' in MAME has 'cloneof' and 'romof' specified as 'sengoku'). game ( name sengoku description "Sengoku / Sengoku Denshou (set 1)" year 1991 manufacturer "SNK" romof neogeo ) game ( name sengokh description "Sengoku / Sengoku Denshou (set 2)" year 1991 manufacturer "SNK" cloneof sengoku romof sengoku ) |