Multi cores/roms "attract mode" with Linux bash script

Kernel, Main, Utilities & Apps, Misc Devices
Airbag
Posts: 2
Joined: Wed Jun 10, 2020 2:46 pm

Multi cores/roms "attract mode" with Linux bash script

Unread post by Airbag »

Hello,

I'm trying to make a bash script that launches differents cores / rom i1 by 1 with a timer.

Something like that :

Code: Select all

#!/bin/bash
/media/fat/MiSTer /media/fat/_Arcade/cores/jtcps1_20201010.rbf "/media/fat/_Arcade/_Unofficial/_CPS1/Street Fighter II'  Hyper Fighting -World 921209-.mra"
sleep 100
killall MiSTer
/media/fat/MiSTer /media/fat/_Arcade/cores/jtcps1_20201010.rbf "/media/fat/_Arcade/_Unofficial/_CPS1/Street Fighter Zero -CPS Changer, Japan 951020-.mra"
sleep 100
killall MiSTer

# etc
It could be semi-automated for a whole folder of roms :

Code: Select all

for i in `ls`; 
do ... ; 
done
But first things first : I can't even launch a single core + rom with command line. I only just get the "static" screen + the core menu.
I guess I miss a "run/start" parameter in the commandline ?

Any idea ? Thanks !
zakk4223
Posts: 26
Joined: Sun May 24, 2020 10:55 pm

Re: Multi cores/roms "attract mode" with Linux bash script

Unread post by zakk4223 »

That won't work. Main mister doesn't load the RBF into the FPGA on launch, it does that on selection of the menu entry, then "restarts" itself with those arguments so it knows to setup whatever is required for that core.

Basically when you select a core/mra in the menu, main mister does this:
- Figure out the RBF path (from the MRA, or just directly)
- Load the RBF into the FPGA
- exec("/media/fat/MiSTer") with the rbf and mra arguments.

Unfortunately there's no quick and easy way to load a core from the command line. I know there were a few people working on something like that, I think via a unix socket. I'm not sure where that effort went and if any of it ever ended up in the mainline repo.
Airbag
Posts: 2
Joined: Wed Jun 10, 2020 2:46 pm

Re: Multi cores/roms "attract mode" with Linux bash script

Unread post by Airbag »

Thanks for the reply ! I'm not sure if I'm still skilled enough to deal with sockets in C, but I could try.
zakk4223 wrote: Wed Nov 18, 2020 5:47 am I know there were a few people working on something like that, I think via a unix socket.
Do you have any links about this ? I can't find anything on the forum.
Post Reply