• 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 14
Advanced MAME Launcher - MAME frontend for Kodi
I got this but not sure if its right 
/storage/.kodi/addons/plugin.program.AML/resources/mame.py
Reply
(2019-08-25, 13:26)Mince Wrote: I got this but not sure if its right 
/storage/.kodi/addons/plugin.program.AML/resources/mame.py
First you need to install MAME in LibreELEC. Once MAME is installed you need to point to the MAME executable. Please ask in the LibreELEC forum about how to install MAME.
Reply
Due to a change in its format, History.dat 2.15 causes an error in AML.  Softlists containing the same games are now listed on separate lines; details are here:

http://www.mameworld.info/ubbthreads/sho...ber=384137

For now, the previous History.dat 2.14 can be used with AML so it will build its databases successfully.
Reply
(2019-11-08, 05:57)Dax9 Wrote: Due to a change in its format, History.dat 2.15 causes an error in AML.  Softlists containing the same games are now listed on separate lines; details are here:

http://www.mameworld.info/ubbthreads/sho...ber=384137

For now, the previous History.dat 2.14 can be used with AML so it will build its databases successfully.

Fixed in the development version in Github. I did some basic testing and seems to work OK. Once I do better testing I will release 0.9.11.
Reply
(2019-11-08, 13:08)Wintermute0110 Wrote: Fixed in the development version in Github. I did some basic testing and seems to work OK. Once I do better testing I will release 0.9.11. 
Thanks for the quick fix, Wintermute!
Reply
New AML release 0.9.11

AML 0.9.11 is a quiet release. It fixes a crash with newer versions of History.dat and add support for MASH's Alltime.ini. The access to DAT information from the context menu is now much faster. The Software Lists now display the number of items rather than the number of ROMs/CHDs.

Note that it will take a few days until AML 0.9.11 gets into the Kodi official addon repository and updated automatically in your Kodi box.

Upgrading AML to release 0.9.11

1) Download AML 0.9.11 from the Kodi addon repository. AML is under the category Program add-ons and Game add-ons, Game providers.

2) Before generating the database and scanning your assets, go to "Utilities" and select "Check AML configuration". Make sure every feature you want is OK and green, otherwise check the AML addon settings.

3) Open the context menu in any root window row, select "Setup Plugin" and then "All in one step". This will extract MAME XML, rebuild all the databases and rescan ZIP/CHD files and assets. You will need to update the Custom filters as well.

4) In the root window, go to "Utilities" and select "Check/Update all Favourite objects." This will bring your MAME Favourites, MAME Most Played, etc. up to date with the last version of the database.

Advanced MAME Launcher | version 0.9.11 | 26 November 2019

Code:
FEATURE  [CORE] For Software Lists, instead of showing the number of ROMs show the number
         of Items in Flat display mode or Parents in Parent/Clone display mode.

FEATURE  [CORE] Support for MASH's Alltime.ini.

FEATURE  [CORE] Improvements in the JSON index of DAT files. Use dictionaries and not list
         to reduce JSON file size and speed up data access.

FEATURE  [CORE] Improved main statistics.

FEATURE  [CORE] Improve some Software List long names until they are fixed in MAME repository.

FIX      Fixed conversion to int of addon version str in fs_AML_version_str_to_int()

FIX      New history.dat makes AML to crash because one entry could be for more than one
         machine. In addition, the same description can be used over several SLs.
Reply
AML 0.9.11 gets an error when parsing History.dat 2.17:
python:
2020-01-04 11:49:56.338 T:772  NOTICE: AML INFO : mame_load_History_DAT() Parsing "C:\EMU\MAME\ini\history.dat"
2020-01-04 11:49:56.707 T:772   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: Wrong header "$megadriv=" (line 86,415)
                                            Traceback (most recent call last):
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\addon.py", line 36, in <module>
                                                resources.main.run_plugin(sys.argv)
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\main.py", line 405, in run_plugin
                                                command_context_setup_plugin()
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\main.py", line 6088, in command_context_setup_plugin
                                                data_dic = mame_build_MAME_main_database(g_PATHS, g_settings, control_dic, __addon_version__)
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\mame.py", line 3872, in mame_build_MAME_main_database
                                                (history_idx_dic, history_dic, history_version) = mame_load_History_DAT(HISTORY_FN.getPath())
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML\resources\mame.py", line 788, in mame_load_History_DAT
                                                raise TypeError('Wrong header "{}" (line {:,})'.format(line_str, line_number))
                                            TypeError: Wrong header "$megadriv=" (line 86,415)
                                            -->End of Python script error report<--
The section of History.dat 2.17 causing the error is:
python:
$megadriv=
$vgmplay=archrivl_md,
$bio
AML 0.9.11 loads History.dat 2.16 OK and seems to be working fine with MAME 0.217 Smile
Reply
@Winter 

Does the AML plugin have the ability to live call the dat informaton within Kodi? i.e. does $INFO[ListItem.Property(history)] for instance pulling information History.dat. I think I already know the answer as I have been poking around at the code and the subsequent JSON files that are generated but thought I would ask.

The "plot" variable which gets displayed has general information regarding the machine (which I am using for my skin), however the history.dat file in some cases gives background information regarding specific games (much like plot summaries for movies). Although the history dat also gives other information as well and in some cases no synopsis at all, I am interested in trying to get this information displayed.

Cheers,
Rychem
Reply
@Dax9 OK, I will have a look ASAP. The new History.dat has some syntax errors. I tried to code a bullet-proof parser to deal with all possible errors but obviously failed. Problem should be easy to fix I think.

@Rychem28 Adding an infolabel $INFO[ListItem.Property(history)] is possible. However, it could affect AML performance because the history database in JSON format is quite big. With the current implementation the DAT files are read only when requested by the user from the context menu. Another possibility is to add an option so the plot can have the information as it is now OR the contents of History.dat. When I had time I will do some changes to the code so we can work out what works best.
Reply
@Wintermute0110 Thanks for looking into this, if you need anyone to test let me know I would be happy to help. I am also a bit interested in learning how this gets done. Cheers.
Reply
Im unsing libreELEC on a Raspberry PI 4 (4GB)
I get an error message at launch of AML.
Quote:MAME Catalog database needs to be built. Use the context menu "Setup plugin" in root window.
Where is the "root window" and how to setup the database?
i try`d to set up on the AML in the settings, but what is the path?
I don`t have the /home/... directory, just have the / (root) directory.
I also install the emulator Add-on´s, but what is the path to the emulator?
Reply
(2020-01-16, 14:20)Milan0 Wrote: Im unsing libreELEC on a Raspberry PI 4 (4GB)
I get an error message at launch of AML.
Quote:MAME Catalog database needs to be built. Use the context menu "Setup plugin" in root window.
Where is the "root window" and how to setup the database?
i try`d to set up on the AML in the settings, but what is the path?
I don`t have the /home/... directory, just have the / (root) directory.
I also install the emulator Add-on´s, but what is the path to the emulator?

The root windows is the main window of AML, is the window that first opens when you enter AML.

The first thing you need is to install MAME on LibreELEC. AML only works with external vanilla MAME, it does not work with Retroplayer's MAME cores yet. Ask for help in the LibreELEC forum about how to install MAME first. Once MAME is installed, you need to know the location of the MAME executable. Also, you will need some writable directories to place the DAT files, ROM ZIPs, artwork, etc.

EDIT: in this page I learned that the user home directory in LibreELEC is /storage/. You can then create the following directories to setup AML

Code:
/storage/AML-ROMs/
/storage/AML-DATs/
/storage/AML-assets/
etc.

But remember that first you need to install vanilla MAME.
Reply
@Dax9 I have fixed the reading of History.dat 2.17 in Github.
Reply
@Rychem28 I have implemented some code to render the $INFO[ListItem.Property(history)] infolabel. This code just loads the files

Code:
AML_DATA_DIR/DAT_History_DB.json
AML_DATA_DIR/DAT_History_index.json

which are required to create the infolabel. The MAME render cache and MAME asset cache enabled settings are both enabled to increase loading speed to maximum. I'm using a powerful computer so most users will have a much less powerful computer as their HTPC box, in other words, the times reported here are very optimistic. In all the tests I load the Main filter Machines with coin slot (Normal) which I think is the worst case in AML (biggest filer most user will use regularly).

With the new setting Render History.DAT infolabel enabled OFF I get (this is equivalent to current AML operation):

Code:
NOTICE: AML DEBUG: Loading catalog     0.0200 s
NOTICE: AML DEBUG: Loading render db   0.1760 s
NOTICE: AML DEBUG: Loading assets db   0.1680 s
NOTICE: AML DEBUG: Loading pclone dic  0.0280 s
NOTICE: AML DEBUG: Loading MAME favs   0.0000 s
NOTICE: AML DEBUG: Loading History.DAT 0.0000 s
NOTICE: AML DEBUG: Loading time        0.3920 s
NOTICE: AML DEBUG: Processing time     0.1450 s
NOTICE: AML DEBUG: Rendering time      0.5730 s
NOTICE: AML DEBUG: Total time          1.1100 s

With the new settingRender History.DAT infolabel ON I get.

Code:
NOTICE: AML DEBUG: Loading catalog     0.0210 s
NOTICE: AML DEBUG: Loading render db   0.1790 s
NOTICE: AML DEBUG: Loading assets db   0.1780 s
NOTICE: AML DEBUG: Loading pclone dic  0.0280 s
NOTICE: AML DEBUG: Loading MAME favs   0.0010 s
NOTICE: AML DEBUG: Loading History.DAT 0.6710 s
NOTICE: AML DEBUG: Loading time        1.0780 s
NOTICE: AML DEBUG: Processing time     0.1470 s
NOTICE: AML DEBUG: Rendering time      0.5560 s
NOTICE: AML DEBUG: Total time          1.7810 s

So, creating the infolabel will increase the loading time of every list by 0.7 seconds. Also, note that when using the render/asset cache, the loading time of the databases is proportional to the list size. In other words, for the biggest filter with 4000 machines loading the render and asset databases takes about 0.4 seconds, but in filters with less machines is almost instantaneous. However, the time required to load History.dat data is constant for every filter.

I think the approach of creating the new infolabel does not work because it slows down AML a lot. I think the best option is to create a setting so the plot can be as it is now (information about the machine), the contents of History.DAT, or a combination of both. Before doing anything else I would like to hear your opinion. If there are things you don't understand or need clarification let me know.
Reply
@Wintermute0110  Thanks for the update. I think you are right, based on your current trials making a new infolabel that queries history.dat is too slow. Trying to implement this in the skin would practiacally make it unusable due to the lag.

The better approach (possibly only for trial purposes) would be to combine or have it selectable with the "plot" infolabel.

One question that i did have is have you experimented or have any experience with putting the rendered data (rom names/rom info/asset links) into an sql database (.sb) much like Kodi does for movies/tv shows/music. Querying the database seems to be relatively fast within Kodi for these items instead of writing to JSON, although I expect that this would fundamentally change quite a bit of your plugin.

Cheers, and thanks again for giving this a try.
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 14

Logout Mark Read Team Forum Stats Members Help
Advanced MAME Launcher - MAME frontend for Kodi2