Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: MaLa GameList Format  (Read 2318 times)

0 Members and 1 Guest are viewing this topic.

CaptainBadass

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:October 01, 2009, 06:12:20 pm
MaLa GameList Format
« 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!

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: MaLa GameList Format
« Reply #1 on: October 01, 2009, 10:21:21 am »
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.
« Last Edit: October 01, 2009, 10:24:02 am by NOP »

CaptainBadass

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:October 01, 2009, 06:12:20 pm
Re: MaLa GameList Format
« Reply #2 on: October 01, 2009, 06:12:20 pm »
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.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: MaLa GameList Format
« Reply #3 on: October 02, 2009, 04:12:59 pm »
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.