MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Update:
ao486 is now supported. Place screensaver vhd's under /media/fat/games/ao486/screensaver (USB or SD works)
You can find the vhd's in archive under ao486_screensavers

UPDATE

  • flynnsbit is currently working on a way for SAM to launch random games directly from the top300 image!

  • SAM now has a kids_safe ini setting. This will download white lists for supported cores that filter games by ESRB "All Ages rating" so you don't have any sexy mahjong game running while the kid comes in ;)

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Some quality of life updates:

  • Sam will now create a new gamelist if you add new roms. Sounds trivial but the reason it wasn't implemented so far was to minimize SD card writes. We found a way to only update lists if necessary
  • Kids safe filter received other improvements and a menu selection
  • Sam will soon be updated completely through update all without the need to use Sam's updater
User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

  • TTY2OLED Updates: Text in the upper line doesn't bounce back and forth anymore but instead runs through continuously
  • SAM Menu got restructured
  • Updated roulette mode
  • Updated category only mode
  • Pushing the start button now let's you play the current game, any other button returns to the MiSTer Menu. This was working before thanks to wizzo but wasn't cleanly implemented. You can set it up in the menu under "Configure Exit behavior".
    All added controllers to SAM are now stored in /Scripts/.MiSTer_SAM/sam_controllers.json.

Please share your controller info from sam_controllers.json so I can add those to github.

rhester72
Top Contributor
Posts: 1101
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by rhester72 »

mrchrister wrote: Fri Feb 03, 2023 1:55 am

ao486 is now supported. Place screensaver vhd's under /media/fat/games/ao486/screensaver (USB or SD works)
You can find the vhd's in archive under ao486_screensavers

I can't get this working at all, despite using the included boot0/1 ROMs in the archive.org set and placing them in the correct folder (and ensuring they appear in the gamelist). Is there some trick required?

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Did you set the corelist to ao486 as well? You can also open SAM's menu and go to the single core selection mode to only select ao486.

rhester72
Top Contributor
Posts: 1101
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by rhester72 »

mrchrister wrote: Sat Mar 04, 2023 11:54 pm

Did you set the corelist to ao486 as well? You can also open SAM's menu and go to the single core selection mode to only select ao486.

Yes to both. The core starts, but just says it can't detect a hard drive.

Majorspawn
Posts: 16
Joined: Wed Aug 24, 2022 3:25 am
Been thanked: 3 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by Majorspawn »

Would it be possible to only choose specific arcade cores for example rizing or cave core, I have a horizontal and a vertical cabinet but the vertical orientation filter doesn't always play vertical games. Or cps1, 2, neo for horizontal only?

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

I did some changes to the horizontal and vertical filter and have talked to the admin of the mame database to remove certain games that are not horizontal or vertical. Please make sure to have the newest version of SAM, this should make those filters work much better.

SAM also supports path filters. You can create a directory under /media/fat/_Arcade/ and just drop the mra's in there you'd like to play. Then set the arcade path filter to that directory in MiSTer_SAM.ini

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

@rhester72
Not sure what the issue could be... do you have top300 image working?
You might want to ask flynnsbit through discord. We're also working on supporting Top300 image as a screensaver image for SAM atm

rhester72
Top Contributor
Posts: 1101
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by rhester72 »

mrchrister wrote: Tue Mar 07, 2023 12:29 am

@rhester72
Not sure what the issue could be... do you have top300 image working?
You might want to ask flynnsbit through discord. We're also working on supporting Top300 image as a screensaver image for SAM atm

Never tried - other than the screensaver images, I only have a single image I built myself with favorites.

Will give the Discord channel a try.

Majorspawn
Posts: 16
Joined: Wed Aug 24, 2022 3:25 am
Been thanked: 3 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by Majorspawn »

mrchrister wrote: Tue Mar 07, 2023 12:21 am

I did some changes to the horizontal and vertical filter and have talked to the admin of the mame database to remove certain games that are not horizontal or vertical. Please make sure to have the newest version of SAM, this should make those filters work much better.

SAM also supports path filters. You can create a directory under /media/fat/_Arcade/ and just drop the mra's in there you'd like to play. Then set the arcade path filter to that directory in MiSTer_SAM.ini

so i added arcadepathfilter="/media/fat/Arcade/SAMV"
is is the full path or just the sub folder name under "
Arcade"?

Attachments
Screenshot 2023-03-18 185052.png
Screenshot 2023-03-18 185052.png (83.92 KiB) Viewed 5185 times
User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

I believe either way should work. If it doesn't work, SAM has likely not added the custom path to it's game list. There is an option to reset gamelists on the menu that might help

User avatar
ericgus09
Posts: 206
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by ericgus09 »

So I noticed something strange with SAM , for the Amiga core, it copies the ./games/amiga/shared folder to /tmp? this seems a bit odd to me as there could be a lot of random stuff unrelated to SAM in there and it doesnt seem to make any sort of logical sense why this is being done?

Is there a reason for this behavior? can it be disabled..? if you have more than a few hundred megs of files, installers and other random things (mods, etc) this can easily blow out the /tmp filesystem (for example my /tmp filesystem is only 247mb is total size).. Stuff needed by other amiga profiles not specifically for SAM/MegaAGS.hdf could easily be in the "shared" folder and have no need to be copied to /tmp for SAM's use..

I also noticed another weird bug with SAM, if for example you select the Atari2600 core only as your source, but you dont have a matching gamelist.txt file for it (because weirdly the 2600 directory is scanned in the 7800 folder), it will default to Arcade? even if Arcade is not enabled as a core to use? This also seems weird and bug-like. This some kind of undocumented "Default" behavior if a {core}_gamelist.txt file is missing entries it will just decide to show Arcade games instead???

For now I have disabled SAM for the Amiga core util this, bug? , is resolved?

Code: Select all

[ ! -d "/tmp/.SAM_tmp/Amiga_shared" ] && mkdir -p "/tmp/.SAM_tmp/Amiga_shared"
[ -d "${amigapath}/shared" ] && cp -r --force "${amigapath}"/shared/* /tmp/.SAM_tmp/Amiga_shared &>/dev/null
[ -d "${amigapath}/shared" ] && [ "$(mount | grep -ic "${amigapath}"/shared)" == "0" ] && mount --bind "/tmp/.SAM_tmp/Amiga_shared" "${amigapath}/shared"
	if [ ! -f "${mrsampath}"/SAM_Rated/amiga_rated.txt ]; then
[ "$(mount | grep -ic "${amigapath}"/shared)" == "1" ] && umount "${amigapath}/shared"
User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

The reason for this behavior is that our main objective with SAM is to limit any unnecessary writes to the SD card.

The way Mega AGS works with SAM is that the file ags_boot in the shared folder is updated every time a new game gets launched. This is how SAM communicates with Mega AGS. Also a file called ags_current will be updated with the currently played game. By mounting the shared folder to /tmp ( which is a ramdrive) we avoid any extra writes to SD when those files get updated.

I'm glad you're bringing this up and we should really limit the mounting behavior to just those files. Personally I have never used the shared folder for anything besides the required files for MegaAGS so I haven't run into any issues with the current implementation but I appreciate any bug reporting to make SAM better for everyone else.

The other error you describe with the 2600 core is a bug yes. SAM will default to another core if there are path issues with the only core you have active. I have to admit this is a low priority fix for me at this point since SAM will still put some games on screen but if you have an idea on how to fix this I welcome any input or GH PR.

User avatar
ericgus09
Posts: 206
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by ericgus09 »

mrchrister wrote: Mon Mar 27, 2023 5:44 am

The reason for this behavior is that our main objective with SAM is to limit any unnecessary writes to the SD card.

The way Mega AGS works with SAM is that the file ags_boot in the shared folder is updated every time a new game gets launched. This is how SAM communicates with Mega AGS. Also a file called ags_current will be updated with the currently played game. By mounting the shared folder to /tmp ( which is a ramdrive) we avoid any extra writes to SD when those files get updated.

I'm glad you're bringing this up and we should really limit the mounting behavior to just those files. Personally I have never used the shared folder for anything besides the required files for MegaAGS so I haven't run into any issues with the current implementation but I appreciate any bug reporting to make SAM better for everyone else.

The other error you describe with the 2600 core is a bug yes. SAM will default to another core if there are path issues with the only core you have active. I have to admit this is a low priority fix for me at this point since SAM will still put some games on screen but if you have an idea on how to fix this I welcome any input or GH PR.

I can appreciate the write limiting, Share is used for swapping stuff in and out of the amiga .. I use the SHARED folder to transfer stuff between my various profiles and HDFs, hold all my MOD files (so I dont have to copy the same set of MODS into each and every HDF/profile) etc. .. so it can and typically does have a lot of cruft in it .. maybe to work around it restrict it to a sub directory in shared? idl ./games/amiga/shared/SAM ? .. if that would work at least it would restrict and limit what gets potentially copied into /tmp .. but I can understand your basic idea for that design now that you explained it..

the arcade core thing, document it as a "default" behavior .. ;) sometimes "happy accidents" occur.. :D

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

If it's not a bug it's a feature, hey? ;)

Regarding Amiga shared folder, it's no easy fix unfortunately...
We can't change the current implementation which I will get into in a second, but basically we have to choose:

  1. Either limit write cycles to SD by mounting the whole shared folder. This means making sure the shared folder stays relatively empty.
    or
  2. Allow MegaAGS to constantly update ags_current and ags_boot files which might not be good for the SD in the long term. (According to optiroc from MegaAGS those writes to SD shouldn't matter since it's not a lot of information that's being written. He was not concerned about it when we discussed how SAM and AGS can work together a while back)

The problem is MegaAGS will delete ags_current and ags_boot after every execution so SAM won't be able to permanently mount these files to /tmp. A subdir like /shared/SAM is a good idea in general but this means the MegaAGS team needs to update their implementation and all users on older images will need to migrate to a newer AGS image.

As a compromise, I will implement a check of the shared folder. If it's over 30MB, SAM will not mount the shared folder to /tmp and writes to SD will occur. I'll put a warning message into SAM's output.

Update: I think I found a better solution. The shared folder will still be mounted to /tmp but if the content is bigger than 30MB, files won't be copied to /tmp. A warning message tells the user that items in shared won't be accessible while SAM is running. Please update SAM and let me know if that works.

User avatar
ericgus09
Posts: 206
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by ericgus09 »

mrchrister wrote: Thu Mar 30, 2023 5:51 pm

Please update SAM and let me know if that works.

Ill be away for the weekend but I will try it when I get back

Thanks for taking a look at the problem .. as you say it might take a few approaches and multiple changes in various points to get it right, I do like the idea of checking and limiting the size .. thats a good one, when my /tmp filled it did weird things to the mister.. so prob not a good idea to allow that to happen as a general rule.

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Yup, 100%
Thanks for bringing it to my attention!

pbsk8
Posts: 257
Joined: Mon Dec 28, 2020 4:23 pm
Has thanked: 67 times
Been thanked: 32 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by pbsk8 »

I have arcade, neogeo, gba and snes selected to change between attract mode but only arcade and gba games appear

is something missing? SAM is updated to latest version already.

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Can you ssh into the system and check SAM monitor and see if it throws any errors at you? You can also select a single core through the menu. If you select Snes, what happens?

pbsk8
Posts: 257
Joined: Mon Dec 28, 2020 4:23 pm
Has thanked: 67 times
Been thanked: 32 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by pbsk8 »

mrchrister wrote: Thu Jun 01, 2023 5:41 am

Can you ssh into the system and check SAM monitor and see if it throws any errors at you? You can also select a single core through the menu. If you select Snes, what happens?

another bug I found, if selected only snes, after 30min working fine then it starts showing GB games that I didnt select in core list.

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

I can't really help you without knowing your setup, sorry. I have SAM running every day and don't experience this issue so the bug might be a localized problem. Try resetting all game lists, that could be the cause for it.

pbsk8
Posts: 257
Joined: Mon Dec 28, 2020 4:23 pm
Has thanked: 67 times
Been thanked: 32 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by pbsk8 »

mrchrister wrote: Fri Jun 02, 2023 2:19 pm

I can't really help you without knowing your setup, sorry. I have SAM running every day and don't experience this issue so the bug might be a localized problem. Try resetting all game lists, that could be the cause for it.

what you mean setup? I guess we all have the same mister kit no?

I have reset it several times and still happening.

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

With setup I mean the way your game collection is set up. While we all use the same basic config (if you run update_all at least regularly), the game collections can differ widely. I recommend everdrive packs to use with SAM.

Things to help you fix the problem:

  1. Make sure you have updated SAM with SAM's updater
  2. Enable debug under Settings -> Advanced Settings
  3. Reboot system
  4. Start SAM with monitor from SSH (Number 2 in the menu) and post output

Update: I just added a log file function. If you don't use SSH, you can now enable a samdebuglog file (stored at /tmp/samdebug.log) under Settings -> Advanced Settings and post the file here.

User avatar
LamerDeluxe
Top Contributor
Posts: 1159
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 788 times
Been thanked: 257 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by LamerDeluxe »

Would it be possible at all to make long filenames scroll at a higher rate on the TTY2OLED? I've asked Venice if it would be possible to have a wrap-around scrolling function built-into TTY2OLED but that doesn't seem to be a simple thing to add.

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Yes, I was able to speed it up! I set the default speed to faster since I like it better as well. After updating you can set your speed in the ini

User avatar
LamerDeluxe
Top Contributor
Posts: 1159
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 788 times
Been thanked: 257 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by LamerDeluxe »

mrchrister wrote: Mon Jun 05, 2023 6:33 pm

Yes, I was able to speed it up! I set the default speed to faster since I like it better as well. After updating you can set your speed in the ini

Awesome, thank you! Looking forward to trying it out.

EDIT: Just tested it, double the speed, that is a very nice improvement. Sometimes it pauses though, even for a couple of seconds, I guess that is because of other tasks that MiSTer is handling?

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Yes, the frequency of data being sent to the display is not something the display can always handle. I'll set the default back to normal since i noticed this as well.

User avatar
mrchrister
Posts: 230
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 16 times
Been thanked: 78 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by mrchrister »

Hey guys,

After a lot of work and testing, wizzo and I came up with a new feature for Super Attract Mode:

Video Playback on MiSTer.

You can use predefined lists with video game commercials (or anything you want) from Archive.org or Youtube.
MiSTer_SAM.ini offers some further customization options.

Please take it for a spin and let me know if it works for you.

Screenshot-33.png
Screenshot-33.png (56.22 KiB) Viewed 3133 times
Screenshot-34.png
Screenshot-34.png (57.36 KiB) Viewed 3133 times
Screenshot-36.png
Screenshot-36.png (101.65 KiB) Viewed 3133 times
rhester72
Top Contributor
Posts: 1101
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: MiSTer Super Attract Mode (SAM) is now available - the first game screensaver for your MiSTer!

Unread post by rhester72 »

This is AWESOME!

Any way to have it respect mute settings?

Post Reply