MiSTer Extensions - Remote

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

AngelicLiver wrote: Wed May 10, 2023 1:29 pm

Can't thank you enough wizzo, this is incredibly useful already! I started using it on my arcade setup but now it lives on both my MiSTers.

Thank you very much! Glad to hear it's useful to you already. I'm open to suggestions on other features too if you have any

Flandango wrote: Wed May 10, 2023 10:42 pm

Try doing a cold reboot of mister. Mine didn't show up immediately after the update_all and a normal reboot (from OSD) until I did a cold reboot (or power-cycle).

That's right. After an update service will still be running the old version in memory. I don't believe there's a clean way for me to trigger a restart via update but I can look into it. I'd also like to add a service manager UI so it could restart itself. You could also open up the remote script on the mister and press restart from the UI in that

neogeo81 wrote: Wed May 10, 2023 9:48 pm

I updated with update_all but i don't get the new menu. What am i missing?

By the way. I added setname support for all the official systems with mgl files like you asked. I also added Saturn support. I didn't add CD support for neo geo yet, I couldn't see the source code for the new core updates and I need to look in one of those files to get the correct settings to define support. There also seems to be some confusion still about whether the new core will have a separate folder for CD images or not

User avatar
neogeo81
Top Contributor
Posts: 442
Joined: Fri Apr 16, 2021 1:52 pm
Has thanked: 34 times
Been thanked: 47 times

Re: MiSTer Extensions - Remote

Unread post by neogeo81 »

wizzo wrote: Wed May 10, 2023 11:50 pm
neogeo81 wrote: Wed May 10, 2023 9:48 pm

I updated with update_all but i don't get the new menu. What am i missing?

By the way. I added setname support for all the official systems with mgl files like you asked. I also added Saturn support. I didn't add CD support for neo geo yet, I couldn't see the source code for the new core updates and I need to look in one of those files to get the correct settings to define support. There also seems to be some confusion still about whether the new core will have a separate folder for CD images or not

Thanks a lot. It is working great. And with the menu option also. Yes, i think the Neo Geo CD core is merged with the normal Neo Geo core but still a WIP core. That's why i created a MGL file for the CD part.

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

New release is up. This is mostly a refactor of the code and a move over from the web client polling the mister (a lot) to using a websocket. You probably won't notice much has changed. Using the control buttons and on screen keyboard miiight feel a bit snappier.

I have added in one new feature. The client will show live the current playing core and game, as per the screenshot. You'll need the "recents" option turned on in your mister ini file for it to work properly, otherwise it'll only show the active core. Not very useful as is! But this integration can be used later to show a "recently played" list and display play time stats which is neat.

Attachments
Screenshot from 2023-05-12 16-33-20.png
Screenshot from 2023-05-12 16-33-20.png (29.8 KiB) Viewed 10462 times
Toya
Posts: 66
Joined: Tue Jun 08, 2021 9:59 pm
Has thanked: 5 times
Been thanked: 23 times

Re: MiSTer Extensions - Remote

Unread post by Toya »

Great!
Will you look into adding mgl creation support and adding mgl to folder?

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

Toya wrote: Fri May 12, 2023 10:27 am

Great!
Will you look into adding mgl creation support and adding mgl to folder?

Without too much work, now I can probably add a "create mgl" option to individual search results. I'll do that first

But you want bulk creation right? That will take some more time. First I need to create a full game browser, and then a workflow to create multiple mgl files at once. It's totally doable but will take a bit of time

Toya
Posts: 66
Joined: Tue Jun 08, 2021 9:59 pm
Has thanked: 5 times
Been thanked: 23 times

Re: MiSTer Extensions - Remote

Unread post by Toya »

Bulk creation is a perfect world scenario, but one per game is good!

KennyL
Posts: 116
Joined: Sun May 24, 2020 11:40 pm
Has thanked: 72 times
Been thanked: 38 times

Re: MiSTer Extensions - Remote

Unread post by KennyL »

This is really fantastic! Searching games and just launching them from phone feels magical haha. Really impressive that you can just hop around games and cores really fast. Not needing to dig around ini files would save tons of aggravation for me down the road.

Is it possible to run it on Mister itself to serve as framework for frontend?

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

Glad you like it!

KennyL wrote: Sat May 13, 2023 3:13 am

Is it possible to run it on Mister itself to serve as framework for frontend?

I wish. I had a good look into it with some people, it's not impossible but it's a LOT of work, and it will never really reach the level possible on a web UI. This was actually my answer to that same question. Of course if someone wanted to give it a shot they are welcome to and the API of this app would be accessible to it

The unfortunate fact is the CPU on the de10 is pretty weak and the Linux environment has only limited access to output graphics. SCUMMVM works well though, so obviously something is possible. But how how much time is someone willing to sink into making it work?

KennyL
Posts: 116
Joined: Sun May 24, 2020 11:40 pm
Has thanked: 72 times
Been thanked: 38 times

Re: MiSTer Extensions - Remote

Unread post by KennyL »

wizzo wrote: Sat May 13, 2023 3:44 am

I wish. I had a good look into it with some people, it's not impossible but it's a LOT of work, and it will never really reach the level possible on a web UI. This was actually my answer to that same question. Of course if someone wanted to give it a shot they are welcome to and the API of this app would be accessible to it

The unfortunate fact is the CPU on the de10 is pretty weak and the Linux environment has only limited access to output graphics. SCUMMVM works well though, so obviously something is possible. But how how much time is someone willing to sink into making it work?

Ah gotcha. I really wish for better UI especially for system settings. My biggest gripe is having to deal with ini for even basic settings. Pretty aggravating to deal with. Even $20 aliexpress handhelds have better UI... Your Remote is huge help for me.

Is it possible to show thumbnails while browsing games? I got one of those GBA EZ flash cart recently and it has option for showing thumbnails. They're tiny tiny but very helpful when surfing roms.

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

KennyL wrote: Sat May 13, 2023 8:14 pm

Ah gotcha. I really wish for better UI especially for system settings. My biggest gripe is having to deal with ini for even basic settings. Pretty aggravating to deal with. Even $20 aliexpress handhelds have better UI... Your Remote is huge help for me.

Is it possible to show thumbnails while browsing games? I got one of those GBA EZ flash cart recently and it has option for showing thumbnails. They're tiny tiny but very helpful when surfing roms.

Hopefully I can get the ini editor working soon. It's all on track but it's really boring and repetitive

I would say getting on par with a cheap handheld is possible on mister, but again it's a case of someone creating a low level UI library from scratch and figuring out how to integrate it. Not the most fun project imo

Yes on the thumbnails. Theres a fair bit of work to get to that stage but eventually this could be on the same level as emulationstation no problem. I only haven't done it because everyone else tries to do that first, I wanted to see what else is useful

User avatar
charmless
Posts: 183
Joined: Thu May 28, 2020 3:38 pm
Location: Stockholm, Sweden
Has thanked: 105 times
Been thanked: 30 times

Re: MiSTer Extensions - Remote

Unread post by charmless »

Ok, so here comes a most likely stupid question. Do you have to start the remote script everytime you start your MiSTer? Or is there a way of making it auto run on start-up?

tvspelsdagboken I run a video game site (in Swedish)

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

charmless wrote: Thu May 18, 2023 4:08 pm

Ok, so here comes a most likely stupid question. Do you have to start the remote script everytime you start your MiSTer? Or is there a way of making it auto run on start-up?

It should auto-start. When you first run it, it'll pop up a dialog asking to add itself to system startup. You only need to do that once.

Toya wrote: Fri May 12, 2023 11:33 am

Bulk creation is a perfect world scenario, but one per game is good!

One per game is now done. I've just released an update which adds a "create shortcut" option to the search results.

Some caveats: cannot delete mgls if you wrongly created them, can't create new folders. I'll probably add those to the menu page soon. Error reporting is pretty limited atm too. That said, the basic functionality is there now and ready to expand on for bulk mgl creation.

Attachments
sc1.png
sc1.png (90.91 KiB) Viewed 10104 times
sc2.png
sc2.png (35.26 KiB) Viewed 10104 times
User avatar
charmless
Posts: 183
Joined: Thu May 28, 2020 3:38 pm
Location: Stockholm, Sweden
Has thanked: 105 times
Been thanked: 30 times

Re: MiSTer Extensions - Remote

Unread post by charmless »

wizzo wrote: Thu May 18, 2023 4:17 pm

It should auto-start. When you first run it, it'll pop up a dialog asking to add itself to system startup. You only need to do that once.

Ok, I didn't see that. Mine just said Service is not running, and I pressed the start option. And it's not starting on boot. I'll try it again and see what happens. The script is awesome by the way.

tvspelsdagboken I run a video game site (in Swedish)

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

charmless wrote: Thu May 18, 2023 4:23 pm

Ok, I didn't see that. Mine just said Service is not running, and I pressed the start option. And it's not starting on boot. I'll try it again and see what happens. The script is awesome by the way.

Thank you! Well that definitely doesn't sound right. It's not smart enough to know it already asked, so it should be bugging you to add it every time you run it from the scripts menu if it's not there.

When you have a chance, can you please upload or copy paste the contents of the file "user-startup.sh" in the "linux" folder on your SD card.

I'm off to bed but I will take a look and help your get it sorted soon.

User avatar
charmless
Posts: 183
Joined: Thu May 28, 2020 3:38 pm
Location: Stockholm, Sweden
Has thanked: 105 times
Been thanked: 30 times

Re: MiSTer Extensions - Remote

Unread post by charmless »

wizzo wrote: Thu May 18, 2023 4:32 pm
charmless wrote: Thu May 18, 2023 4:23 pm

Ok, I didn't see that. Mine just said Service is not running, and I pressed the start option. And it's not starting on boot. I'll try it again and see what happens. The script is awesome by the way.

Thank you! Well that definitely doesn't sound right. It's not smart enough to know it already asked, so it should be bugging you to add it every time you run it from the scripts menu if it's not there.

When you have a chance, can you please upload or copy paste the contents of the file "user-startup.sh" in the "linux" folder on your SD card.

I'm off to bed but I will take a look and help your get it sorted soon.

I only have a file called _user-startup-sh in my Linux folder. The contents look like this:

#!/bin/sh

echo "" $1 ""

So, something seems off. I've never messed around with scripts that could autostart before.

tvspelsdagboken I run a video game site (in Swedish)

User avatar
charmless
Posts: 183
Joined: Thu May 28, 2020 3:38 pm
Location: Stockholm, Sweden
Has thanked: 105 times
Been thanked: 30 times

Re: MiSTer Extensions - Remote

Unread post by charmless »

charmless wrote: Thu May 18, 2023 4:40 pm
wizzo wrote: Thu May 18, 2023 4:32 pm
charmless wrote: Thu May 18, 2023 4:23 pm

Ok, I didn't see that. Mine just said Service is not running, and I pressed the start option. And it's not starting on boot. I'll try it again and see what happens. The script is awesome by the way.

Thank you! Well that definitely doesn't sound right. It's not smart enough to know it already asked, so it should be bugging you to add it every time you run it from the scripts menu if it's not there.

When you have a chance, can you please upload or copy paste the contents of the file "user-startup.sh" in the "linux" folder on your SD card.

I'm off to bed but I will take a look and help your get it sorted soon.

I only have a file called _user-startup-sh in my Linux folder. The contents look like this:

#!/bin/sh

echo "" $1 ""

So, something seems off. I've never messed around with scripts that could autostart before.

Renamed the file. Ran the script again. Got the prompt. All is well. Feel stupid but also a little smarter. Sleep well!

tvspelsdagboken I run a video game site (in Swedish)

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

charmless wrote: Thu May 18, 2023 4:45 pm

Renamed the file. Ran the script again. Got the prompt. All is well. Feel stupid but also a little smarter. Sleep well!

That is a bug then! It should make a new one if nothing exist. But I forgot to test that. I'll fix it up tomorrow, thank you for checking that for me

soulmedia
Posts: 12
Joined: Wed Jan 11, 2023 1:31 pm
Has thanked: 6 times
Been thanked: 1 time

Re: MiSTer Extensions - Remote

Unread post by soulmedia »

Great work on this Wizzo!

I have another potential use case for this: open the manual for the currently running game via the Remote app. It only ever makes sense for the manual to be open on a second screen, so this seems like the perfect solution!

I suppose the issue with this is where the PDFs for the manuals would come from. Perhaps https://www.gamesdatabase.org/all_manuals ?

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

I have just put up a new minor release. This is mostly to fix the earlier bug where there mister startup file wasn't being created if it didn't already exist. I've also made some improvements to the ini editing section and working on some tests to finally write to the ini file. This feature is pretty close to functional now

soulmedia wrote: Mon May 22, 2023 3:26 pm

Great work on this Wizzo!

I have another potential use case for this: open the manual for the currently running game via the Remote app. It only ever makes sense for the manual to be open on a second screen, so this seems like the perfect solution!

I suppose the issue with this is where the PDFs for the manuals would come from. Perhaps https://www.gamesdatabase.org/all_manuals ?

Thank you! Yes I totally agree, reading manuals would be a great use case for it. I like the idea of doing it for the currently running game for now, rather than doing it during indexing every game. I might be able to sneak this in early in that case!

soulmedia
Posts: 12
Joined: Wed Jan 11, 2023 1:31 pm
Has thanked: 6 times
Been thanked: 1 time

Re: MiSTer Extensions - Remote

Unread post by soulmedia »

wizzo wrote: Tue May 23, 2023 1:01 am

Thank you! Yes I totally agree, reading manuals would be a great use case for it. I like the idea of doing it for the currently running game for now, rather than doing it during indexing every game. I might be able to sneak this in early in that case!

Fantastic - thanks again!

Fed
Posts: 40
Joined: Mon May 25, 2020 6:31 am
Has thanked: 9 times
Been thanked: 2 times

Re: MiSTer Extensions - Remote

Unread post by Fed »

Love this extension, thanks for all the work @wizzo !

May I suggest you add a feature that would allow to switch between ini files ? Would be really useful to have when you move to a display that does not support the signal configured in your main ini.
I know key combinations exist to achieve that but being able to pick one from the remote ui would be great. If the name of the ini could be shown it would be even better now that we have the option to customise their name.

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

Fed wrote: Wed May 31, 2023 5:11 am

Love this extension, thanks for all the work @wizzo !

May I suggest you add a feature that would allow to switch between ini files ? Would be really useful to have when you move to a display that does not support the signal configured in your main ini.
I know key combinations exist to achieve that but being able to pick one from the remote ui would be great. If the name of the ini could be shown it would be even better now that we have the option to customise their name.

You're welcome! Glad you're enjoying it.

I looked into this and it turned out to be kind of complicated. The mechanism on the backend that does the ini switch is difficult to access from my end, so I am waiting on some advice before I go any further. I like the idea for sure though and will see what I can do.

fierman
Posts: 111
Joined: Mon Mar 28, 2022 11:08 pm
Has thanked: 84 times
Been thanked: 23 times

Re: MiSTer Extensions - Remote

Unread post by fierman »

Ha! This is neat. Very elegant solution, I like the minimalistic approach. Screenshot option is nice too. Thanks!

Fed
Posts: 40
Joined: Mon May 25, 2020 6:31 am
Has thanked: 9 times
Been thanked: 2 times

Re: MiSTer Extensions - Remote

Unread post by Fed »

wizzo wrote: Thu Jun 01, 2023 12:32 pm

You're welcome! Glad you're enjoying it.

I looked into this and it turned out to be kind of complicated. The mechanism on the backend that does the ini switch is difficult to access from my end, so I am waiting on some advice before I go any further. I like the idea for sure though and will see what I can do.

Could having a button on the UI that would replicate using the 4 shortcuts available be a potentially easier solution to implement ?
For reminder :
Filename Hotkey Combination
MiSTer.ini Controller: Back + Right
MiSTer_alt_1.ini Controller: Back + Left
MiSTer_alt_2.ini Controller: Back + Up
MiSTer_alt_3.ini Controller: Back + Down

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

fierman wrote: Thu Jun 01, 2023 2:33 pm

Ha! This is neat. Very elegant solution, I like the minimalistic approach. Screenshot option is nice too. Thanks!

Thank you! Hope it's useful for you

Fed wrote: Thu Jun 01, 2023 3:45 pm

Could having a button on the UI that would replicate using the 4 shortcuts available be a potentially easier solution to implement ?
For reminder :
Filename Hotkey Combination
MiSTer.ini Controller: Back + Right
MiSTer_alt_1.ini Controller: Back + Left
MiSTer_alt_2.ini Controller: Back + Up
MiSTer_alt_3.ini Controller: Back + Down

That would definitely be easiest. I don't currently have a service to emulate a controller but I assume it's not too hard. If just having 4 buttons mapped to those hotkeys fits the bill for you then I can look at that first for sure

Fed
Posts: 40
Joined: Mon May 25, 2020 6:31 am
Has thanked: 9 times
Been thanked: 2 times

Re: MiSTer Extensions - Remote

Unread post by Fed »

wizzo wrote: Fri Jun 02, 2023 1:51 am

That would definitely be easiest. I don't currently have a service to emulate a controller but I assume it's not too hard. If just having 4 buttons mapped to those hotkeys fits the bill for you then I can look at that first for sure

Could you not use the "back" and different "directions" already in place for navigation with your extension ?
We would need 4 buttons in the UI that would each be a combination of "back"+"up OR down OR left OR right".

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

Fed wrote: Fri Jun 02, 2023 7:28 am

Could you not use the "back" and different "directions" already in place for navigation with your extension ?
We would need 4 buttons in the UI that would each be a combination of "back"+"up OR down OR left OR right".

The buttons in the app actually map to an emulated keyboard. So they're just sending keyboard presses. But my understanding is this ini switching features only reacts to controller button combinations.

If you get it working with a keyboard please let me know! It would save a lot of time. But I tried it and couldn't make it work with a keyboard, and I couldn't see a reference for it in the mister main source.

In any case, I will get it working somehow :)

fierman
Posts: 111
Joined: Mon Mar 28, 2022 11:08 pm
Has thanked: 84 times
Been thanked: 23 times

Re: MiSTer Extensions - Remote

Unread post by fierman »

wizzo wrote: Fri Jun 02, 2023 1:51 am

Thank you! Hope it's useful for you

Absolutely. It's the best way to add menu functionality without touching the main menu system (which should stay as it is imho, the less feature creep the better)
It also makes it possible to easily start and config games in an arcade cab without having to add a keyboard. Very useful I say, and fun too!

Without wanting to overload you with feature requests, I felt it would be nice to have a few 'free' configurable buttons in the control page, which I could map to Coin and Start for instance. (Using the keyboard works fine of course, but big fingers and small buttons etc :) )

Also: how the #%^$ did you get indexing of all games working so fast? Tens of thousands of titles got indexed within a few minutes here - which impressed me quite a bit. Much faster than simply using du or find.

User avatar
LamerDeluxe
Top Contributor
Posts: 1218
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 869 times
Been thanked: 279 times

Re: MiSTer Extensions - Remote

Unread post by LamerDeluxe »

fierman wrote: Fri Jun 02, 2023 10:56 am

Without wanting to overload you with feature requests, I felt it would be nice to have a few 'free' configurable buttons in the control page, which I could map to Coin and Start for instance. (Using the keyboard works fine of course, but big fingers and small buttons etc :) )

Ooh, that could be really interesting. I'm thinking about the function keys used with the 8-bit Atari cores, can never remember which is which and things like the ctrl-whichfunctionkeywasitagain combination needed to start VIC-20 cartridges.

EDIT: Oh and keys that are often used in games, like the function keys, enter, escape, space etc. So you don't have to attach a keyboard to play most games.

User avatar
wizzo
Scripting Wizard
Posts: 183
Joined: Sat Mar 12, 2022 11:32 am
Has thanked: 15 times
Been thanked: 242 times

Re: MiSTer Extensions - Remote

Unread post by wizzo »

fierman wrote: Fri Jun 02, 2023 10:56 am

Also: how the #%^$ did you get indexing of all games working so fast? Tens of thousands of titles got indexed within a few minutes here - which impressed me quite a bit. Much faster than simply using du or find.

Well thank you for noticing that, it took quite a while! No big secret, just a lot of little tweaks over time to make the scan more efficient and a good stdlib in the language. I have some improvements in mind to make it faster but it's kind of good enough for now :)

fierman wrote: Fri Jun 02, 2023 10:56 am

Without wanting to overload you with feature requests, I felt it would be nice to have a few 'free' configurable buttons in the control page, which I could map to Coin and Start for instance. (Using the keyboard works fine of course, but big fingers and small buttons etc :) )

LamerDeluxe wrote: Fri Jun 02, 2023 5:31 pm

Ooh, that could be really interesting. I'm thinking about the function keys used with the 8-bit Atari cores, can never remember which is which and things like the ctrl-whichfunctionkeywasitagain combination needed to start VIC-20 cartridges.

EDIT: Oh and keys that are often used in games, like the function keys, enter, escape, space etc. So you don't have to attach a keyboard to play most games.

I really love this idea! I've put it on the list. A major roadblock I see is actually the UI to define the keys. This is kind of a complex interaction and would take some time to put together. Currently remote also doesn't actually save anything to your mister except the search index, so I need to add in something to store settings like this.

How about an interim solution? You tell me what buttons you'd like to see added and I can just add them. It would be pretty easy as well for me to make it context sensitive, so these keys only display when this core is loaded. If that sounds good in the meantime just let me know what you'd like exactly.

Post Reply