Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Jayme65 on May 16, 2007, 03:59:20 am

Title: Help on programming a frontend
Post by: Jayme65 on May 16, 2007, 03:59:20 am
Hi,

I'm thinking of programming a frontend as an exercice while I'm learning to program.

I understand that to make it work with mame I'll have to use the XML file produced by mame itself...but what about other emulator?

There is not such files available for each emulator (SNES, Gamegear...)?
So does it mean that I'll simply have to scan the rom folder of each emulator to get a list of roms inside...or is there another way?

Thanks very much for any kind help on the topic ;-)
Title: Re: Help on programming a frontend
Post by: youki on May 16, 2007, 06:49:41 am
Hi,

Even with MAME you don't really need to deal with the XML.  It really depends of that you want achieve.

If you want simply display the list of roms you have you can browse the roms folder, build a list and use it.  It will work for all emulators.

the problem wit the browsing method is if you have thousand of roms , it can me long. It is why usually you use predefined game list  (build from Mame.XML , or from -list or manuallly) to avoid to browse the folder.

the XML file of mame, can be used if you want do some more advanced feature, like sort game by category , control...etc...

I hope it helps you.

Title: Re: Help on programming a frontend
Post by: Jayme65 on May 16, 2007, 08:42:39 am
Thanks very much for your reply!

So, you confirm that there's no list available for other frontends...and that I would simply have to browse the "roms" folder to get the rom list and that's the way all other frontend works?

Thanks
Title: Re: Help on programming a frontend
Post by: youki on May 16, 2007, 09:29:22 am
I don't know all emulators, but most of them don't have lists .

Or most of them don't have a standard way to generate a list.

Therefore I think you can find some list on the web for various emulators. 

FrontEnd allows you in configuration tools to build a Game list from your roms folder  , and then the Front Ends load the Game list (without browsing to speed up the process).
Title: Re: Help on programming a frontend
Post by: gonzo90017 on May 16, 2007, 12:27:02 pm
With other arcade emulators you should use a .dat file. Since all arcade emus use the same naming format as mame http://www.logiqx.com/Dats/ For console emulators you could you do rom folder scan. Since all of them are named exactly like the game except for those annoying (J) (u) symbols. But there are frontends that get rid of them. I really like the way youki's frontend works in terms of lists. It uses a  meta data file that you can add, delete or change rom names to. So it works for all arcade emus.
Title: Re: Help on programming a frontend
Post by: Howard_Casto on May 16, 2007, 02:30:30 pm
Actually there IS a universally accepted standard for getting mame data, namely the clrmamepro dat format just mentioned.  It is the standard because up until recently, mame's "-listinfo" call outputted a dat in this format.  Now that mame spits out xml though, many of us (myself included) have added custom xml parsers for mame.  The beauty of mame is it's self-contained.  In theory you can set it up in a fe without any external files, just calls to mame itself.  This is why it's better to make your list generator launch mame, tell it to output a listinfo/xml file, parse it, and use that data to build your database.  With this method users don't have to worry about finding the latest dat file, they can just have mame generate it. 

For the rest of the emus out there, gonzo is correct in that it's best to use the clrmamepro files.  They are nicer than a simple rom=name list because they often contain additional info, like the manufacturer and the date of production. 
Title: Re: Help on programming a frontend
Post by: ajel.smith on May 17, 2007, 11:52:18 pm
Hi all
   I am a new member to this group. Tell me how to connect database with XML.
Thnx.