•   
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 12
  •   
Beta Advanced MAME Launcher - MAME frontend for Kodi
#76
(2019-02-09, 21:51)Dax9 Wrote: Since upgrading to Kodi 18 and MAME 0.206, I'm getting errors when building databases.  So I uninstalled AML, deleted the AML plugin data directory, and reinstalled AML 0.9.8 from the Kodi repo.  But I still get the errors.

Build All Databases and Build MAME Audit/Scanner Databases (in Step by Step) generate an Index error (out of range).

Build MAME Databases (in Step by Step) generates a Type error (argument count).

I've uploaded logs for the 3 errors to pastebin: https://pastebin.com/MsMMvwtb

AML 0.9.8 worked for me with Kodi 17 and MAME 0.205.  I'm not sure if this is a Kodi 18 or MAME 0.206 issue.

Problem fixed in the development version. If interested, here is the technical info about the problem.

I have updated the installation instructions of the dev version in Github.
Reply
#77
Thanks for the quick fix, Wintermute.  When I get the chance, I'll install the AML dev version and test with MAME 0.206.
Reply
#78
I tested AML dev with MAME 0.206.  In Setup plugin, Build all databases and Scan everything and build plots completed successfully.

In Step by step, all functions completed successfully except for Build MAME databases which crashes with this error:
12:03:40.298 T:96  NOTICE: AML INFO : _command_setup_plugin() Generating MAME main database and PClone list ...
12:03:40.298 T:96  NOTICE: AML DEBUG: fs_load_JSON_file_dic() "C:\Users\HTPC\AppData\Roaming\Kodi\userdata\addon_data\plugin.program.AML.dev\MAME_control_dic.json"
12:03:40.303 T:96   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: mame_build_MAME_main_database() takes exactly 4 arguments (3 given)
                                            Traceback (most recent call last):
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML.dev\addon.py", line 37, in <module>
                                                resources.main.run_plugin(sys.argv)
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML.dev\resources\main.py", line 402, in run_plugin
                                                _command_context_setup_plugin()
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML.dev\resources\main.py", line 5301, in _command_context_setup_plugin
                                                DB = mame_build_MAME_main_database(PATHS, g_settings, control_dic)
                                            TypeError: mame_build_MAME_main_database() takes exactly 4 arguments (3 given)
                                            -->End of Python script error report<--

I have a suggestion: rename the "Machines by Score" filter to "Machines by Rating", to avoid confusing with scores in games.

Thanks for adding the MAME INI/DAT path setting.  This saves a lot of time when configuring the add-on.
Reply
#79
(2019-02-15, 21:37)Dax9 Wrote: I tested AML dev with MAME 0.206.  In Setup plugin, Build all databases and Scan everything and build plots completed successfully.

In Step by step, all functions completed successfully except for Build MAME databases which crashes with this error:
12:03:40.298 T:96  NOTICE: AML INFO : _command_setup_plugin() Generating MAME main database and PClone list ...
12:03:40.298 T:96  NOTICE: AML DEBUG: fs_load_JSON_file_dic() "C:\Users\HTPC\AppData\Roaming\Kodi\userdata\addon_data\plugin.program.AML.dev\MAME_control_dic.json"
12:03:40.303 T:96   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
...

I have a suggestion: rename the "Machines by Score" filter to "Machines by Rating", to avoid confusing with scores in games.

Thanks for adding the MAME INI/DAT path setting.  This saves a lot of time when configuring the add-on.

All these issues should be fixed now. I did quite a lot of refactoring of the code in the context menu "Setup plugin". Also, I have improved the PDF manual reader (images are extracted once). There are two issues pending: 1) due to non-ASCII characters in some SL ROMs AEL crashes. 2) 3 machines fail to audit due to the location of the sample ZIP files. For a detailed list of all the changes please have a look at the changelog.

The code in master should be pretty close to the final 0.9.9 release. I did a lot of testing but some more testing won't hurt before I upload to the Kodi repo Smile If you find any more issues let me know.
Reply
#80
I did a clean install of the latest AML dev build and tested it with MAME 0.207.  I consistently get this error when trying to build the MAME main database:

14:56:56.193 T:5968  NOTICE: AML INFO : mame_build_MAME_main_database() Starting ...
14:56:56.193 T:5968  NOTICE: AML INFO : --- Paths ---
14:56:56.193 T:5968  NOTICE: AML INFO : mame_prog      = "C:\EMU\MAME\mame64.exe"
14:56:56.193 T:5968  NOTICE: AML INFO : rom_path       = "C:\EMU\MAME\ROMS\"
14:56:56.193 T:5968  NOTICE: AML INFO : assets_path    = "C:\EMU\Assets\MAME\"
14:56:56.193 T:5968  NOTICE: AML INFO : dats_path      = "C:\EMU\MAME\ini\"
14:56:56.193 T:5968  NOTICE: AML INFO : chd_path       = "C:\EMU\MAME\ROMS\"
14:56:56.201 T:5968   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: u'samples_path'
                                            Traceback (most recent call last):
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML.dev\addon.py", line 37, in <module>
                                                resources.main.run_plugin(sys.argv)
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML.dev\resources\main.py", line 397, in run_plugin
                                                _command_context_setup_plugin()
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML.dev\resources\main.py", line 4907, in _command_context_setup_plugin
                                                db_dic = mame_build_MAME_main_database(PATHS, g_settings, control_dic, __addon_version__)
                                              File "C:\Users\HTPC\AppData\Roaming\Kodi\addons\plugin.program.AML.dev\resources\mame.py", line 3389, in mame_build_MAME_main_database
                                                log_info('samples_path   = "{0}"'.format(settings['samples_path']))
                                            KeyError: u'samples_path'
                                            -->End of Python script error report<--

I've tried setting the Samples 1 and Samples 2 paths to the same folder and different folders, but the error persists.  I guess this is related to issue #2.

I normally keep the zipped sample files in MAME's default samples folder.  Does AML now require the zipped samples to be in a separate folder?
Reply
#81
I made some edits to mame.py to stop the crashes caused by references to the removed samples_path.
I also fixed a couple typos in main.py that caused crashes when browsing ROMs using Main and Binary filters with the MAME database cache enabled.
The changed lines are posted here: https://pastebin.com/7kWZy9t7

This is a quick & dirty fix and I'm no Python programmer, so please pardon my crappy code Wink
Reply
#82
@Dax9 Thanks a lot for your contribution. And your Python code is fine Big Grin

The crash was caused because when you change the settings of the addon Kodi does not delete the old settings. In my development machine the old setting was there and hence AML didn't crash unless you started with a fresh installation.

I have already incorporated you changes relating the database cache and the crash when generating the MAME database.

The reason for including Samples 1 and Samples 2 paths is that MAME includes 2 set of uncompressed samples on its installation directory, named floppy and MM1_keyboard. These samples are used with 3 machines and cause the ROM audit to fail for these machines. Currently, ROMs and Samples must be zipped in order for AML to work. I am now testing the audit engine with a 0.206 complete ROM set. Samples 1 directory is for the Sample ZIP files you download from progretto-SNAPS and Samples 2 is the samples directory in your MAME installation dir. I will notify here when the audit is working OK so you can test.

Another current problem is that the some Software Lists include ROMs with non-ASCII characters. Since the ZIP standard does not define an official encoding for filenames this is a major problem because file names are not UTF-8 encoded (UTF-8 didn't exist when the ZIP file format was created) and it is very difficult to know the encoding of a string. I am currently investigating this issue now and probably will open an issue in the MAME repository in Github.
Reply
#83
Hi Wintermute, I'm glad I could help.

I'd always kept the zipped samples in MAME's default samples folder, but also deleted the floppy and MM1_keyboard subfolders because Clrmamepro won't scan clean with them there.  I don't mind keeping the zipped samples in a separate folder.  Users will need to be aware to configure samplepath in mame.ini for both sample folders.

Non UTF-8 filenames in ZIPs are a difficult issue.  It seems that chardet is the most recommended solution, but it's not foolproof.

namelist() from ZipFile returns strings with an invalid encoding

Python zipfile module can't extract filenames with Chinese characters
Reply
#84
(2019-03-15, 17:30)Dax9 Wrote: Hi Wintermute, I'm glad I could help.

I'd always kept the zipped samples in MAME's default samples folder, but also deleted the floppy and MM1_keyboard subfolders because Clrmamepro won't scan clean with them there.  I don't mind keeping the zipped samples in a separate folder.  Users will need to be aware to configure samplepath in mame.ini for both sample folders.

Non UTF-8 filenames in ZIPs are a difficult issue.  It seems that chardet is the most recommended solution, but it's not foolproof.

namelist() from ZipFile returns strings with an invalid encoding

Python zipfile module can't extract filenames with Chinese characters

Thanks for your inputs. I already look at chardet but it will increase the complexity of the addon a lot. I have rolled back to 1 sample directory and currently AML ignores ZIP files not coded in UTF-8. In MAME 0.205 only one machine fails the audit because of the samples, and only 1 SL item out of 100,000 is affected by the UTF-8 issue. It is not perfect but we can live with that I think Smile

Interestingly, there are other SL ZIP files with non-ASCII filenames in the Pleasuredome collection, and on those ZIP files the filenames are correctly encoded in UTF-8. The problem seems to be with one particular ZIP file in the ibm5170 list. I will report this issue in the PD forum, currently I'm getting the 0.207 collection and once I'm finished I will see the results of the audit.

I will release 0.9.9 soon.
Reply
#85
New AML release 0.9.9

Release 0.9.9 fixes some problems intorduced in MAME 0.205 and has been tested and works perfectly with every recent MAME version up to 0.207. Code has been refactored a bit and there are many small improvements here and there.

Perhaps the main novelty is the addition of two entries in the AML root window, named Utilities and Global Reports. Both have functionality previously in the context menus or AML settings. Now I think the user inferface is cleaner and the context menus are not so overloaded.

Upgrading AML to release 0.9.9

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

2) 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.

3) 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.

Note that some files in AML data directory have changed. If you want to delete all cruft, then completely wipe out the AML data directory and start from scratch. If you want to keep your MAME Favourites and SL Favourites, then make a backup of the files Favourite_Machines.json and Favourite_SL_ROMs.json, and restore these files after the upgrade.

Advanced MAME Launcher | version 0.9.9 | 22 March 2019

Code:
FEATURE  [CORE] Improve statistics of working, non-working games, etc. for the Main filters.

FEATURE  [CORE] [LEIA] Check out the ListItem constructor offscreen parameter in Leia.
         The offscreen parameter increases the speed a bit.
         This requires Kodi version detection and having different code for Krypton/Leia.
         See https://forum.kodi.tv/showthread.php?tid=329315&pid=2711937#pid2711937
         and https://forum.kodi.tv/showthread.php?tid=307394&pid=2531524

FEATURE  [CORE] [LEIA] Use the new API function ListItem.setProperties({p1:v1, p2:v2, ...})
         This requires Kodi version detection and having different code for Krypton/Leia.
         See https://forum.kodi.tv/showthread.php?tid=332283

FEATURE  [FANARTS] Set an order to print fanart assets. This will allow to have images printed
         on top of each other.

FEATURE  [CORE] Improve the Samples scanner and report.

FEATURE  [CORE] MAME and SL plots build timestamp.

FEATURE  [CORE] MAME and SL Fanart build timestamp.

FEATURE  [CORE] MAME render and asset cache build timestamp.

FEATURE  [CORE] Move the utilities from the addon settings into the root menu.

FEATURE  [CORE] Move the report viewer from the context menu to the root menu. The context
         menu is a little bit overloaded and this will alleviate the situation.

FEATURE  [CORE] Use xbmcplugin.addDirectoryItems() instead of xbmcplugin.addDirectoryItem().
         According to the docs "Large lists benefit over using the standard addDirectoryItem().
         You may call this more than once to add items in chunks."

FEATURE  [CORE] Configuring every DAT and INI file one by one is tedious. Instead, define
         a directory where the DATs must be placed and pick the files from there automatically.

FEATURE  [CORE] Add plots for entries in the root window.

FEATURE  [CORE] Renamed the "Machines by Score" filter to "Machines by Rating", to avoid
         confusing with scores in games.

FEATURE  [CORE] Implement context menu "All in one (Extract, Build and Scan)"

FEATURE  [CORE] Refactoring and code cleaning of the addon setup functions (DB build, scanner).

FEATURE  [CORE] Remove redundant fields from MAME DB 'coins' and 'control_type'. Use new
         'input' data structure to replace them.

FEATURE  [CORE] At least two directories for samples are needed. MAME includes a default samples
         directory with some samples used by some machines. Both directories must be configured
         in mame.ini in order to get all the samples working.

         NOTE This feature was cancelled. Only one Samples directory. If the user wants to have
         a complete Good audit, then the samples shipped with MAME must be compressed and
         the ZIP file placed in the unique samples directory. In any case, only three machines
         are affected.

FEATURE  [FILTERING] Implement <Include>, <Exclude> and <Change> tags.
         This will require more work than expected. Currently, only parent machines are filtered
         and clone machines are added after the filtering process. However, to implement
         Include, Exclude and Change tags, all machines must be included in the filter list.
         This will require modification of the filter render engine (must be rendered always in
         flat mode and not in parent/clone mode).

FEATURE  [MANUALS] Progress bar when extracting PDF pages.

FEATURE  [MANUALS] When displaying manuals use cached extracted images if they exist.
         When the manual is extracted, create a small JSON file with the timestamp of
         the extraction so it can be compared with the timestamp of the PDF file to
         test if images must be extracted again.

FIX      In MAME 0.206, some clone merged ROMs are not present in the parent machine, only
         in the BIOS. For example, in machine adonisce (clone of adonis). Before 0.206, such
         ROMs were also present on the parent machine. This change in behaviour crashed AML.

FIX      Fixed the AML addon and MAME numerical versioning scheme.

FIX      Fix crash in "Build MAME databases".
         See https://forum.kodi.tv/showthread.php?tid=304186&pid=2822949#pid2822949

FIX      Some Software List ROMs are compressed using non-ASCII characters and this make
         the audit engine to crash. I have to investigate how to fix this issue.
         Maybe use the chardet library https://github.com/Wintermute0110/chardet/tree/master/chardet
         I think this should reported creating an issue in MAME project in Github.
         Problematic SL ROM example: SL ibm5170, item wordfndr
         https://github.com/mamedev/mame/blob/master/hash/ibm5170.xml#L7521
         The current implementation just ignores non-ASCII files and the audit fails for those
         SL items.
Reply
#86
The Kodi addon repository still has the AML 0.9.8 version, at least as of this writing.  I installed the latest AML 0.9.10-alpha version and gave it a try.  I experienced a couple errors during testing, but otherwise it works great.  Thanks for your continued development of this addon.

The errors were in Step by Step > Build Software List item plots and Utilities > Check MAME CRC hash collisions.  I don't know if these issues are in AML 0.9.9, but here are the lines I edited in main.py to fix them, just in case:


Line 5432: mame_build_SL_plots(g_PATHS, g_settings, SL_dic['control_dic'],
Edit 5432: mame_build_SL_plots(g_PATHS, g_settings, db_dic['control_dic'],

Line 5762: ['roms_sha1_dic', 'MAME ROMs SHA1 dictionary', g_PATHS.ROM_SHA1_HASH_DB_PATH.getPath()],
Edit 5762: ['roms_sha1_dic', 'MAME ROMs SHA1 dictionary', g_PATHS.SHA1_HASH_DB_PATH.getPath()],
Reply
#87
(2019-03-25, 00:43)Dax9 Wrote: The Kodi addon repository still has the AML 0.9.8 version, at least as of this writing.  I installed the latest AML 0.9.10-alpha version and gave it a try.  I experienced a couple errors during testing, but otherwise it works great.  Thanks for your continued development of this addon.

The errors were in Step by Step > Build Software List item plots and Utilities > Check MAME CRC hash collisions.  I don't know if these issues are in AML 0.9.9, but here are the lines

Thanks a lot for your patch, I already fixed AML dev version. I refactored the code of the "Setup plugin" context menu and those crashes were due to variable renaming. Probably the crashes only affected to 0.9.9.

AML 0.9.9 is waiting and under review by the Kodi developers in this pull request. Once the pull request is merged, the Kodi build tools generate the ZIP file and place it in the official repository.
Reply
#88
AML 0.9.10 work in progress. Generation of 3D Boxes.

Image

Image
Reply
#89
Hi,

I have a problem with joystick (and to some extent keyboard) focus when launching mame from Kodi. My setup is an Odroid XU4, Kodi, mame installed (almost by the book). You can read on how I did my setup on this page I wrote https://github.com/yimyom/odroid-xu4-setup.

The problem is the following: when I launch any game, my joystick doesn't work at all. If I start X with a regular session and run mame in fullscreen, it perfectly works. If I run mame in window mode, and put the focus on another window, well... of course the joystick doesn't work. I suspect I have something similar with my Kodi/AML installation but I can't find anything so far.

I went through Kodi's logs, AML logs (in debug mode) and couldn't find anything suspicious.

So far my impression is that the MAME windows doesn't take the focus and so the joystick events are not sent to MAME.

Any idea ?
Reply
#90
(2019-04-28, 10:27)yimyom Wrote: Hi,

I have a problem with joystick (and to some extent keyboard) focus when launching mame from Kodi. My setup is an Odroid XU4, Kodi, mame installed (almost by the book). You can read on how I did my setup on this page I wrote https://github.com/yimyom/odroid-xu4-setup.

The problem is the following: when I launch any game, my joystick doesn't work at all. If I start X with a regular session and run mame in fullscreen, it perfectly works. If I run mame in window mode, and put the focus on another window, well... of course the joystick doesn't work. I suspect I have something similar with my Kodi/AML installation but I can't find anything so far.

I went through Kodi's logs, AML logs (in debug mode) and couldn't find anything suspicious.

So far my impression is that the MAME windows doesn't take the focus and so the joystick events are not sent to MAME.

Any idea ?

Hi, very nice tutorial!

The problem is that Kodi must be run using a Window Manager. I recommend you use OpenBox. Google a bit, also in this forum there are many old posts about that. If you need further help, I'm preparing my own tutorial about Linux + Kodi + Emulators configuration but that will take me some time to finish.

EDIT: Sorry, OpenBox is used, see point 17, the contents of the file /etc/systemd/system/kodi.service

Can you please give more information about the joystick? Can you try with an alternative joystick?
Reply
  •   
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 12
  •   



Logout Mark Read Team Forum Stats Members Help
Advanced MAME Launcher - MAME frontend for Kodi2
This forum uses Lukasz Tkacz MyBB addons.