Main > Software Forum
Aaron removes xml2info as of u12 (in other words, we are screwed)
Howard_Casto:
--- Quote from: Buddabing on July 18, 2006, 09:27:32 am ---XML parsers don't have to be slow. My XML parser takes 2-3 seconds on my crappy 1 GHz laptop.
Keep in mind that a special-purpose XML parser written just for the -listxml output will always outperform a general-purpose XML parser like expat.
It is important to me that other people's code runs well. Therefore, once v0.107 comes out, I will write some code to make my listxml parser available as a DLL, so that it will be usable to any Windows progam. I will also make it available as a plain library for linux users.
--- End quote ---
It'd be appreciated. Actually that's what I've discovered myself and it was kind of the point to this whole thread. The "off the shelf" parsers as it were are crap for parsing listxml.
What I'm using now is sax with a custom event handling class that ignores trees and nodes and all that crap and just scans the document on a element by element basis. Since the original listxml grouped things similarly, I can just look for key names and go from there. It gets quicker as I tweak it further, but the fact that you can get good performance just by running listxml through joe-blow's pre-built parser is just plain false. There are too many branches to our little tree. ;D
XLS is also compelling. I looked into it and honestly the syntax to make a template was beyond me. I got confused and left it. So good work on that one krick.
Reagardless, since I've been forced to translate the data myself, I probably won't be converting it back to listinfo just to have it converted for my needs again. I'll just put a special case function in for mame, which isn't what I like to do, but it'll keep things speedy. I think the other methods are important though, manily because nobody will want to use my crappy code and aside from dat-util, many of the dat managers are going to be broken in the create your own dat dept.
Minwah, about the ctrlr files, they have had "issues" like this for a while now, and it needs to be addressed. Something I discovered the other day is that you can no longer re-map the special playchoice 10 buttons anymore via ctrlr files. Before they werre mapped to service1-service4. Now they are all mapped to "service" with a different bit mask offset for each input. This is ok for cfg files, but since ctrlr files don't support bitmasks you can't remap them anymore. For that matter you can't remap any custom input. The ctrlr files need to be changed not only to support analog values, but bit offset values as well. I honestly don't understand why they aren't now as cfg files are basically the same thing and they do. Regardless, it's a little beyond me in the scope of what I can change in mame. It's probably something Aaron himself would have to do.
krick:
--- Quote from: Howard_Casto on July 18, 2006, 02:47:09 pm ---XLS is also compelling. I looked into it and honestly the syntax to make a template was beyond me. I got confused and left it. So good work on that one krick.
--- End quote ---
I've got the whole thing working now, except for one game "phrcraze".
One of the dipswitch value names has quotes in it... Topic "8" ...GRRRRRR!!!!!!
In XSL, there's a function that replaces any single character for any other character in a string, however, I need to replace a quote character ["] with an escaped quote character [\"], which itself is two characters.
I've found some XSL string replacement code but I'm still trying to understand it.
Incidentally, the whole transformation takes about 3 seconds using the command line tools I referenced in my other post.
Pi:
I'd like to point out that DatUtil by Logiqx (www.logiqx.com) can transform MAME's XML output to the old datinfo format, keeping most of the attributes. I don't know how well does it currently keep those attributes, but you can try and propose the necessary changes to him.
krick:
I've finished the first version of the XSL Transformation.
You can grab it with a command line XLST processor from here...
http://mame.3feetunder.com/xml2info/
You run it at the command line like this...
xsltproc xml2info.xsl yourfile.xml > yourfile.info
EDIT: found a bug already and just uploaded the new version.
Howard_Casto:
--- Quote from: Pi on July 18, 2006, 03:51:45 pm ---I'd like to point out that DatUtil by Logiqx (www.logiqx.com) can transform MAME's XML output to the old datinfo format, keeping most of the attributes. I don't know how well does it currently keep those attributes, but you can try and propose the necessary changes to him.
--- End quote ---
Yeah it works, but it seems to only keep data relevant to crc checking. He's always good about updating it though, the issue comes with the rommanagers themselves, which aren't updated as often.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version