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

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
LamerDeluxe
Top Contributor
Posts: 1179
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 822 times
Been thanked: 264 times

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

Unread post by LamerDeluxe »

Mellified wrote: Sun Mar 28, 2021 7:17 pm Here it is...
https://github.com/mrchrisster/mister-a ... _Arcade.sh
Wow, that was fast! I'm going to try it.
EDIT: First game it started was DodonPachi :D This script has good taste.
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 »

Alright attract-ive people! We have a pretty big update for y'all!
  • Simply reboot your MiSTer to exit attract mode - no more "off" script! You can reboot (not reset!) from the OSD (F12 menu) or using the power switch.
  • Running "Attract_Arcade.sh" will cycle through all MRAs automatically.
  • If you want to use a custom list of MRAs create "/media/fat/Scripts/Arcade_Attract.txt" with 1 MRA per line, including the MRA extension.
  • Want to cycle only those MRAs for Horizontal and Vertical screens? Look for Arcade_Attract_Horiz.sh and Arcade_Attract_Vert.sh !
We still need to compile a list of vertical cores, so this script hasn't been released yet. Please reach out with your lists!

Get the update here:
https://github.com/mrchrisster/mister-arcade-attract
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

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

Unread post by jca »

It would be a good idea to have a variable BASE_PATH="/media/fat" which could be modified by an optional ini file for those having the _Arcade directory on USB.

Edit
And also a list of mras to exclude when running the script for all mras: after using brute force to replace all occurrences of fat by usb0 the script works but at some point the OSD got stuck with the popup "Sending ROM #1" and the progress bar with only one empty square. I sshed into MISTer and ps showed the culprit DoDonPachi (Arrange) which is very picky on my MISTer and does not start everytime.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

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

Unread post by jca »

This is not a problem with the script but it is a real annoyance and totally ruins the experience:
When switching cores the screen is sometimes screwed and stay that way until a reboot, usually with power off/on.
It seems that nothing can be done about it, Sorge tried his best but it is due to MISTer trying to make the FPGA do things for which it was not designed to do.
Sad!
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: 106
Joined: Sat Jan 30, 2021 9:20 am
Has thanked: 2 times
Been thanked: 17 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: 192
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 38 times
Been thanked: 39 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: 192
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 38 times
Been thanked: 39 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