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

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Oh sorry, I only implemented mute settings for bgm.. Easy fix. It should respect mute after you update.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

Thank you - confirmed!

One other interesting quirk...if you have ttyoled showing the game timer (i.e. "Next game in XXX" countdown), it still shows (though wrongly, of course) with video playing...if it's possible to suppress that line only when doing video playback, it would be a bit cleaner.

LOVING this!!!

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

Another anomaly...in MiSTer_SAM.ini, there's a default line that reads thusly:

Code: Select all

samvideo_path="/media/fat/video"

However, /media/fat/video does not exist (and is never created). Instead, it appears to be using the (script-created) path /media/fat/Scripts/.MiSTer_SAM/video.

This doesn't seem to cause any ill effects, but wanted to report it as I'm assuming this is not intended behavior.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

One more :)

archive.org use seems broken. When enabled, I see this in the log:

Code: Select all

Preloading snes_sgng.avi from archive.org for smooth playback
Invalid dot style specification '2'; leaving unchanged.
/tmp/SAMvideo.avi: Scheme missing.
--2023-06-14 22:39:07--  http://ia902700.us.archive.org/3/items/640x480_videogame_commercials/snes_sgng.avi
Resolving ia902700.us.archive.org... 207.241.228.200
Connecting to ia902700.us.archive.org|207.241.228.200|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://ia802708.us.archive.org/25/items/640x480_videogame_commercials/snes_sgng.avi [following]
--2023-06-14 22:39:07--  http://ia802708.us.archive.org/25/items/640x480_videogame_commercials/snes_sgng.avi
Resolving ia802708.us.archive.org... 207.241.228.248
Connecting to ia802708.us.archive.org|207.241.228.248|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7160614 (6.8M) [video/x-msvideo]
Saving to: 'snes_sgng.avi'

 0K .......... .......... .......... .......... ..........  0%  300K 23s
50K .......... .......... .......... .......... ..........  1%  599K 17s
...

2023-06-14 22:39:19 (581 KB/s) - 'snes_sgng.avi' saved [7160614/7160614]

FINISHED --2023-06-14 22:39:19--
Total wall clock time: 13s
Downloaded: 1 files, 6.8M in 12s (581 KB/s)
No video was downloaded. Skipping video playback..

Curiously, the avis are being stored...in /media/fat/Scripts, which is where I manually launched MiSTer_SAM_on.sh from, so I think the issue is that the download directory isn't being honored at all for archive.org and instead gets dumped wherever the current directory happens to be (and thus cannot be found where they are supposed to be).

Well...just tested the theory, and for archive.org, it definitely is downloading to whatever directory was current when MiSTer_SAM_on.sh was launched from (I tried launching from /media/fat/Scripts/.MiSTer_SAM/video, and that's exactly where the next avi went)...but that's not where it's looking for the video. After several attempts, I can't work out where it is looking for it, because it isn't looking in /media/fat/video or /tmp either.

Youtube works as expected.

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Thanks for reporting these bugs. Both issues should be fixed now, hope it works!

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

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

Unread post by LamerDeluxe »

I tested the video update. I have my MiSTer connected to an iPad display now. At 2048 x 1536, it shows the MiSTer main menu while only the audio of the video plays. If I run in 1920 x 1080, I get no signal on my display while a video is playing. Tested both with archive.org and YouTube.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

A suggestion - some of the videos (particularly Youtube) can go on for a LONG LONG LONG time (as they aren't actually ads in some cases).

It might be worth considering limiting playback to the TIMEOUT number of seconds (the same as games are shown for, perhaps?), which I think the player being used can accomplish.

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

@lamer
That probably means the iPad can't handle 640x480 resolution unfortunately and there is nothing that can be done to make it work. Maybe try connecting to another display to see if this would make it work?

@rhester
The YouTube list is not really trimmed down yet. It's just a random list with commercials i found. I definitely plan to curate it more, but would also appreciate a PR with suggestions. My main focus is on archive. I have found some high quality versions of old video game commercials and I'm uploading them in 2 resolutions for CRT and modern displays

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

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

Unread post by LamerDeluxe »

mrchrister wrote: Thu Jun 15, 2023 2:16 pm

@lamer
That probably means the iPad can't handle 640x480 resolution unfortunately and there is nothing that can be done to make it work. Maybe try connecting to another display to see if this would make it work

Ah, I missed the part about it being 640x480, it indeed can't handle that resolution.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

Last unreported issue I'm aware of - if you set it to "only" (vs. "core" or "alternate"), the very first video will not play.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

mrchrister wrote: Thu Jun 15, 2023 2:16 pm

The YouTube list is not really trimmed down yet. It's just a random list with commercials i found. I definitely plan to curate it more, but would also appreciate a PR with suggestions. My main focus is on archive. I have found some high quality versions of old video game commercials and I'm uploading them in 2 resolutions for CRT and modern displays

I had no idea it was curated, my apologies - I thought it was just returning random results of some sort of keyword query or entries from a specific channel focusing on retrogaming commercials.

I'll try to start watching in sequence to see what 'feels' wrong (most easily determined by length, I think - if it's longer than 60 seconds, that's probably not a candidate).

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

One other very small nit, that I suspect is just "how it is"...when the media player is actually playing the video, there's a flashing black block near the upper-left of the screen that always seems to be present (at least on HDMI). I assume this is 'normal' and can't be avoided due to the fact that we don't really have a dedicated screenbuffer?

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Yes the blinking cursor problem!
You can get rid of it by logging in to the terminal yourself (push f9 in the main menu)
And then type setterm -cursor off
You can also type chvt 2 to get a blank screen

Unfortunately we don't have a way to automate this yet.

If you would go through the YouTube links and help curate them, that would be much appreciated!

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

Possible very old bug - I have the 'screen saver' (flying toasters, specifically) function in tty2oled enabled. tty2oled starts before MiSTer_SAM in my user-startup.

With MiSTer_SAM having run, once I exit it and start using a specific core for a while, the screen saver function of the OLED display never kicks in.

If I cold boot with MiSTer_SAM commented out in user-startup (so it doesn't run at all), the single-core screen saver works great...until I run MiSTer_SAM manually, and then it stops working again.

I'm not sure what's causing one to interfere with the other, but I can reproduce it (as above) rather consistently.

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Thanks for all your testing, rhester! That must be a very old bug indeed. Never used the screensaver function of tty2oled, that's probably why I never noticed the bug...

Some updates to the Video player:

  • tty2oled: Videos will now have a countdown timer.
  • tty2oled: Video will now display the title in tty2oled for archive and youtube
  • No more blinking cursor (thanks to wizzo)
  • Screen blanking before showing video (thanks to wizzo)
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

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

Unread post by LamerDeluxe »

My MiSTer suddenly didn't display a signal anymore after booting, this started around the time I updated MiSTer SAM. Then when SAM kicked in and a core loaded it would show an image.

I checked my mister.ini file and to my surprise the date showed that it had been recently altered. Now I have "video_mode=640,360,60" where I set the main video mode and everywhere else where I set a custom video mode per core.

I'm pretty unhappy with this. Could it have been the SAM script that edited this in?

EDIT: Looking at MiSTer_SAM_on.sh, I see that it was SAM that altered the mister.ini file. It mentions it should be restored when SAM quits. I guess that means manually stopping SAM.

However, this system is not a good idea for users that have a display that can't handle this resolution. In that case, the main MiSTer menu doesn't show up anymore after starting MiSTer, even when you have the SAM video option turned off. Also, it changes all the video modes that have been specified for certain cores, which is not a good idea.

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Hey Lamer,
Very sorry about the trouble this has caused you! When you launch SAM from command line, it actually displays a warning message that it has to set menu resolution in the ini for Samvideo to work. I actually pushed new code on how to handle mister.ini yesterday since I've experienced the same bug as well where it modified video_mode outside of the menu section. This was of course not intended behavior.

SAM doesn't reset the MiSTer.ini settings if you reboot while Sam is running. That's probably the reason you got stuck with those settings and I apologize for this!
Please check if /media/fat/Mister.ini.sam still has your settings.

Mister.ini changes are really something I want to avoid at all cost since it also introduces writes to SD but unfortunately it is the only way to make Samvideo work. I could reset the ini after every video but that would introduce even more writes. It would lessen the chance of being stuck with settings that dont work though..

Wizzo has been chatting with sorg to see if there is any other way we can change the framebuffer video mode without having to modify the ini.

As you can tell, it's been very much on my mind to find a better solution for this. I will put a warning in MiSTer_SAM.ini about changing MiSTer.ini.

Please know: Mister.ini does not get touched if Samvideo is disabled.

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

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

Unread post by LamerDeluxe »

mrchrister wrote: Sun Jun 18, 2023 2:37 pm

Hey Lamer,
Very sorry about the trouble this has caused you! When you launch SAM from command line, it actually displays a warning message that it has to set menu resolution in the ini for Samvideo to work. I actually pushed new code on how to handle mister.ini yesterday since I've experienced the same bug as well where it modified video_mode outside of the menu section. This was of course not intended behavior.

SAM doesn't reset the MiSTer.ini settings if you reboot while Sam is running. That's probably the reason you got stuck with those settings and I apologize for this!
Please check if /media/fat/Mister.ini.sam still has your settings.

Mister.ini changes are really something I want to avoid at all cost since it also introduces writes to SD but unfortunately it is the only way to make Samvideo work. I could reset the ini after every video but that would introduce even more writes. It would lessen the chance of being stuck with settings that dont work though..

Wizzo has been chatting with sorg to see if there is any other way we can change the framebuffer video mode without having to modify the ini.

As you can tell, it's been very much on my mind to find a better solution for this. I will put a warning in MiSTer_SAM.ini about changing MiSTer.ini.

Please know: Mister.ini does not get touched if Samvideo is disabled.

Thanks for the detailed explanation and the quick update! I hope a better solution can indeed be found, as I don't expect scripts to alter mister.ini and the video option is a cool addition. Maybe it can be made to run on the iPad display as well at some point, IIRC it handles 800 x 600 pixel resolution and up.

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Latest updates:

  • Fixed issues with amiga core.
  • Menu has slightly changed. There is an easy way now to configure SAM to your liking through "Presets and Game Modes". Right now there are only 2 modes though. Maybe someone has an idea what else to add.
  • SAMVIDEO: MiSTer.ini resolution for menu core will now be set to 1920x1080 which should hopefully make videos play on all devices.
  • SAMVIDEO: A mode has been added. Find it in "Presets and Game Modes" in the menu or in MiSTer_SAM.ini:

Play a TV commercial of eg NES and than show a NES game:
samvideo_tvc="yes"

This only works when you set source to archive.org. If you use the "Presets and Game Modes" menu, all settings will be adjusted automatically.

Screen-Shot-2023-06-19-at-11-55-56-PM.png
Screen-Shot-2023-06-19-at-11-55-56-PM.png (33.75 KiB) Viewed 13138 times
chanunnaki
Posts: 105
Joined: Tue Jul 07, 2020 1:33 am
Been thanked: 19 times

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

Unread post by chanunnaki »

When you push start to play the game, is it supposed to jump straight into the game or does it reload the game from scratch?

For me, it seems to reboot the MiSTer into the game instead of just letting you take over.

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

It depends if you have mute set. It reboots into the game to unmute since you can't do that on the fly with MiSTer. If mute=no then it should let you take over.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

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

Unread post by rhester72 »

The "play commercials for the same system you're going to demo" feature seems to ignore excluded cores - for example, I have all portable systems disabled, yet it played a GameBoy commercial and then spent a LOT of time just sitting there as it couldn't load the core. Not sure if it's possible to parse the enabled cores list and exclude commercials that don't apply.

UScr00ge
Posts: 18
Joined: Wed Jul 08, 2020 1:01 am
Location: USA
Has thanked: 3 times
Been thanked: 4 times

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

Unread post by UScr00ge »

I love the new sam video support for playing commercials, such a cool idea!

I am having one issue though ... I use MiSTer on a PC CRT, and every time I've walked by my MiSTer and caught it playing an archive.org video, there are black bars on the top and bottom making it look letterboxed, which cut off the top and bottom of all the commercials because they're all 4:3. Is this the correct setting for a PC CRT?

Code: Select all

samvideo.crtmode640 "video_mode=320,-16,32,32,240,1,3,13,5670"
User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Hey scrooge,

Glad you're liking it. Unfortunately I don't have a PC CRT to test, but you probably don't want to use CRT mode in this case. Try HDMI setting since this should display the video in standard 640x480

@rhester

Appreciate the feedback. I must admit it was playing those cores by design since I love the old GB commercials and that's what got me into gaming. I don't have handhelds enabled either and it makes sense to check it against the core list. Currently my Mister is creating new blacklists for MegaCD and TGFX16CD now that they are released on archive.org. Once this is done, I'll check the commercials against the enabled core list.

UScr00ge
Posts: 18
Joined: Wed Jul 08, 2020 1:01 am
Location: USA
Has thanked: 3 times
Been thanked: 4 times

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

Unread post by UScr00ge »

Thanks for the tip mrchrister ... I set it to HDMI but the videos are still cutting off at the bottom and there are letterboxes on the side. Should I comment out sv_custom_vmode="" and set it to a specific setting for HDMI mode when running a PC VGA CRT, like 800x600 or 640x480?

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

I took out sv_custom_vmode since it doesn't seem to have any effect on the display. I added sv_aspectfix_vmode though, which should hopefully help (still set it to HDMI please).
Sorry I can't test it myself, please let me know.

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

If you set samvideo="yes" and samvideo_tvc="yes" in MiSTer_SAM.ini and then update SAM, your MiSTer will show a commercial (currently SNES, Genesis and Megacd) and then show the game that was advertised after the commercial.

UScr00ge
Posts: 18
Joined: Wed Jul 08, 2020 1:01 am
Location: USA
Has thanked: 3 times
Been thanked: 4 times

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

Unread post by UScr00ge »

I tried sv_aspectfix_vmode = Yes and am still getting the weird aspect ratio on some, but oddly not all, archive.org videos. I'm wondering if some of the videos in the playlist are in a resolution that displays correctly?

I was able to catch it in the act today and recorded a video. See below: https://imgur.com/a/TWJjDO4

User avatar
mrchrister
Scripting Wizard
Posts: 295
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 32 times
Been thanked: 122 times

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

Unread post by mrchrister »

Sorry I don't have a PC CRT to check. Just making sure, did you update and reboot MiSTer after applying the setting?

UScr00ge
Posts: 18
Joined: Wed Jul 08, 2020 1:01 am
Location: USA
Has thanked: 3 times
Been thanked: 4 times

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

Unread post by UScr00ge »

mrchrister wrote: Wed Jul 19, 2023 6:21 pm

Sorry I don't have a PC CRT to check. Just making sure, did you update and reboot MiSTer after applying the setting?

I did yes. I also completely blew away SAM and reinstalled it using a fresh ini file.

Does the video player use the [menu] settings in the MiSTer.ini? If so would it help if posted that?

Post Reply