• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 14
Advanced MAME Launcher - MAME frontend for Kodi
Just wanted to showcase to the forum some of the skinning work I have been doing using Aeon NOX Silvo as the basis and tailoring it to use the AML plugin.

I have created some custom icons, for things like machine, nplayers and types of controls (as displayed on the bottom).
ImageImage
ImageImage

Main menu shows the machine or console that you will browse
ImageImage

I added some extra menu options to the plugin which include the following options:

1) Hide softlist items that are not available (selecting the display ROM/CHDS for machines that are only available seems to ignore SL specific lists and if SL list ROM/CHDS are not available they are still displayed).
2) Option to toggle the long names (ROM name with all flags for both MAME and SL's) on/off just to give a cleaner presentation when this information may not be needed.
@Wintermute0110 if you are interested in the coding changes, I can send the main.py and settings.xml files to you with an explanation of changes I made (I am just learning the basics on python coding so my implementation may be a bit crude. I am not savy with GitHub at the moment, so not really sure how you put the changes there.

Image

And lastly (Skin specific options) to toggle the bottom controller/logo images between black/white and colour renditions. This is more to fit with the rest of the skins theme i.e. MyFlix.
Image

Cheers
Reply
(2020-01-22, 03:50)Rychem28 Wrote: @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.

OK, I will create the new setting for the plot ASAP.

The first thing I did when I forked Advanced Launcher code 4 years ago was to test what works fastest for Kodi plugins in order to render big lists of items, and came to the conclusion that JSON works best. Kodi addons do not are typical applications that run all the time. Kodi addons are executed every time they render a list and then the addon execution finishes. What AML does is read all the precomputed information in JSON and dump it into Kodi (roughly speaking). The core of Kodi, which is written in C++, can do much more things that addons are able.

I think the operation of AML is very optimized at the moment but of course there are things that may be improved. However, SQL will not speed up things. On the contrary, the RCB addon uses SQL to store data and it is significantly slower than AML and AEL.
Reply
(2020-01-22, 04:09)Rychem28 Wrote: ...
I added some extra menu options to the plugin which include the following options:

1) Hide softlist items that are not available (selecting the display ROM/CHDS for machines that are only available seems to ignore SL specific lists and if SL list ROM/CHDS are not available they are still displayed).
2) Option to toggle the long names (ROM name with all flags for both MAME and SL's) on/off just to give a cleaner presentation when this information may not be needed.
@Wintermute0110 if you are interested in the coding changes, I can send the main.py and settings.xml files to you with an explanation of changes I made (I am just learning the basics on python coding so my implementation may be a bit crude. I am not savy with GitHub at the moment, so not really sure how you put the changes there.

Excellent work!

Yes, please send me the python code so I can add your features to mainline AML. Actually, the reason about the missing features in the SL items is that I code stuff first for MAME and then port it to SLs, but sometimes I forget to do the port Laugh

I recommend you learn some Git and install Tortoise Git or a similar client. It pays off.
Reply
@Wintermute0110 Thanks for the insight on the plugin speed and the explanation of the .db versus how you have implemented the database system. I was unaware of the differences.

I have put in a pull request on GitHub for the changes, I am hoping that I did it correctly.

Cheers.
Reply
(2020-01-22, 17:24)Rychem28 Wrote: @Wintermute0110 Thanks for the insight on the plugin speed and the explanation of the .db versus how you have implemented the database system. I was unaware of the differences.

I have put in a pull request on GitHub for the changes, I am hoping that I did it correctly.

Cheers.

Thanks a lot for your contribution. I have improved the code a bit (no duplicate code, reduced indentation which in Python is particularly important), have a looks at this and this commit.

In the future, if you want to contribute to AML please configure your editor (I recommend NotePad++ in Windows, Kate in Linux) to use 4 spaces instead of tabs. Also, currently the [Clo] flags is always rendered which should not be a problem in the default Parent/Clone mode but tell me what you think.
Reply
(2020-01-22, 05:17)Wintermute0110 Wrote:
(2020-01-22, 03:50)Rychem28 Wrote: @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.

OK, I will create the new setting for the plot ASAP.

The first thing I did when I forked Advanced Launcher code 4 years ago was to test what works fastest for Kodi plugins in order to render big lists of items, and came to the conclusion that JSON works best. Kodi addons do not are typical applications that run all the time. Kodi addons are executed every time they render a list and then the addon execution finishes. What AML does is read all the precomputed information in JSON and dump it into Kodi (roughly speaking). The core of Kodi, which is written in C++, can do much more things that addons are able.

I think the operation of AML is very optimized at the moment but of course there are things that may be improved. However, SQL will not speed up things. On the contrary, the RCB addon uses SQL to store data and it is significantly slower than AML and AEL.

I have added the option to use the contents of History DAT as plot. It seems to work reasonably well.
Reply
Thanks @Wintermute0110 . I saw the commit go through, I am going to look at the optimized code to see what I can learn. As for the spaces I figured out how to do it in Notepad++ today.

I also saw the commit for the history.dat, I am going to play around with add-on over the next couple of days. Thanks again for the help.
Reply
@Wintermute0110 , I have been playing around with the dev add-on with the history.dat information and so far I like the potential of the information that is pulled. I have been experimenting with the generation of the asset JSON and wanted to get your feedback on something I have been trialing, it is in combination to the original request for the history properties label.

I made a change to include a "history" asset independent of the "plot" asset in the MAME_assets JSON, and included a property called history so that this information could be called within the skin. This is what I was looking for in the original request but may not have been clear in regards to pulling the data from the history.dat. Your recent code change looks like exactly what I was asking about but I tried adding the option of being able to call the information separately.

I haven't made a pull request yet as I am still experimenting and with the code that I added scans proceed as normal. I am still playing around with the change to see if it add value to the skin,

I posted the code in my fork of the AML repository. Have a look and let me know what you think

Image
Reply
@Rychem28 If the contents of DAT_History_DB.json are included into MAME_assets.json we will have a performance decrease. For MAME 0.217, DAT_History_DB.json is 35 MB and MAME_assets.json 16 MB (roughly). Let's suppose the History contents for MAME is half (the other half is for SL items). We will double the size of MAME_assets.json which will increase the loading time.

All in all, I can code what you want and test. If the overall slowdown is big then I will roll back the feature.

EDIT: I had an idea that will not decrease performance much. I can code the feature as explained and then add an option "Generate History.DAT infolabel". If the option is ON, then contents of History.DAT will be added into the assets database and the infolabel generated. If the option is OFF, then the contents of History.DAT won't be added to the assets database. The new field 'history' will be there but empty. If the option is OFF the performance will decrease only a bit.
Reply
@Wintermute0110 as per your edit. I had made generating the history label dependent on if this was selected under selectable menu (info, history, or info and history). Selecting info and history or history created a "history" category in the MAME_asset json, selecting info creates a blank "history" entry. Fully built it is about 55 MB, and there is a little delay when loading AML plugin.

For me the delay is okay, but I do agree it may not be for everyone and a slow down of the plugin will be undesirable for most users. Don't feel that you need to code and test, I am trying to use the plugin in a very particular way and am looking at certain information to be displayed.

As for my post above, I was more asking if you could look at the changes I made on the fork I created and comment if I am on the right track from a coding perspective.

Cheers.
Reply
(2020-01-31, 02:26)Rychem28 Wrote: @Wintermute0110 as per your edit. I had made generating the history label dependent on if this was selected under selectable menu (info, history, or info and history). Selecting info and history or history created a "history" category in the MAME_asset json, selecting info creates a blank "history" entry. Fully built it is about 55 MB, and there is a little delay when loading AML plugin.

For me the delay is okay, but I do agree it may not be for everyone and a slow down of the plugin will be undesirable for most users. Don't feel that you need to code and test, I am trying to use the plugin in a very particular way and am looking at certain information to be displayed.

As for my post above, I was more asking if you could look at the changes I made on the fork I created and comment if I am on the right track from a coding perspective.

Cheers.

Yes, you are on the right track. In order to do what you want:

1) First change the functions fs_new_*() in disk_IO.py to change the database model.

2) Next change the mame_build_*() functions in mame.py to add the new information into the database.

3) Finally change the rendering function in main.py

I have some spare time now, I will do the implementation myself. If the option is off the asset database will increase only by a few KBs (the space needed by the empty history field) so it won't hurt much.
Reply
@Rychem28 I have coded the feature and it seems to work very well. Almost not decrease in performance when the option is OFF. When you change the option from ON to OFF the databases must be rebuilt again.

Please test it. Once it works well I will remove the code to include the History DAT information into the plot (in other words, left the plot as it was).
Reply
@Wintermute0110 so far the new feature looks like it is working flawlessly. Thanks again.

Cheers.
Reply
New AML release 0.9.12

I messed up when updating this post and deleted the original description of this release. For the list of changes just see the changelog below. Sorry Smile

Advanced MAME Launcher | version 0.9.12 | 10 February 2020

Code:
FEATURE  Create a new infolabel $INFO[ListItem.Property(history)] which shows the contents
         of history.dat for a machine. Add an option to include the contents of History.DAT
         in the asset database.
         Once this is tested remove the code to include History.DAT in the plot.
         See https://forum.kodi.tv/showthread.php?tid=304186&pid=2916270#pid2916270

FEATURE  Option to hide MAME machine flags.
         Contributed by Rychem28.

FEATURE  Option to hide SL item flags.
         Contributed by Rychem28.

FEATURE  Option to display only SL items with ROMs/CHDs available.
         Contributed by Rychem28.

FIX      Fixed parsing of History.dat 2.17.
         See https://forum.kodi.tv/showthread.php?tid=304186&pid=2913592#pid2913592
Reply
@Wintermute0110 just a quick question regarding the plugin and the built-in screensaver (add-on).

When running the add-on (launching MAME) the screensaver launches in the background. For me the screensaver that I use is Video Screensaver and the audio for the video plays while in MAME.

Are you aware of a way for the plugin to communicate with Kodi so that it does not go into idle mode? I am going to post a similar question in the Kodi general forum asking if this is a normal thing for Kodi in general.

Cheers,
Rychem
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 14

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