The NEW Build Your Own Arcade Controls
Front End Support => MaLa Frontend => Topic started by: CaptainBadass on September 30, 2009, 02:44:03 pm
-
Creating GameLists are a pain, so I decided to develop my own simple tool that shows a game screenshot and name, then you choose a category, and then it proceeds to showing the next game. Aftwards, MaLa GameLists would be generated based on the choices. Since it's quite easy to judge a category/genre from a screenshot, I figured that this way would be quite affective.
Now here's the problem. I have no idea how to generate a MaLa GameList. I've looked at .mlg files in a hex editor, and I'm quite baffled. I've looked at the RomLister source code to get an idea, but my C++ knowlegde if fairly limited (I'm developing the tool in Visual Basic 2008, don't laugh :P ).
So if anyone has any idea as to how the .mlg format works, I'd appreciate your help.
Thanks!
-
yeah. You're in for a long ride.
mala game lists are pretty much a text file with some non-text values separating the data elements. it took me a few weeks and a lot of testing to be able to duplicate the sample lists that I had.
there's some sample source code on the mala home page about making the lists, but it's in delphi. I converted that into a structure in malalistdef.h in the romlister source, and most of your clues will be there. What it boils down to is that there's a header at the top of the file that defines the path and the title of the list and a few other items, then each entry is a duplication of the structure.
Each element inside the structure has it's own data:
Every string in the structure starts with a 06, then the size in bytes of the string itself, then the string. The string is not NULL terminated. Example: 06,08,"mystring"
Every BYTE value in the structure starts with a 02. Ie, if a game entry's # of buttons is 4, the data would be 02,04
Every LONG value in the structure starts with a 03. Ie, if a game entry's year was 1980, the data would be: 03, bc, 07
It's ugly. Even though the file is mostly text, you have to write it in binary.
If loadman ever changes the formatting, we're both screwed. ;)
edit: byte swap.
-
Thank you so much :D I understand it now, and should be generating my own game lists soon. Just gotta write the code to get the info from mame.xml.
There is one thing I don't quite understand, and that's how the created/modified date and time is stored in the header. What's the data type and time stamp format? I'd imagine I could get away with just using copied data from a pre made game list, but I would like to be thorough :)
Thanks again, I wouldn't be able to do this without your help.
-
it appears in my code that I never figured the date/time stamp out either. I just hard code it to the same values as my example .mlg list had.