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

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

I agree it's annoying when MiSTer doesn't load a core properly. I spend several hours trying different techniques to reset the MiSTer programmatically to work around the issue. Unfortunately nothing worked like the "Reboot" option. Some things I tried - killing the MiSTer process - actually made the problem worse.

MrChrisster and I are talking about a way to include a blacklist for problematic MRAs.

Finally, we're trying to minimize the number of files so no INI file. I will add a variable inside the script to change the BASE_PATH more easily.
zakk4223
Posts: 270
Joined: Sun May 24, 2020 10:55 pm
Been thanked: 107 times

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

Unread post by zakk4223 »

Try loading the menu core before loading the MRA and see if that helps the weird loads. (So when switching do menu.rbf, wait, load mra)
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

zakk4223 wrote: Tue Mar 30, 2021 6:31 am Try loading the menu core before loading the MRA and see if that helps the weird loads. (So when switching do menu.rbf, wait, load mra)
I did some testing with that and it didn't seem to help noticeably.

That said, we've been rapidly evolving the script based on feedback. Another new update today, which consolidates things down to a single Attract script and an INI. FeelLucky is there as well.

Available here!
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

Heya folks! It's not April Fools here anymore - but we do have an improved version of the Attract_Arcade script! The INI is now fully optional. We do suggest using it if you want to customize behavior at all though.

https://github.com/mrchrisster/mister-arcade-attract

Enjoy!
crabfists
Posts: 11
Joined: Fri Jun 05, 2020 9:20 am
Has thanked: 7 times
Been thanked: 1 time

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

Unread post by crabfists »

This is awesome. I often have my Mister on in the background while I am working and this script is just what I was looking for.

Thank you for making it. :)
hitm4n
Posts: 104
Joined: Sat Jan 30, 2021 9:20 am
Has thanked: 2 times
Been thanked: 16 times

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

Unread post by hitm4n »

Also really keen to try this too, i'm looking for something that could load roms via different cores, so a speccy game loads and plays, then a snes game, then atari 800 and so on. Way harder i bet, probably not even possible with how different all the cores work. This is cool though, will read up about it and give it a go. Thanks.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

hitm4n wrote: Fri Apr 02, 2021 5:35 pm i'm looking for something that could load roms via different cores, so a speccy game loads and plays, then a snes game, then atari 800 and so on. Way harder i bet, probably not even possible with how different all the cores work.
Right now there is a way to tell MiSTer to load a specific core from Linux. Unfortunately there is no way to tell a core to load a specific ROM / game / tape / disk image / vhd... probably because there are so, so many options!

Arcade games are loaded by MRA, which includes the core and game-specific settings so this script works really simply.

A few console cores can use a game rom in place of the boot.rom file, which allows booting directly to some games. Lots of limitations there though!

I suspect this project could be used to automate an "Attract_All" script at some point. We just haven't gotten there - yet.
https://github.com/pocomane/MiSTer_Batch_Control
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

crabfists wrote: Fri Apr 02, 2021 10:34 am This is awesome. I often have my Mister on in the background while I am working and this script is just what I was looking for.

Thank you for making it. :)
One thing to note is many cores have dip switch settings to enable or disable the "demo sound" - whether you hear audio during attract mode. It's tedious, but going through the cores and setting the dip switches to your preference can enhance the experience.
User avatar
ItalianGrandma
Posts: 133
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 17 times
Been thanked: 22 times
Contact:

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

Unread post by ItalianGrandma »

Mellified wrote: Fri Apr 02, 2021 6:24 am Heya folks! It's not April Fools here anymore - but we do have an improved version of the Attract_Arcade script! The INI is now fully optional. We do suggest using it if you want to customize behavior at all though.

https://github.com/mrchrisster/mister-arcade-attract

Enjoy!
Awesome script! I just used it to stream and it worked nicely! The only thing I noticed in the latest version of the script is that it no longer boots to the main menu and shows the game title between switches. I like to put the title of the next game in my stream...is there any way that there could be an brief on screen message displaying the mra name after the game launches? Usually, it's not an issue, but some games are really old and have no title screen :lol:.

I look forward to the day when there's scripts like this for more cores!
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

The way we're switching cores doesn't allow for that display on the main menu. The old method required you to explicitly go in and disable Attract mode, whereas the current solution just needs a cold reboot so we're not going back.

Cores currently show you their short name on the OSD menu screen on the left side. With MRAs being updated with the full name hopefully we'll see cores display it somewhere in the menu.
User avatar
ItalianGrandma
Posts: 133
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 17 times
Been thanked: 22 times
Contact:

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

Unread post by ItalianGrandma »

Makes sense, thanks for the reply!
User avatar
Xzarian
Posts: 34
Joined: Sun May 24, 2020 11:35 pm
Been thanked: 2 times

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

Unread post by Xzarian »

Wow, this script is exactly what I was looking for! :D

So I have some mra files in various sub directory (_Arcade/_CPS2). I haven't tried yet, but I guess in the text file they would be listed with forward slash like /_CPS2/Street Fighter Alpha 3 (Euro 980904).mra?

EDIT: Looks like you can't use sub directories? I tried with and without forward slash and it just regenerates the Attract_Arcade.txt file. I ended up just updating the ini file with the path mrapath="/media/fat/_Arcade/_CPS2".
"MiSTer is not a garbage can with random functions used by 1-2 people."
-Sorgelig
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

The Vertical and Horizontal modes use specific paths, which have subdirectories. If the script doesn't see the Attract_Arcade.txt file in the same location as the script it will re-create it in /tmp/. So copy it from /tmp/ to /media/fat/Scripts/ and edit it. You should be all set.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

We've been testing a general Attract_Mode script for MiSTer. We're seeing a pretty big issue with the reliability switching between many cores however.

https://github.com/MiSTer-devel/Main_Mi ... -817547340
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

Just a heads up I started a new topic specifically for the Attract Mode script mrchrister and I are working on. You can see it here:

viewtopic.php?f=29&t=2437
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 51 times

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

Unread post by Mellified »

We've added so many features to our Attract Mode script it's leveled up to Super Attract Mode!

viewtopic.php?f=29&t=2493
Post Reply