EMULAB Forum

clrmamepro [English] => clrmame Discussion => Topic started by: Carbon on 23 July 2013, 16:02

Title: Create a .dat file using a Mac
Post by: Carbon on 23 July 2013, 16:02
Hi,

normally I use a Windows executable of MAME or MESS in conjunction with ClrMAME using Wine on my Mac.

As an experiment, I just tried creating a .dat file using the -listxml option of SDLMAME directly on Mac OS X. This worked fine for MAME, but when Ido the same with SDLMESS, I get lots of errors when trying to load the corresponding file (Set: <no description>\<no set name> wasn't imported).

What am I doing wrong here (I'm using 0.149u1)?
Title: Re: Create a .dat file using a Mac
Post by: Roman on 23 July 2013, 17:14
Well...did you look at the -listxml output? Redirect it yourself to a file and check if it actually is a valid xml file with valid entries.

......and of course for a MESS import you need to switch to a MESS xml parser in profiler->create...
Title: Re: Create a .dat file using a Mac
Post by: Carbon on 23 July 2013, 22:53
These are the first line of the .dat file:
Code: [Select]
<?xml version="1.0"?>
<!DOCTYPE mess [
<!ELEMENT mess (machine+)>
<!ATTLIST mess build CDATA #IMPLIED>
<!ATTLIST mess debug (yes|no) "no">
<!ATTLIST mess mameconfig CDATA #REQUIRED>
<!ELEMENT machine (description, year?, manufacturer?, biosset*, rom*, disk*, device_ref*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, adjuster*, driver?, device*, slot*, softwarelist*, ramoption*)>
<!ATTLIST machine name CDATA #REQUIRED>
<!ATTLIST machine sourcefile CDATA #IMPLIED>
<!ATTLIST machine isbios (yes|no) "no">
<!ATTLIST machine isdevice (yes|no) "no">
<!ATTLIST machine ismechanical (yes|no) "no">
<!ATTLIST machine runnable (yes|no) "yes">
<!ATTLIST machine cloneof CDATA #IMPLIED>
<!ATTLIST machine romof CDATA #IMPLIED>
<!ATTLIST machine sampleof CDATA #IMPLIED>
<!ELEMENT description (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT manufacturer (#PCDATA)>

Seems ok to me. I used the "Add DatFile..." button for MAME and MESS, as the "Create..." button expects an executable file, so I don't understand your last suggestion.
Title: Re: Create a .dat file using a Mac
Post by: Roman on 24 July 2013, 06:49
As you can see, MESS is not using game elements but machine elements. That's why you have to switch to a different "Emulator" type in Profiler->Create. There you switch to MESS.

But I guess you can't do a direct import from a binary using WINE or other Windows emulators...

So you either convert your MESS XML with XSLT to a MAME XML one or you can add the following to cmpro's engine.cfg:

engine (
   name MESS_DATFILE
   cachefile _messdatfdat
   replace machine game
)

Restart cmpro and then you need to be sure to load the datfile with "datfile type "MESS_DATFILE" (profiler bottom left)...
Title: Re: Create a .dat file using a Mac
Post by: Carbon on 24 July 2013, 08:36
I made the changes but I'm getting the same errors.

I've attached a screenshot so you can see that I did the changes correctly and changed DatFile Type to MESS_DATFILE.
Title: Re: Create a .dat file using a Mac
Post by: Roman on 24 July 2013, 08:51
well, you can send me your datfile and I can try it (on a windows machine though)...
Title: Re: Create a .dat file using a Mac
Post by: Carbon on 24 July 2013, 09:33
Here it is.
Title: Re: Create a .dat file using a Mac
Post by: Roman on 24 July 2013, 09:45
thanks...
I don't know if I can look at it this week but next week definetly....
Title: Re: Create a .dat file using a Mac
Post by: Carbon on 24 July 2013, 09:56
No problem, thank you for your help!
Title: Re: Create a .dat file using a Mac
Post by: Roman on 24 July 2013, 10:05
well, a quick way for you would be to replace opening and closing machine xml elements with corresponding game elements with a text editor...
Title: Re: Create a .dat file using a Mac
Post by: Roman on 24 July 2013, 17:48
ok...use this in your engine.cfg

engine (
   name MESSDAT
   gamelist mess
   cachefile _datfdatm
   replace machine game
)


and use this build...
http://mamedev.emulab.it/clrmamepro/binaries/cmp20130724.rar (http://mamedev.emulab.it/clrmamepro/binaries/cmp20130724.rar)
Title: Re: Create a .dat file using a Mac
Post by: Carbon on 25 July 2013, 08:50
Works perfectly now, thanks a lot!

Will these changes be added to a new version of CMP permanently?
Title: Re: Create a .dat file using a Mac
Post by: Roman on 25 July 2013, 09:14
not the engine.cfg ones but the cmpro binary changes of course