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: Base FE XML File - All In One  (Read 1978 times)

0 Members and 1 Guest are viewing this topic.

Onid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:April 28, 2005, 07:40:06 pm
  • I want to build my own arcade controls!
Base FE XML File - All In One
« on: March 16, 2005, 05:30:17 pm »
Wondering how many other FE developers use VB6 or .NET?

For a FE I am development I am creating a base lists creation tool.

This utility will use MAME.EXE, Controls.ini, and A category INI file to create the base file. The controls and category are optional. The controls and category files are found on other project sites.

The utiulity will spit out a massive XML file with the following game data:
Filename
Description (aka Game Title)
Year Made
Manufacturer
Chip Type
Video Type
# Audio Channels
# Players
# Coins
Controller Type
# Buttons
Button 1 Info
Button 2 Info
Button 3 Info
Button 4 Info
Button 5 Info
Button 6 Info
Button 7 Info
Button 8 Info
Button 9 Info
Button 10 Info
Command Line
Categories
Enabled or Disabled

Any other information you would find useful to store?

Also seperate category files will be created with a list of only filenames.

VB6 code will be given to show how easy it can be using just the rom filename to gather the above list of details about the game instantly. No more needing to load all data to the FE or parsing multiple files for the information.

Another utility attached will include a import/exort to Excel feature. It will conver the XML document to Excel so you can alphbatize, or add unknow information. Then using the utility import the newly saved Excel file to create an updated XML file.

Even if VB6 or .NET is not being used to code your FE you can use any XML code function to read the XML file.

bioart

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 90
  • Last login:November 28, 2006, 11:38:14 pm
    • The ArtCade
Re: Base FE XML File - All In One
« Reply #1 on: March 16, 2005, 08:40:47 pm »
Sounds Very useful... looking forward to it!

Art

)p(

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 964
  • Last login:March 27, 2009, 03:38:15 am
  • We are the Galaxians...
    • Emulaxian:cabinet and frontend
Re: Base FE XML File - All In One
« Reply #2 on: March 17, 2005, 02:10:54 am »
Take a look at buddabings listgen tool. It serves similar purposes. But it does not yet suppprt exporting lists in xml format.

peter

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: Base FE XML File - All In One
« Reply #3 on: March 17, 2005, 07:23:44 am »
I really don't like the XML format.  A flat file (like INI ones) with same information would be very usefull. The XML format force to use XML Parser or code your own. In all case it is slower than retrieve information from the flat file.

Personnaly my Front End is coded with C++ .  Configuration tools with Delphi.




Onid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:April 28, 2005, 07:40:06 pm
  • I want to build my own arcade controls!
Re: Base FE XML File - All In One
« Reply #4 on: March 17, 2005, 08:01:47 am »
I really don't like the XML format.

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: Base FE XML File - All In One
« Reply #5 on: March 17, 2005, 08:20:30 am »
What ever the format you use XML or Not, you need to read the file to access Data. You can read it partially or  not, but you need to read at least until you find the right data.  Unless you use hashcoding technique or indexes you can not reach the data directly.

the XML is a very speaky and heavy format.   If you use a XML parser to access you XML file from VB , I think your file is loaded in Memory and then you access it by browsing a kind of tree.

But if i don't like XML is not for performance issue. It is mainly for the Heavy Aspect. In the context of a front end it is not a real problem.  But more an more application use the XML to transfert data via the net, i'm working on XML Daily , and it is crazy the volume of data we don't need we transfert!  >:(

A quick test, Instead of generating XML for your file, generate a Flat INI file. You will see the difference in term of volume.




Onid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:April 28, 2005, 07:40:06 pm
  • I want to build my own arcade controls!
Re: Base FE XML File - All In One
« Reply #6 on: March 17, 2005, 08:41:03 am »
The testing I have performed shows the same speed when reaing the fir game listed in the XML or the last file listed. In all situations it is less than a half second to access and display the data.  This is using a 7MB xml file with every game currently supported my .94. I guess for those that still use INI I could build a seperate convertor exe that can convert the XML file that is created back to an INI structure. The way I have the XML structure setup is having the code tag each line with the filename.  For example

<numbuttons_chqflag>3</numbuttons_chqflag>

This way to parse the information it canse use the property value + filename to directly pull the information you are requesting.

Here is example of the code I am using.
--------------------------------------------------

Option Explicit
Dim XMLFilePath As String

Private Sub Form_Load()
  XMLFilePath = App.Path & "\biglist.xml"
End Sub

Private Function GetNodeValue(ByVal start_at_node As IXMLDOMNode, ByVal node_name As String, Optional ByVal default_value As String = "") As String
  Dim value_node As IXMLDOMNode
  Set value_node = start_at_node.selectSingleNode(".//" & node_name)
  If value_node Is Nothing Then
    GetNodeValue = default_value
      Else
        GetNodeValue = value_node.Text
  End If
End Function

Private Sub Command1_Click()
Dim xml_document As DOMDocument
  Dim values_node As IXMLDOMNode
  Set xml_document = New DOMDocument
  xml_document.Load XMLFilePath
  If xml_document.documentElement Is Nothing Then Exit Sub
  Set values_node = xml_document.selectSingleNode("mame")
  msgbox = GetNodeValue(values_node, "numbuttons_chqflag", "???")
End Sub

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: Base FE XML File - All In One
« Reply #7 on: March 17, 2005, 09:08:20 am »
I can be wrong , but i think your XML file is loaded in memory by this line.

xml_document.Load XMLFilePath

If it is the case you are using 7 mega of RAM just for your file.

But for sure, if you do the same file as INI not XML , i think i will use it.



Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re: Base FE XML File - All In One
« Reply #8 on: March 17, 2005, 09:26:27 am »
Wondering how many other FE developers use VB6 or .NET?

For a FE I am development I am creating a base lists creation tool.

This utility will use MAME.EXE, Controls.ini, and A category INI file to create the base file. The controls and category are optional. The controls and category files are found on other project sites.

The utiulity will spit out a massive XML file with the following game data:
Filename
Description (aka Game Title)
Year Made
Manufacturer
Chip Type
Video Type
# Audio Channels
# Players
# Coins
Controller Type
# Buttons
Button 1 Info
Button 2 Info
Button 3 Info
Button 4 Info
Button 5 Info
Button 6 Info
Button 7 Info
Button 8 Info
Button 9 Info
Button 10 Info
Command Line
Categories
Enabled or Disabled

Any other information you would find useful to store?

Also seperate category files will be created with a list of only filenames.

VB6 code will be given to show how easy it can be using just the rom filename to gather the above list of details about the game instantly. No more needing to load all data to the FE or parsing multiple files for the information.

Another utility attached will include a import/exort to Excel feature. It will conver the XML document to Excel so you can alphbatize, or add unknow information. Then using the utility import the newly saved Excel file to create an updated XML file.

Even if VB6 or .NET is not being used to code your FE you can use any XML code function to read the XML file.

My ListGen utility already builds arbitrary game lists. It builds XML lists, too.  (Kymaera uses XML in its game lists).
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

)p(

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 964
  • Last login:March 27, 2009, 03:38:15 am
  • We are the Galaxians...
    • Emulaxian:cabinet and frontend
Re: Base FE XML File - All In One
« Reply #9 on: March 17, 2005, 10:16:47 am »


My ListGen utility already builds arbitrary game lists. It builds XML lists, too.  (Kymaera uses XML in its game lists).


Oops, I did not know listgen already supported xml output  :-[

I think xml is a bit over hyped these days... I can appreciate the neatness of its structure and it has it uses...but for the most part I agree with Youki on this.

peter

Onid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:April 28, 2005, 07:40:06 pm
  • I want to build my own arcade controls!
Re: Base FE XML File - All In One
« Reply #10 on: March 17, 2005, 01:30:41 pm »

My ListGen utility already builds arbitrary game lists. It builds XML lists, too.

Onid

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:April 28, 2005, 07:40:06 pm
  • I want to build my own arcade controls!
Re: Base FE XML File - All In One
« Reply #11 on: March 17, 2005, 01:34:28 pm »
I can be wrong , but i think your XML file is loaded in memory by this line.

xml_document.Load XMLFilePath

If it is the case you are using 7 mega of RAM just for your file.

But for sure, if you do the same file as INI not XML , i think i will use it.


Ya it wont be a problem to have a radial button letting you choose XML or INI. For INI though should I just list all the option under [gamefilename] with no descriptions (use readme.txt to figure out order), or use descriptions like numbuttons=3. With descriptions you will have to split the string to find the data, but most programmers are used to this.

Also looking at the memory usage, I couldnt see my CPU or memory usage climb at all when pulling data from the XML. It probably does use the memory but does it so quickly it never registered. I will put in system requirement you must have a computer with 10MB or more just in case. :)