Page 1 of 2

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

Posted: Sun Mar 28, 2021 7:17 pm
by Mellified

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

Posted: Sun Mar 28, 2021 8:45 pm
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.

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

Posted: Mon Mar 29, 2021 10:42 pm
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

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

Posted: Tue Mar 30, 2021 2:14 am
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.

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

Posted: Tue Mar 30, 2021 3:49 am
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!

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

Posted: Tue Mar 30, 2021 4:06 am
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.

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

Posted: Tue Mar 30, 2021 6:31 am
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)

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

Posted: Tue Mar 30, 2021 11:07 pm
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!

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

Posted: Fri Apr 02, 2021 6:24 am
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!

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

Posted: Fri Apr 02, 2021 10:34 am
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. :)

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

Posted: Fri Apr 02, 2021 5:35 pm
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.

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

Posted: Fri Apr 02, 2021 6:40 pm
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

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

Posted: Fri Apr 02, 2021 6:43 pm
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.

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

Posted: Sat Apr 03, 2021 6:16 pm
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!

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

Posted: Sun Apr 04, 2021 5:09 am
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.

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

Posted: Sun Apr 04, 2021 5:51 am
by ItalianGrandma
Makes sense, thanks for the reply!

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

Posted: Mon Apr 12, 2021 12:25 am
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".

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

Posted: Mon Apr 12, 2021 5:58 pm
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.

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

Posted: Mon Apr 12, 2021 6:01 pm
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

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

Posted: Mon Apr 12, 2021 11:34 pm
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

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

Posted: Fri Apr 23, 2021 4:43 pm
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