Page 1 of 1

Launching a Script Without Rebooting The MiSTer?

Posted: Sat May 07, 2022 1:45 pm
by barfood

Sometimes I am in the middle of a game and need to launch a script (e.g. Bluetooth pairing). The only way I know to gain access to the Scripts submenu is the reboot the MiSTer and lose progress in the game. This isn't ideal...

Is there a key combo I missed? Is this a limitation of the FPGA? I find this weird, since in theory I can still SSH into the MiSTer and launch scripts from there (this is inconvenient however).


Re: Launching a Script Without Rebooting The MiSTer?

Posted: Sat May 07, 2022 2:21 pm
by gamesfan
I have only tried BT with a DS5 controller, but it will re-pair at power-on on its own after paired once. Only thing I have see is sometimes it takes a couple times to pair it (as I think it has to do with how often it times out before it pairs) Then once paired it stays active until reboot and I have to repair the controller but it only requires me to tell the controller to connect not run the script again.

Re: Launching a Script Without Rebooting The MiSTer?

Posted: Sat May 07, 2022 2:32 pm
by barfood
Thanks for your response! Maybe I worded my issue badly, let me try this again:

I am not asking about Bluetooth in particular (connectivity works great for me at the moment), I am asking about running scripts in general. When a core is launched, I see no way to launch scripts. For example, I could not run update_all.sh from the OSD while the Genesis core is running.

Re: Launching a Script Without Rebooting The MiSTer?

Posted: Sat May 07, 2022 3:12 pm
by dshadoff
Since the HPS (UNIX) portion is still heavily involved with gameplay, it is likely that running a script (or transferring files, etc.) would interfere with gameplay. Why exactly is it so important to run a script after a core is launched ?

Re: Launching a Script Without Rebooting The MiSTer?

Posted: Sat May 07, 2022 3:46 pm
by jca
I think it has more to do with the frame buffer. Not only you can run scripts only after reboot but the same applies for console mode, both require full screen.

Re: Launching a Script Without Rebooting The MiSTer?

Posted: Sat May 07, 2022 4:22 pm
by barfood
dshadoff wrote: Sat May 07, 2022 3:12 pm Since the HPS (UNIX) portion is still heavily involved with gameplay, it is likely that running a script (or transferring files, etc.) would interfere with gameplay. Why exactly is it so important to run a script after a core is launched ?
It is simply a matter of convenience and curiosity of knowing if it was at all possible to do.

Re: Launching a Script Without Rebooting The MiSTer?

Posted: Wed May 18, 2022 5:18 pm
by goodmaki
dshadoff wrote: Sat May 07, 2022 3:12 pm Since the HPS (UNIX) portion is still heavily involved with gameplay, it is likely that running a script (or transferring files, etc.) would interfere with gameplay. Why exactly is it so important to run a script after a core is launched ?
Have you tested this hypothesis?

I've been running scripts via SSH while the MiSTer is booted into a game with no issues whatsoever, not even a single noticeable frame drop. I also transfer files via FTP, sometimes thousands at a time, while booted into a game without ever encountering an issue. Often I leave SAM (Super Attract Mode) running while I simultaneously run scripts and transfer files to it and it switches between cores and games perfectly while doing so.

To your question on why someone would want to run scripts when loaded in a game: In my case I like being able to update, configure and add/remove files on the system while leaving it in SAM or while I or someone else is enjoying playing on it. The OP also suggested a use, that being in-game bluetooth pairing.

Re: Launching a Script Without Rebooting The MiSTer?

Posted: Wed May 18, 2022 6:16 pm
by dshadoff
It depends on the script and it depends on the demands of the core.
There are cases where the HPS has trouble keeping up with the core, let alone doing so in competition with a script.

Here's an example of one of the things I found:
https://github.com/MiSTer-devel/TurboGr ... issues/176

...So I can easily understand that it's disabled in order to reduce the number of support requests from non-developers.
If you're a developer, you can always SSH in and run it by hand (and take your chances).

Re: Launching a Script Without Rebooting The MiSTer?

Posted: Wed May 18, 2022 6:33 pm
by goodmaki
That makes sense to me. As an end user I haven't noticed anything strange but can understand the potential for problems. I'll continue taking my chances however :D