MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

jclampy
MAME Fan
Reged: 09/16/11
Posts: 105
Send PM


How to create a list of specific information from Mame.exe
#267036 - 10/23/11 04:01 AM


Hi all,

I am wanting to create a list of 'x & y resolution' data only of all games. Don't need to include game names or anything else.

For example:
100x120
102x124
160x120
200x150
etc....

I would also like this list to be sorted from biggest to smallest if possible?

I was going to use the -listinfo but it wasn't working for me so I am trying -listxml. I have tried editing the 'stylesheet' but I don't know how to get it to give me only the information I need.

Here's the main part of what I have at the moment but I need to cut it down more, can someone tell me how to change it to get what I need; (or any other way to get what I need)

Here is my current editing attempt of a stylesheet for xml2info.xsl:
http://pastebin.com/z94nrLfT

I am trying to do some calculations for an 'aperture.png' that can be used for all output resolutions that are a multiplication of original game resolutions. If I can at a quick glance get a look at all game resolutions this will help greatly.

Any help appreciated, thankyou.

*** Having trouble pasting the code to this post, anyhelp on how to do that as it's not showing up? ***
Edit: added code using pastebin

Edited by jclampy (10/23/11 04:43 AM)



Read about my latest custom HLSL setup here;
http://gamingnos.blogspot.com/



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: jclampy]
#267040 - 10/23/11 05:40 AM


Just FYI: Some games change their resolution WHILE they are running.

- Stiletto



jclampy
MAME Fan
Reged: 09/16/11
Posts: 105
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: Stiletto]
#267041 - 10/23/11 06:02 AM


Hmm, that does raise an interesting question, that I have no solution for.

At the end of the day it looks like the 'aperture.png' needs to be implemented in a way that can cope with final output display resolutions that can be different by 1 pixel (or the appropriate pixel size after magnification).

Most games I would probably run at a magnification of 3x or 4x so then 1 original game pixel is displayed as a 3x3 pixel or 4x4 pixel respectively.

Anyway, if using a magnification of 3x and also an aperture.png where 1 pixel is signified as a 3x3pixel, then that doesn't allow much room for detail or accuracy. When using a 2x magnification I don't think an aperture.png 1 pixel could be represented as a 2x2pixel;(the detail of rgb just can't be done).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sorry for rattling on there..

What resolutions are listed then? Just the initial resolution when first started?

Still it would be interesting to get a run down of the resolutions. It must be possible to get the list created, if someone that understands the code can have a quick look and point out which lines to remove to make the list only show resolution numbers only.

Sorting I imagine would be a little more difficult.



Read about my latest custom HLSL setup here;
http://gamingnos.blogspot.com/



krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: jclampy]
#267047 - 10/23/11 07:28 AM Attachment: screen_size_xsl.zip 2 KB (6 downloads)


I've attached a stripped down XSL file that dumps out the screen type (raster/vector), followed by orientation (horizontal/vertical), followed by the screen resolution (adjusted for screen orientation).

I took the output from the modified XSL and sorted and removed duplicates using a text editor (UltraEdit), and I put that in the attached zip as well.

Note: I added a little code to left pad the screen size numbers so that they sorted in a sensible fashion. I couldn't figure out any simple way to sort them in the XSL, so I just did it after the fact, as I explained above.

Also, I used MAME 0.143 to do my testing, so the output file in the zip is only accurate for that version of MAME.



GroovyMAME support forum on BYOAC



jclampy
MAME Fan
Reged: 09/16/11
Posts: 105
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: krick]
#267051 - 10/23/11 08:07 AM


Thankyou very much krick, that was absolutely fantastic!



Read about my latest custom HLSL setup here;
http://gamingnos.blogspot.com/



RobbbertModerator
Sir
Reged: 08/21/04
Posts: 3204
Loc: A long way from you
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: jclampy]
#267056 - 10/23/11 12:00 PM


> Thankyou very much krick, that was absolutely fantastic!

You can do this at the command line, although it doesn't get rid of the duplicates

mame -listxml | find "width" | sort > yourfile.txt



Roman
Regular
Reged: 09/21/03
Posts: 1584
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: Robbbert]
#267059 - 10/23/11 02:14 PM


people should learn xslt



krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: Roman]
#267067 - 10/23/11 05:22 PM


> people should learn xslt

I know how to sort simple things like by game name or some top-level node that all games have. However, the width/height are within a conditional section that depends on the game being horizontal or vertical orientation, so I couldn't figure out an easy way to sort within the xslt.

I made a decision about what my time was worth and decided that I should just sort and remove duplicates in 2 seconds with my text editor.



GroovyMAME support forum on BYOAC



Roman
Regular
Reged: 09/21/03
Posts: 1584
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: krick]
#267135 - 10/24/11 04:26 PM


jeesus..haven't even seen that you were already using xslt I might have a look at your transformation later



mogli
MAME Fan
Reged: 01/26/08
Posts: 1956
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: Roman]
#267516 - 10/29/11 11:43 PM


I swear MAME32/UI post-video re-write had this option in the folder tree. No longer, though.



Consider it high comedy....sincere tragedy....whatever...don't take it personally.

The Culture




redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: How to create a list of specific information from Mame.exe new [Re: mogli]
#267519 - 10/29/11 11:53 PM


> I swear MAME32/UI post-video re-write had this option in the folder tree. No longer,
> though.

It was probably from a catlist folder from... http://www.progettoemma.net/?catlist


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 686 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1824