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

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
muggsy
Posts: 7
Joined: Tue May 26, 2020 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

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

Unread post by muggsy »

mrchrister wrote: Tue Aug 20, 2024 2:20 pm
muggsy wrote: Mon Aug 19, 2024 10:42 am

Quick question. Only just tried out SAM tonight to try out the commerical video playback. Having a few issues with enabling local playback. Ive download some of the videos from the archive.org repository and when I set the video source samvideo_source="local" and copied the files to /media/fat/video I get nothing. When i run the on script and enable ssh output, i can see an error repeating "error while downloading"

When i dig a bit deeper i found an local video list in /tmp/.SAM_List/ which contains the videos I downloaded.

Setting the location to archive works, but I'd rather not keep downloading the files.

Has anyone successfully gotten local playback to work and can offer some assistance?

Local download is on my to do list. I'll see if I can implement this when I have some time.

Oh wow, I didn't realise it hadn't been implemented fully yet. No hurry at all as I just thought I was doing something wrong :)
If you need anyone to test I'm more than happy to help :)

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

Thanks for the offer, pushed some code just now that should make local playback work again. Right now it only plays random videos, next step would be to make it work like the archive downloader function

Update: There is a new option in the ini called keep_local_copy. Set this to yes so that each commercial will only be downloaded once.
SAM will now check if the commercial is available locally before trying to download it from archive.
Please keep samvideo_source="archive".
samvideo_source="local" is meant for random files that are not commercials

muggsy
Posts: 7
Joined: Tue May 26, 2020 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

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

Unread post by muggsy »

Awesome, I will check it out later tonight when I'm home.
Ultimately (for me at least) is I would like it to play random videos from my NFS share as a screensaver and a way to provide some ambience to my games room. At some point I must have procured a ton of old commercials in varying formats that I would like to use in this setup. Sounds like I'll need to do a mass conversions to XviD though as they are in quicktime, wmv, mp4 etc :)

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

Oh yeah that should be no problem with local playback working again correctly. It just wouldn't play those games that correspond to the commercials. For that I would need to put these commercials into a XML. Feel free to contribute some commercials missing from the library!

User avatar
neogeo81
Top Contributor
Posts: 460
Joined: Fri Apr 16, 2021 1:52 pm
Has thanked: 34 times
Been thanked: 48 times

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

Unread post by neogeo81 »

mrchrister wrote: Tue Aug 20, 2024 2:18 pm
neogeo81 wrote: Tue Aug 20, 2024 9:14 am

i have no playback at all. set the menu to 640x480 and to download from archive. but on the screen nothing happens. i only see the description of the commercial video on the tty2oled but no playback. It just stays on the wallpaper image.

Have you tried changing this value?

I didn't, no. But i gave it up on SAM again because it doesn't work properly unfortunately. When i start it the tty2oled stays black and the game does not start. It even sometimes hangs up the Mister completely and i have to manually restart it or turn it off completely.

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

neogeo81 wrote: Wed Aug 21, 2024 6:28 am
mrchrister wrote: Tue Aug 20, 2024 2:18 pm
neogeo81 wrote: Tue Aug 20, 2024 9:14 am

i have no playback at all. set the menu to 640x480 and to download from archive. but on the screen nothing happens. i only see the description of the commercial video on the tty2oled but no playback. It just stays on the wallpaper image.

Have you tried changing this value?

I didn't, no. But i gave it up on SAM again because it doesn't work properly unfortunately. When i start it the tty2oled stays black and the game does not start. It even sometimes hangs up the Mister completely and i have to manually restart it or turn it off completely.

Every setup is different and with things like video playback unfortunately it's a bit of a hack to get it working, so your mileage may vary. I have two testing setups, one connected to a CRT and the other to a small HDMI screen. It's working well on both setups but that's all the testing I can do before pushing updates.

User avatar
neogeo81
Top Contributor
Posts: 460
Joined: Fri Apr 16, 2021 1:52 pm
Has thanked: 34 times
Been thanked: 48 times

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

Unread post by neogeo81 »

mrchrister wrote: Wed Aug 21, 2024 6:54 pm
neogeo81 wrote: Wed Aug 21, 2024 6:28 am
mrchrister wrote: Tue Aug 20, 2024 2:18 pm

Have you tried changing this value?

I didn't, no. But i gave it up on SAM again because it doesn't work properly unfortunately. When i start it the tty2oled stays black and the game does not start. It even sometimes hangs up the Mister completely and i have to manually restart it or turn it off completely.

Every setup is different and with things like video playback unfortunately it's a bit of a hack to get it working, so your mileage may vary. I have two testing setups, one connected to a CRT and the other to a small HDMI screen. It's working well on both setups but that's all the testing I can do before pushing updates.

i really like your script and really would like to use it but the inconsistensy is a deal breaker for me. maybe when i have more time to figure out what i am doing wrong i will give it a shot again.

muggsy
Posts: 7
Joined: Tue May 26, 2020 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

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

Unread post by muggsy »

mrchrister wrote: Wed Aug 21, 2024 1:58 am

Oh yeah that should be no problem with local playback working again correctly. It just wouldn't play those games that correspond to the commercials. For that I would need to put these commercials into a XML. Feel free to contribute some commercials missing from the library!

Ive only just started looking into this. Updating SAM, setting keep videos and setting local allows me to play my video files which is awesome.

Im working through the various commericals i have, converting to the required format and once ive done that ill look into the xml code required to alow them to play in the manner SAM is intended for.. awesome work!

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

Sounds great. For batch conversion I created a tool you can find in the tools folder of the same GitHub. One for CRT and one for HDMI:
https://github.com/mrchrisster/MiSTer_S ... as/xvid.sh

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

  • Added amigacd32 and neogeocd to SAM
rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

/media/fat/Scripts# ./MiSTer_SAM_on.sh neogeocd
SNK NeoGeo CD selected!
Stopping other running instances of MiSTer_SAM_on.sh...
Starting tty2oled... Done.
Starting SAM in the background.


EDITS:

resulted in cycling through Sega CD / Mega CD games on the first try, then NGCD the next. =)
^^^ Natural behavior depending on when you catch SAM in the cycle. Doing it again works as expected.

On subsequent tries with amigacd32, I got NES, then Atari 2600 LOL
^^^ User error - placed CD32 images in the wrong folder, essentially leaving SAM with no gamelist and nowhere to run

The subsequent post/question about NGCD BIOS bypass remains.

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

A couple more:

  • Is it reasonable to assume that the NGCD support doesn't yet automatically hit Start to proceed past the track selection screen?
  • amigacd32 doesn't mute with per-core muting
User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

rhester72 wrote: Wed Jan 22, 2025 10:00 pm

/media/fat/Scripts# ./MiSTer_SAM_on.sh neogeocd
SNK NeoGeo CD selected!
Stopping other running instances of MiSTer_SAM_on.sh...
Starting tty2oled... Done.
Starting SAM in the background.


EDITS:

resulted in cycling through Sega CD / Mega CD games on the first try, then NGCD the next. =)
^^^ Natural behavior depending on when you catch SAM in the cycle. Doing it again works as expected.

On subsequent tries with amigacd32, I got NES, then Atari 2600 LOL
^^^ User error - placed CD32 images in the wrong folder, essentially leaving SAM with no gamelist and nowhere to run

The subsequent post/question about NGCD BIOS bypass remains.

Thanks for testing! SAM automatically selects other systems if there are problems with one. I'm glad you got it working correctly!

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

rhester72 wrote: Wed Jan 22, 2025 10:12 pm

A couple more:

  • Is it reasonable to assume that the NGCD support doesn't yet automatically hit Start to proceed past the track selection screen?
  • amigacd32 doesn't mute with per-core muting

I didn't know NGCD had a non boot BIOS. I believe I got mine through update all, It's Universe Bios 3.3 by razoola.
Fixed the amigacd32 mute problem.

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

mrchrister wrote: Thu Jan 23, 2025 5:22 pm

I didn't know NGCD had a non boot BIOS. I believe I got mine through update all, It's Universe Bios 3.3 by razoola.

Yeah, it's not unlike TGFX16-CD. Personally not a fan of the Universe BIOS, I'm stock top-loader (as in real life ;).

I tried to work out how you're automatically pressing Start in other cores for this but got lost lol

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

On line 365 you have the CORE_SKIP array.
Just change neogeocd to Yes.
Then you need to map your keyboard to the neogeo core. Only map start to button "n" and skip everything else. Then rename the keyboard you just mapped to /media/fat/config/input/neogeo_1234_5678_v3.map

If this works, I'd be happy to make it default behavior in SAM

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

Will do so and report back.

I did finally figure out how you're using mbc raw_seq to do it (and it looks like a timeout of 10 seconds may not be enough, will see), but slightly confused...isn't 0x31 KEY_S instead of KEY_N? (i.e. raw_seq uses hex, not decimal, right?)

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

Sorry i think you have to map Key B, not Key N.

Code: Select all

 mbc raw_seq :30

translates to 48 in decimal. https://github.com/torvalds/linux/blob/ ... des.h#L123

Update: confused myself there. ":30" is button b and is for amigacd32. ":31" is key_n (49) so you have to map start to "n"

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

Right. MiSTer_SAM_on.sh has this:

Code: Select all

MiSTer_SAM_on.sh:		"${mrsampath}/mbc" raw_seq :31

which per here:

https://github.com/pocomane/MiSTer_Batc ... me-ov-file

is in hex:

Code: Select all

:XX - press and release of the key with the hex code XX

and thus per here:

https://github.com/torvalds/linux/blob/ ... nt-codes.h

should be this:

Code: Select all

#define KEY_S			31

right?

EDIT: Nope, not right. The kernel chart is in decimal, and decimal 49 is indeed N.

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

All good, I wrote a little comment for skipmessage function to avoid future confusion ;)

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

I've set N to Start (and left everything else undefined), confirmed the correct filename (/media/fat/config/inputs/NEOGEO_input_1234_5678_v3.map), and tested the hell out of it. 10 seconds is just enough...it appears to trigger about 1.25s after it starts asking for START to be pressed. :)

[Correction - it's catching the second raw_seq call after the 1 second sleep! Actual time appears to be just under 11 seconds...but the second-chance attempt means the default skiptime of 10 seconds works, so I'll take it! :)]

Thanks much for the help!

Attachments
NEOGEO_input_1234_5678_v3.zip
(211 Bytes) Downloaded 69 times
User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

Great, thanks! The timing used to be 5s because that was enough on CRT and after a lot of testing we settled on 10s. Glad it's working!
I'll update SAM with your input map and will check if it causes any issues with the autoboot BIOS

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

mrchrister wrote: Thu Jan 23, 2025 7:51 pm

Great, thanks! The timing used to be 5s because that was enough on CRT and after a lot of testing we settled on 10s. Glad it's working!
I'll update SAM with your input map and will check if it causes any issues with the autoboot BIOS

I ran 100 trials in the worst-case scenario (UniBIOS with 4x CD speed) and the only change is that the auto-press of Start accelerates the boot process (it no longer needs to actually reach the track selection screen and then start the game, it starts loading the game right away). Seems good.

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

Weirdly...despite the code fix still being in place, amigacd32 is no longer muted.

EDIT: Thinking about it further, it's theoretically possible that during rapid testing I got "lucky" and didn't hit titles with immediate audio. I'm not sure it was ever actually fixed.

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

Thanks for reporting, should be fixed now!

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

I looked at git - a lot of good work going on there!

Unfortunately, still getting audio when muted only for amigacd32. LOL

Would it be helpful for me to place a CHD that plays audio right away somewhere you can get to it so you can see (well, hear :) it for yourself?

User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

Strange, I have amigacd32 running but no sound. Can you try and restart the MiSTer?

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

Power cycled after update to latest - no change.

Deleted Minimig_volume.cfg - no change.

Uncommented and not unset portions of MiSTer_SAM.ini (and mute="Core" is still a valid setting, right?):

Code: Select all

samtimeout=60
gametimer=180
menuonly="Yes"
playcurrentgame="No" 
corelist="amiga,amigacd32,ao486,arcade,atari2600,atari5200,atari7800,c64,genesis,megacd,n64,neogeo,neogeocd,nes,s32x,saturn,sms,snes,tgfx16,tgfx16cd,psx"
mute="Core"
bgm="No"
ttyenable="Yes"
dupe_mode="normal"
sam_goat_list="no"
roulettetimer="500"
m82="no"
m82_game_timer="180"
m82_muted="no"
kids_safe="no"
coreweight="No"
ignore_when_skip="no"
amigaselect="All"
skiptime="10"
arcadeorient="horizontal"
exclude=( readme unsupported bios )
samvideo="No"
samvideo_output="HDMI"
samvideo_displaywait="3"
download_manager="yes"
samvideo_path="/media/fat/video"
keep_local_copy="no"
samvideo_freq="alternate"
samvideo_source="archive"
samvideo_tvc="no"
sv_aspectfix_vmode="no"
sv_inimod="yes"
samvideo_crtmode640="video_mode=640,16,64,80,240,1,3,14,12380"
samvideo_crtmode320="video_mode=320,-16,32,32,240,1,3,13,5670"
sv_archive_hdmilist="https://archive.org/download/640x480_videogame_commercials/640x480_videogame_commercials_files.xml"
sv_archive_crtlist="https://archive.org/download/640x240_videogame_commercials/640x240_videogame_commercials_files.xml"
sv_youtube_hdmilist="/media/fat/Scripts/.MiSTer_SAM/sv_yt360_list.txt"
sv_youtube_crtlist="/media/fat/Scripts/.MiSTer_SAM/sv_yt240_list.txt"
bgmplay="Yes"
bgmstop="Yes"
gvoladjust="0"
norepeat="Yes"
disable_blacklist="No"
disablebootrom="Yes"
listenmouse="Yes"
listenkeyboard="Yes"
listenjoy="Yes"
ttysystemini="/media/fat/tty2oled/tty2oled-system.ini"
ttyuserini="/media/fat/tty2oled/tty2oled-user.ini"
ttycoresleep="10"
ttydisplayswitch="2"
ttybig="no"
ttyname_cleanup="yes"
ttyscroll_speed="normal"
samdebug="No"
samdebuglog="No"
branch="main"
User avatar
mrchrister
Scripting Wizard
Posts: 311
Joined: Tue Mar 30, 2021 6:23 pm
Location: Canada
Has thanked: 35 times
Been thanked: 127 times

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

Unread post by mrchrister »

If you don't use bgm, then set mute to yes please.

rhester72
Top Contributor
Posts: 1454
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 17 times
Been thanked: 245 times

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

Unread post by rhester72 »

I didn't do so because setting to global mute has resulted in the volume not being restored on exit enough times in the past to get annoying. :)

I have an idea on how to catch this thing in the act, will hopefully have more data (and a fix) soon.

Post Reply