Introduction I have completed the first alpha build of an enhanced Mala game list generator which provides (I feel) the simplest, most user friendly way to create, manage, edit, and filter Mala game lists.
A word of warning before I continue: I purchased a MAME cabinet just a few weeks ago and know very little (almost nothing) about MAME, Mala, or the arcade scene in general. Everything I know about MAME at this point has originated from reviewing NOP's C++ ROMLister source code and Loadman's Delphi Mala source code and thanks goes out to those guys for providing it to me so I could realize my vision for a better game list editor! The code is still extremely early and has not been tested exhaustively on anything other than Windows 7 x64.There are 2 parts to this solution:
- mlgconverter.exe: the engine which converts mlg files to ini and ini files to mlg (command line - written in Delphi)
- malaGamelistEditor.exe: the graphical user interface which wraps mlgconverter.exe (requires .NET v3.5 - written in C#)
Features- Create new game lists
- Edit existing game lists
- Re-order existing gamelists
- Select the elements in the mame database to display onscreen (or hide)
- Sort by any of the elements in the mame database
- Group the records in the mame database by desired field
- Drag and drop games from mame database into game list
- Search game descriptions
- Change database view from 'Details', 'List View', or 'Tile View'
Using malaGamelistEditor.exe The first time you run malaGamelistEditor.exe you will be prompted to browse the the mame.xml file created by mala when you first ran it. If genre information is missing from the mame.xml file then you will be prompted if you want to merge genre information into your existing mame.xml document.
As the application is loading you will see a progress bar in the lower left hand side of the program which indicates its current progress.
It may take a few seconds to kick off if your database has 8,000+ records. Fig. 1 - Program is loaded and ready for use. Fig. 2 - User has changed the database from 'Details View' to 'Tile View'. Fig. 3 - User has right clicked the header column to select the rows to display. Fig. 4 - User has searched the database for the term 'Street Fighter'. Fig. 5 - User has selected the existing game list 'Fighter - 2.5D'.mlg and it is being parsed and loaded by mlgconverter.exe NOTES:- The program only loads *.mlg files from the same directory it is running in.
- You can refresh the mlg list drop down and database info by using the 'Refresh Form' button.
- You MUST save any changes you make to your game lists by using the 'Save' button in the tool bar.
- The * asterisk character in the mala game list section lets you know you've made unsaved changes.
- I have included a sample mlg file for you to play with (Fighter - Versus.mlg).
- The 'FTP to Arcade' option is disabled right now and I felt it was too complicated for most users.
Using mlgconverter.exe (ONLY For Non-Microsoft.NET v3.5 users or scriptwriters/programmers)The command line mlgconverter.exe utility is a Borland Delphi tool developed exclusively to provide a clean, portable method for reading and writing MaLa *.mlg files, which are essentially binary ini files, readable (more or less) only by Delphi applications.
All the respect in the world goes to ROMLister developer NOP, which managed to write mlg files with C++ with like 8 zillions lines of code. InterfaceUsage: mlgconverter.exe [task] [filepath]
Example: mlgconverter.exe export "c:\MaLa\GameLists\Fighters.mlg"
[Task] export - converts an mlg file to ini.
[Task] import - converts an ini file to mlg.
NOTE: Refer to template.ini for the valid ini file structure.
There are 2 parameters which the converter needs, the task to complete and the file to work on (
must be the full file path, not just the name of the file). The export task will convert an existing mlg file to plain-text INI and the import task will convert plain-text INI to binary mlg format, readable by MaLa.
The INI file standard used by MaLa (and mlgconverter) can be seen below:
[RomFileNameWithoutExtension]
name=
romOf=
cloneOf=
sourcefile=
description=
manufacturer=
genre=
inputPlayers=
inputControl=
videoScreen=
videoOrientation=
driverStatus=
driverColor=
driverSound=
driverEmulator=
driverGraphic=
controls=
joyUp=
joyDown=
joyLeft=
joyRight=
button1=
button2=
button3=
button4=
button5=
button6=
button7=
button8=
details=
romPath=
extension=
Not all these values are required by MaLa, but I can't tell you which ones are because I just create an INI file based on the data in the mame.xml file. You would have to play around to determine which values are absolutely required.
Each section header is the name of the rom (for example: [sf2ce] is the header for Street Fighter 2: Championship Edition and the values in the section are all for that game).
DownloadPlease note that
YOU MUST HAVE .NET V3.5 INSTALLED to run the graphical program.
http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=enMaLa Game List Tools .NET release
CHANGELOG
1.0.0.0 - initial release
1.0.0.1 - fixed UnhandledException: Sequence Contains no Elements bug when saving/updating certain game lists
- added cloneOf as an indexed/sortable attribute in the mamedb
- fixed UnhandledException when user is prompted to select mame.db and hits cancel
- added ability to filter clones from results
- newly created gamelists appear in gamelist drop down without having to refresh the entire database
- fixed prompt for saving changes bugs
Version 1.0.0.0 (08/2010) - MediaFire.comVersion 1.0.0.1 (09/2011) - MediaFire.comLessons Learned & 'Gotchas' in the .NET Framework
http://www.codeproject.com/KB/dotnet/FunWithProcesses.aspx ConclusionPlease let me know if this tool gets used and if you find it useful to you. Realistically, the code base is not production ready but it works and does what I wanted it to do but I don't want to put too much more time into this if I'm the only one using it.
Just wanted to share,
Cheers!