Software Support > GroovyMAME
Linux-command-line-tools for mame-gamelist-processing
krick:
There are some other XSL tool options on this page...
http://www.xml.com/pub/a/2003/11/26/learnXSLT.html
1) Instant Saxon for Windows (command line).
2) xRay2 for Windows (gui).
3) Xalan for Linux.
You can use a browser to do the XSL transform (also explained on the page above), but I'm guessing that will probably be very slow as well.
EDIT: there's a newer version of Saxon called "Saxon-HE" (currently ver 9.4) that supports XLST 2.0 and runs on Java 1.5 or higher... http://saxon.sourceforge.net/#F9.4HE
Assuming you have the following files all in the same directory (and Java configured correctly)
saxon9he.jar
mame.xml
xml2info.xsl
...you can run this command line in that directory:
java -jar saxon9he.jar -s:mame.xml -xsl:xml2info.xsl -o:listinfo.txt
...where...
-s is the source file
-xsl is the file containing the xsl transform
-o is the output file
Paradroid:
--- Quote from: Lomaxx on April 14, 2012, 09:16:19 am ---Here is the result for quick reading:
--- Code: --- 592 width="256" height="224"
438 width="320" height="224"
322 width="256" height="240"
304 width="320" height="240"
193 width="288" height="224"
--- End code ---
--- End quote ---
Very cool!
So, if we look at that top 5, that's very interesting. Are those figures based on parents sets only or are clones included?
Lomaxx:
That statistic was based on the selection from the entire output.xml without games having a status of preliminary (only "good" and "imperfect") or containing the phrase "cloneof="...".
I ran the same line on the complete "groovymame_output_re-lined.txt"-file which consists of 10630 entries (lines):
--- Code: ---grep -E -o "width=\"[[:digit:]]*\" height=\"[[:digit:]]*\"" groovymame_output_re-lined.txt | sort | uniq -c | sort -r
--- End code ---
and this is the result:
--- Code: --- 1587 width="256" height="224"
877 width="320" height="224"
818 width="640" height="480"
732 width="320" height="240"
556 width="384" height="224"
552 width="256" height="240"
498 width="288" height="224"
251 width="512" height="288"
181 width="336" height="240"
175 width="256" height="256"
161 width="512" height="224"
155 width="512" height="256"
149 width="384" height="240"
131 width="384" height="256"
130 width="496" height="384"
100 width="260" height="224"
96 width="512" height="384"
95 width="512" height="240"
91 width="416" height="224"
86 width="256" height="232"
80 width="448" height="224"
73 width="240" height="240"
72 width="399" height="253"
70 width="640" height="240"
64 width="240" height="224"
61 width="352" height="240"
59 width="304" height="224"
56 width="256" height="192"
55 width="384" height="232"
55 width="320" height="232"
50 width="256" height="248"
47 width="320" height="200"
45 width="512" height="480"
44 width="544" height="480"
41 width="704" height="480"
37 width="671" height="216"
37 width="240" height="192"
34 width="464" height="248"
33 width="512" height="400"
32 width="504" height="296"
32 width="320" height="256"
32 width="288" height="216"
32 width="256" height="208"
31 width="800" height="600"
26 width="360" height="240"
25 width="400" height="256"
25 width="304" height="216"
23 width="508" height="384"
22 width="272" height="224"
22 width="240" height="248"
20 width="292" height="240"
19 width="672" height="240"
19 width="576" height="224"
19 width="508" height="240"
19 width="400" height="300"
17 width="488" height="384"
17 width="384" height="280"
17 width="294" height="238"
16 width="432" height="224"
16 width="400" height="224"
15 width="640" height="400"
15 width="512" height="448"
15 width="280" height="240"
13 width="400" height="280"
13 width="400" height="240"
13 width="288" height="240"
13 width="280" height="224"
12 width="240" height="256"
11 width="512" height="228"
11 width="368" height="240"
11 width="336" height="239"
10 width="720" height="480"
10 width="480" height="64"
10 width="304" height="240"
10 width="280" height="210"
9 width="703" height="272"
9 width="640" height="200"
9 width="512" height="236"
9 width="496" height="480"
9 width="272" height="236"
8 width="480" height="240"
8 width="394" height="240"
8 width="360" height="224"
8 width="319" height="255"
8 width="192" height="22"
7 width="512" height="512"
7 width="400" height="248"
7 width="384" height="384"
7 width="1024" height="1024"
6 width="480" height="480"
6 width="368" height="256"
6 width="336" height="225"
6 width="256" height="231"
6 width="248" height="256"
6 width="248" height="240"
5 width="576" height="400"
5 width="544" height="200"
5 width="480" height="464"
5 width="360" height="245"
5 width="338" height="240"
5 width="321" height="224"
5 width="256" height="216"
4 width="576" height="432"
4 width="512" height="248"
4 width="432" height="256"
4 width="392" height="224"
4 width="380" height="224"
4 width="352" height="256"
4 width="320" height="190"
4 width="294" height="294"
4 width="276" height="240"
4 width="236" height="224"
3 width="720" height="768"
3 width="704" height="240"
3 width="640" height="300"
3 width="544" height="242"
3 width="511" height="399"
3 width="508" height="254"
3 width="416" height="256"
3 width="376" height="224"
3 width="368" height="232"
3 width="352" height="296"
3 width="322" height="241"
3 width="296" height="480"
3 width="296" height="224"
3 width="256" height="222"
3 width="240" height="252"
3 width="224" height="240"
2 width="512" height="432"
2 width="512" height="232"
2 width="508" height="224"
2 width="496" height="232"
2 width="464" height="224"
2 width="432" height="320"
2 width="416" height="208"
2 width="376" height="240"
2 width="368" height="224"
2 width="336" height="238"
2 width="319" height="240"
2 width="318" height="239"
2 width="312" height="288"
2 width="304" height="256"
2 width="296" height="296"
2 width="288" height="208"
2 width="264" height="240"
2 width="256" height="288"
2 width="256" height="239"
2 width="256" height="234"
2 width="256" height="230"
2 width="248" height="224"
2 width="248" height="216"
2 width="240" height="232"
2 width="232" height="224"
2 width="224" height="224"
2 width="223" height="240"
2 width="208" height="208"
2 width="192" height="216"
2 width="160" height="200"
2 width="1280" height="240"
2 width="1280" height="1024"
1 width="736" height="264"
1 width="671" height="272"
1 width="648" height="240"
1 width="640" height="256"
1 width="512" height="249"
1 width="512" height="192"
1 width="496" height="224"
1 width="480" height="224"
1 width="448" height="240"
1 width="384" height="512"
1 width="384" height="128"
1 width="376" height="250"
1 width="376" height="248"
1 width="368" height="448"
1 width="366" height="240"
1 width="352" height="224"
1 width="342" height="240"
1 width="338" height="236"
1 width="336" height="248"
1 width="335" height="240"
1 width="320" height="248"
1 width="320" height="236"
1 width="319" height="223"
1 width="318" height="240"
1 width="316" height="239"
1 width="304" height="232"
1 width="296" height="240"
1 width="292" height="231"
1 width="280" height="232"
1 width="272" height="200"
1 width="264" height="224"
1 width="260" height="240"
1 width="256" height="512"
1 width="256" height="184"
1 width="255" height="232"
1 width="254" height="240"
1 width="240" height="216"
1 width="232" height="256"
1 width="224" height="232"
1 width="224" height="192"
1 width="216" height="224"
1 width="208" height="240"
1 width="192" height="208"
1 width="192" height="192"
1 width="184" height="176"
1 width="1024" height="512"
--- End code ---
This are altogether 9479 resolutions. Note that a few entries have two resolution-descriptions (like described before in this thread) and others have none at all (obviously, as 9479 is less than 10630).
krick:
An easy way to test for vertical in code using the value of the "rotate" attribute from the XML...
(rotate / 10) mod 2
If the result is 0, then it's horizontal, if the result is 1 it's vertical.
for example...
(0 / 10) % 2 = 0
(90 / 10) % 2 = 1
(180 / 10) % 2 = 0
(270 / 10) % 2 = 1
Probably not the fastest way to do it since div and mod aren't exactly fast operations, but it does work.
Paradroid:
--- Quote from: Lomaxx on April 19, 2012, 09:27:38 am ---That statistic was based on the selection from the entire output.xml without games having a status of preliminary (only "good" and "imperfect") or containing the phrase "cloneof="...".
--- End quote ---
Thanks for the clarification. That makes sense.
Now, I assume there's a field for refresh rate? Would be interesting to see a similar listing to see what the range is (and graduations across the range)...
The mind boggles... there are so many different ways I can think of to manipulate this data.
I guess one cool outcome would be to create a test suite of games that covers the full range of resolutions and refresh rates used. Especially those that feature smooth scrolling...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version