Author Topic: Mame software list import issue  (Read 8599 times)

ZeroQI

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Mame software list import issue
« on: August 20, 2016, 04:50:08 AM »
I am trying to create a display per system (snes, etc...) from mame complete romset
Windows 10 x64, so used latest mame 64 bit here: http://mamedev.org/release.html > "mame0176b_64bit.exe" [https://github.com/mamedev/mame/releases/download/mame0176/mame0176b_64bit.exe]

I would prefer have "Attrack Mode" get the list per system by itself, but seem like the whole list is taken (lxml) or crash (listsoftware). Used the Emulator configuration below:

Code: [Select]
# Generated by Attract-Mode v2.1.0
#
executable           C:\mame\mame64.exe
args                 snes -cart "[romfilename]"
rompath              Z:\Software\Emulation\Media\Roms\Mame\
romext               .zip;.7z
system               snes;Super Nintendo (SNES)
info_source          listxml
import_extras        Z:\Software\Emulation\Emulators\Mame\Catver.ini;Z:\Software\Emulation\Emulators\mame\nplayers.ini
artwork    flyer           Z:\Software\Emulation\Media\Flyer
artwork    marquee         Z:\Software\Emulation\Media\Marquee
artwork    snap            Z:\Software\Emulation\Media\Snaps;Z:\Software\Emulation\Media\Snaps\Videos
artwork    wheel           Z:\Software\Emulation\Media\Wheel

So i thought i would create it manually, no biggie...in command prompt i did create the listsoftware xml (attached) with:
Code: [Select]
C:\mame>mame64 -listsoftware snes>"mame - snes.xml"Moved the xml file to "Attract Mode" folder, then in command line:
Code: [Select]
C:\Users\Default.DESKTOP-B6V7IAG\Desktop\attract-v2.1.0-win64>attract -i "mame - snes.xml"
Code: [Select]
*** Importing Collection/Rom List: mame - snes.xml
[Import mame - snes.xml] - Imported 0 entries.
[Import Z:\Software\Emulation\Emulators\Mame\Catver.ini] - found info for 0 entries.
[Import Z:\Software\Emulation\Emulators\mame\nplayers.ini] - found info for 0 entries.

"attract /?" gives:
Code: [Select]
  -i, --import-romlist <file> [emu]
     Import romlist from the specified file. Supported formats:
        *.lst (Mamewah/Wahcade!)
        *.txt (Attract-Mode)
        *.xml (Mame listxml format or HyperSpin)
     The emulator to use for list entries can be specified as well

listsoftware xml don't seem to be supported. however https://github.com/mickelson/attract states:
Code: [Select]
You can also import romlists from mame listxml files as well as gamelists for other frontends. Supported source files include: *.lst (MameWah lists), *.txt (Attract-Mode lists) and *.xml (Mame listxml, listsoftware and HyperSpin lists):
The emulator page for mame list the listsoftware option so should be supported (although it crashes)

How can i fix command line list import?
Will it fix the crash when importing listsoftware from the gui ?
posted reply in https://github.com/mickelson/attract/issues/201 which seem to share some of the symptoms

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Mame software list import issue
« Reply #1 on: August 20, 2016, 10:43:52 AM »
Ok since you are trying yo import a list into attractmode and make a list for the front end itself I'm going to move this to the attractmode forum..general...

to be honest I made a list myself for the AES not to long ago. I never imported any lists. However I have not tried to use any part of the mess code in mame beyond that yet. My mess software is split into systems by folder and then I just use the correct argument and then have attract mode built a list from just that folder.
People want life easy..then complain about it

ZeroQI

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Mame software list import issue
« Reply #2 on: August 21, 2016, 01:46:06 AM »
Thanks for moving the post. I was conflicted since it was emulator specific, but the workaround list import as well but also a general function...

MAME and MESS merged in 0.162...
We need to be able to generate and import softwarelist from there as it's the only command to generate list per system.

From there i can create package of emulator config per system with relative path and also rom lists package to have a ready to use and move around emulation folder.
Nevato theme is great, look forward to have it per system. Already put the rom name as right lcd info...

mame64 -listsoftware neogeo > neogeo.xml (attached)
attract-v2.1.0-win64>attract -i neogeo.xml "mame - snes"
Code: [Select]
*** Importing Collection/Rom List: neogeo.xml
[Import neogeo.xml] - Imported 0 entries.
[Import Z:\Software\Emulation\Emulators\Mame\Catver.ini] - found info for 0 entries.
[Import Z:\Software\Emulation\Emulators\mame\nplayers.ini] - found info for 0 entries.

https://github.com/mickelson/attract/edit/master/src/scraper_xml.cpp seem to be where the magic happens
Here is the mod that added listsoftware support: https://github.com/mickelson/attract/commit/431e764e2bdffc671f8241ccb6c230cc96413852

https://github.com/mamedev/mame/releases?after=mame0167
tried mame0163b_64bit.exe version to generate snes xml list, still not imported with Attract Mode 2.1.0...

Mame listsoftware XML format:
Code: [Select]
<softwarelists>
<softwarelist name="neogeo" description="SNK Neo-Geo cartridges">
<software name="nam1975">
<description>NAM-1975 (NGM-001 ~ NGH-001)</description>
<year>1990</year>
<publisher>SNK</publisher>
<info name="serial" value="NGM-001 (MVS), NGH-001 (AES)"/>
<info name="release" value="19900426 (MVS), 19910701 (AES)"/>
<info name="alt_title" value="ナム1975"/>
<part name="cart" interface="neo_cart">
<feature name="release" value="MVS,AES" />
<feature name="compatibility" value="MVS,AES" />
<dataarea name="maincpu" size="1048576">
<rom name="001-p1.p1" size="524288" crc="cc9fc951" sha1="92f4e6ddeeb825077d92dbb70b50afea985f15c0" loadflag="load16_word_swap"/>
[...]
</dataarea>
</part>
</software>
<software ...name="bstars">[...]
looking at source code, if "software" is meant to be the root element, it won't work and need to replace software by softwarelists

Code: [Select]
void FeListXMLParser::start_element(
const char *element,
const char **attribute )
{
if (( strcmp( element, "game" ) == 0 )
|| ( strcmp( element, "software[u][b]lists[/b][/u]" ) == 0 )
|| ( strcmp( element, "machine" ) == 0 ))

doesn't work:C:\mame>mame64 -listsoftware snes>text.xml
work: C:\mame>mame64 -listxml snes>text.xml
« Last Edit: August 22, 2016, 06:52:16 PM by ZeroQI »