Launching a Script Without Rebooting The MiSTer?

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
barfood
Posts: 96
Joined: Thu Jun 18, 2020 6:55 pm
Location: new user: felleg
Has thanked: 87 times
Been thanked: 20 times
Contact:

Launching a Script Without Rebooting The MiSTer?

Unread post 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).

gamesfan
Posts: 71
Joined: Mon Jun 07, 2021 7:15 pm
Has thanked: 3 times
Been thanked: 12 times

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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.
User avatar
barfood
Posts: 96
Joined: Thu Jun 18, 2020 6:55 pm
Location: new user: felleg
Has thanked: 87 times
Been thanked: 20 times
Contact:

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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.
dshadoff
Core Developer
Posts: 547
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 20 times
Been thanked: 145 times

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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 ?
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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.
User avatar
barfood
Posts: 96
Joined: Thu Jun 18, 2020 6:55 pm
Location: new user: felleg
Has thanked: 87 times
Been thanked: 20 times
Contact:

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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.
goodmaki
Posts: 8
Joined: Fri May 29, 2020 4:57 am
Has thanked: 6 times

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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.
dshadoff
Core Developer
Posts: 547
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 20 times
Been thanked: 145 times

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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).
goodmaki
Posts: 8
Joined: Fri May 29, 2020 4:57 am
Has thanked: 6 times

Re: Launching a Script Without Rebooting The MiSTer?

Unread post 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
Post Reply