New AML release 0.9.4
It's been a long time (almost a year) since the last AML release. During this time, AML has evolved a lot and many components of the addon have been totally rewritten from scratch. AML 0.9.4 comes fully loaded with a lot of new features and I hope you will enjoy it!
NOTE AML is still under heavy development and the format of the databases may change in the future. Do not make huge lists of Favourites because there could be incompatibilities with future versions (in other words, it may be possible that you will need to wipe out your favourites in order to upgrade AML).
The instructions on the first and second post of this thread need and update to follow up with all the new features of AML 0.9.4. You you should be able to figure out the new menus and settings
Over the following weeks, I will try to improve the documentation and create a wiki in Github.
Some of the most important new features are ...
ROM/Asset cache for MAME machines
AML 0.9.4 navigation is now faster than ever owing to a new ROM and asset cache. The disadvantage is that every time the database is changed or ROMs/assets are scanned the cache must be rebuilt. The cache rebuild may take a couple of minutes but is it worth it.
File scanner cache
Scanning of MAME and SL ROMs/Assets is now much faster thanks to the file scanner cache ported from Advanced Emulator Launcher.
Parent/Clone Asset substitution
Parents can use Assets from Clone machines and Clone machines can use Assets from the Parent machine or other Clone machines.
DAT file support
AML now supports History.dat, MameInfo.dat, Gameinit.dat and Command.dat. History.dat is also supported on Software List items. You can access the DAT information by selecting a machine and opening the context menu,
Info/Utils,
View History/MameInfo/Gameinit/Command DAT.
MAME machine plot generation
AML is now able to generate a plot for MAME machines with some useful information. For example:
Code:
Controls Only Buttons
One raster horizontal screen
Non-mechanical / Driver is 88games.cpp
Machine has 2 coin slots
Artwork, Manual, History, Info, Gameinit, Command
SL sms, snes
The first line tells you about the controls used by the machine. Second line informs about the number of screens. The third line reports wheter the machine is mechanical or not and the MAME driver. The fourth line informs about the number of coin slots. The fifth line informs if the machine has artwork available and manual are available and the support in the DAT files (in this example, the machine has entries in History, MameInfo, Gameinit and Command DATs. The last line is present if the machine supports Software Lists.
ROM/CHD audit support
At last, AML is able to show the ROMs of a MAME machine and also audit all your ROMs, CHDs and Samples. To view the ROMs of a machine open the context menu,
View / Audit,
View MAME machine ROMs (ROMs DB). The ROMs database display the ROMs as they appear in the MAME XML file.
You can also show the ROMs in the audit database in the context menu
View / Audit,
View MAME machine ROMs (ROMs DB). The ROM Audit database has the location of each ROM (the ZIP file and directory where the ROM must be) and varies depending if you have a Merged, Split or Non-merged set.
You can audit the ROMs of individual machines in the context menu
View / Audit,
Audit MAME machine ROMs.
In addition, you can audit all your MAME ROMs/CHDs in one go. Open the context menu in AML root window,
Setup plugin,
Audit MAME machine ROMs/CHDs. The audit process will take several minutes. The audit process will produce several reports that can be read in the context menu
View,
View audit reports ...
ROM viewing and audit is also supported for Software Lists.
Fanart generation from XML templates
Unfortunately, the vast majority MAME machines do not have a Fanart, only the most popular games do. Fanart is especially important in skins that do not support AML. To overcome this, AML is now able to build a Fanart from other pieces of artwork. This is an example of a generated Fanart for a MAME machine:
And this is an example of a generated Fanart for a Software List item:
AML-generated MAME Fanarts are defined in a XML template that will look familiar to Kodi skinners
An example of this XML Fanart template file looks like this:
xml:
<!-- AML MAME Fanart template -->
<Advanced_MAME_Launcher_MAME_Fanart>
<!-- Artwork images -->
<Title>
<width>450</width>
<height>450</height>
<left>50</left>
<top>50</top>
</Title>
<Snap>
<width>450</width>
<height>450</height>
<left>50</left>
<top>550</top>
</Snap>
...
<!-- Text fields -->
<MachineName>
<left>550</left>
<top>50</top>
<fontsize>72</fontsize>
</MachineName>
</Advanced_MAME_Launcher_MAME_Fanart>
Currently, this file is located in
AML_INSTALLATION_DIR/AML-MAME-Fanart-template.xml
and the file location is hard-coded into AML Python code. Future versions of AML will be able to load custom XML templates. You can edit this file if you wish but keep in mind that will be overwritten when a new version of AML is installed so keep a backup.
The Fanart generation is quite time consuming. For a fully loaded artwork collection from ProgettoEMMA the Fanart building for all MAME machines will take about 3/4 hours on a fast computer. Before building all Fanarts, you can test the current template in the context menu
Setup plugin,
Build Fanarts ...,
Test MAME Fanart. This Fanart test uses some hardcoded artwork. This is how the test looks for a MAME machine:
The deep-purple bands allow an easy identification of the rectangles defined in the XML template and will not be present in the final Fanart.
Finally, this is how the Fanart test looks for a Software List item:
Export of Virtual Launchers
AML is able to export any MAME machine filter/listing into an XML file. In the future, Advanced Emulator Launcher will be able to load this XML file to create a Virtual Launcher. In this way, you can use AML and its powerful filters to choose the MAME ROMs you like most and then create an AEL launcher for fast and convenient browsing. Note that Virtual Launchers will share ROMs and Assets so there is no need for duplicate ROMs and/or Assets.
PDF manual viewer
Finally, AML is able to display Manuals in PDF format! Kudos to i96751414 and his
PDF Reader addon. Note that currently AML is able to display PDF that are componsed exclusively of images (no text). This should be no problem because 99% of all the game manuals are like this. However, only PNG and JPG embedded images embedded in PDF files are currently supported and many PDFs will not work. In the future, I plan to improve the PDF reader so more types of images can be extracted. PDF is a very complex file format and will take me some time, though.
In addition, I have plans to support manuals in CBZ and CBR formats in the future (and of course port this feature to AEL).
Custom MAME filters
I have ported some features from
NARS into AML to support creating you own custom MAME machine filters. Currently, AML comes with a set of preconfigured filters so you can easily test this new feature. The filter XML file is located in
AML_INSTALLATION_DIR/AML-MAME-filters.xml
and looks like this:
xml:
<!-- Example Advanced MAME Launcher custom filters -->
<Advanced_MAME_Launcher_custom_filters>
<!-- Capcom -->
<DEFINE name="CAPCOM_DRIVERS">cps1.cpp or cps2.cpp or cps3.cpp</DEFINE>
<!-- Filter definitions -->
<MAMEFilter>
<Name>Capcom</Name>
<Options></Options>
<Driver>CAPCOM_DRIVERS</Driver>
</MAMEFilter>
</Advanced_MAME_Launcher_custom_filters>
Currently, you can only filter MAME machines by driver. Future version of AML will include more filtering options (like the filters available in
ROMLister) and will be able to load your own custom XML filtering file. Now, you can edit the XML file included in the AML installation directory, but keep in mind that your custom file will be overwritten when a new version of the addon is intalled, so keep a backup!
Upgrading AML
AML 0.9.4 requires a complete wipe out of any previous AML installation. I'm afraid you will have to reconfigure AML again but this was unavoidable due to the large number of changes in the database format.
1) First, uninstall any previous AML you may have installed.
2) Delete AML plugin data directory
PLUGIN_DATA_DIRECTORY
.
On Linux,
PLUGIN_DATA_DIRECTORY
is is located in
/home/your_username/.kodi/userdata/addon_data/plugin.program.advanced.MAME.launcher
On Windows,
PLUGIN_DATA_DIRECTORY
is is located in
C:\Users\your_username\AppData\Roaming\Kodi\userdata\addon_data\plugin.program.advanced.MAME.launcher
3) After deleting the directory then install AML 0.9.4 using the ZIP file. You will need to configure the plugin (MAME executable and paths), rebuild the databases and scan for ROMs/assets again. Also, the MAME Favourites and Software List Favourites of AML 0.9.3 will be lost. In some cases, Kodi will disable AML 0.9.4 after the installation. To enable it, browse to the "My addons" section, select AML and then click on the "Enable" button.
I tried to test AML 0.9.4 as much as possible, but due to the vast number of new features expect some bugs and things that should be improved. Please report here or in Github any problems or issues you may have.
Advanced MAME Launcher | version 0.9.4 | 29 March 2018
Code:
FEATURE File cache for SL ROMs/CHDs and SL assets.
FEATURE Port the file scanner cache from AEL to AML. This will increase the scanning speed a lot!
Also, this will allow supporting more image types (currently only PNG), manual
types (currently only PDF) and trailer types (currently MP4 only).
FEATURE Create an AEL virtual launcher in XML from any AML filter.
FEATURE Use proper Software List name in "Machines by Software List" filter.
FEATURE Use proper short name in "Machines by MAME short name" filter.
FEATURE Clean Render and main machine JSON files. Currently, there are repeated fields on both
databases like nplayers.
FEATURE Move flags and plot from the render database to the assets database. Flags are modified
by the scanner only and plot generated after the scanner. If flags and plot are in
the asset DB, the ROM cache and hashed DB must be regenerated after the database building
only and not always like now.
FEATURE Render PDF manuals consisting of image scans (99% of game manuals are scans of images).
Thank you very much to i96751414 for allowing use of his PDF reader addon code.
Have a look at the PDF reader addon https://forum.kodi.tv/showthread.php?tid=187421
and https://github.com/i96751414/plugin.image.pdfreader
This initial implementation somewhat works for some PDFs but code can be improved a lot.
FEATURE Create a hased database for all catalog filter combination. This will require the
creation of about 5000 json files but will make AEL as fast as possible.
FEATURE Hashed database for assets, in a similar fashion to the catalog ROM hashed database.
FEATURE Make a ROM cache and a assets cache for the MAME filters. That will increase the
loading speed of the MAME filters a lot.
FEATURE Support MAME artwork by Mr. Do's. Note that Clones use Parent's artwork automatically.
FEATURE Use Parent/Clone substituted artwork in MAME. For example, most trailers are only available
for the Parent machine and can be used by Clone machines.
FEATURE Use Parent/Clone substituted artwork in Software Lists.
FEATURE Build Fanarts from other pieces of artwork for Software List items.
FEATURE Build Fanarts from other pieces of artwork for MAME machines.
FEATURE Test MAME and SL Fanart building.
FEATURE Custom MAME filters, using XML files. Merge some of the functionality of NARS into AML.
First, give to support to filter by driver. Later, more filters can be added.
FEATURE "Browse by MAME short name" and "Browse by MAME long name" alphabetical catalogs.
FEATURE Renamed plugin from plugin.program.advanced.MAME.launcher to plugin.program.AML.
Shorter name, shorter databases, higher speed.
FEATURE Some skin helper commands to display widgets.
FEATURE Support bestgames.ini and series.ini.
FEATURE Generate machine plot from MAME XML information.
FEATURE New Main filters Normal and Unusual.
FEATURE Show ROMs of a MAME machine that should be in a ZIP file. Supports Merged, Split and
Non-merged sets, CHDs, BIOS and Devices with ROMs.
FEATURE Audit MAME ROMs for all machines.
FEATURE Show SL ROMs of a SL entry. Supports Merged, Split and Non-merged sets and SL CHDs.
FEATURE Audit SL ROMs.
FEATURE Display MAMEINFO.DAT information.
FEATURE Display HISTORY.DAT in information.
FEATURE Display gameinit.dat in information.
FEATURE Display command.dat in information.
FEATURE At launching, do not check ROMs for machines which doesn't have ROMs.
Requires loading machines database, which will slow down launching process a lot!
A hashed database of machines is necessary to speed up plugin.
Better solution for now: do not do any check. Let MAME fail if there are ROM/CHD errors.
FEATURE Allow user to choose default assets as AEL does in addon seetings.
FEATURE Trailer support in MAME machines and Software Lists.
FEATURE Manage MAME Favourites context menu.
FEATURE Manage SL Favourites context menu.
FEATURE Create a hased database for main ROM database and Audit ROM database.