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

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 49 times

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

Unread post by Mellified »

When your MiSTer is idle a game is loaded, then another every 2 minutes. Want to play? Pick up the controller and go! The MiSTer will wait to load a new game.

Download it here: https://github.com/mrchrisster/MiSTer_SAM#installation
thorr
Posts: 668
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 273 times
Been thanked: 131 times

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

Unread post by thorr »

Sounds cool! Looking forward to trying this out.
Fallon
Posts: 92
Joined: Mon May 25, 2020 1:48 am
Has thanked: 38 times
Been thanked: 17 times

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

Unread post by Fallon »

Tried it out - it doesn't seem to do anything. It ran some linux stuff and downloaded the ini files, apart from that, it didn't launch any games.


edit: seems to do something now! Forgot to edit the .ini settings.
hiddenbyleaves
Posts: 118
Joined: Mon Nov 02, 2020 11:25 am
Has thanked: 48 times
Been thanked: 19 times

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

Unread post by hiddenbyleaves »

The fact that you can jump in and play, and then walk off and it will go back to cycling through... is perfect!
User avatar
Aspie
Posts: 148
Joined: Sat Sep 26, 2020 1:07 pm
Location: Manchester
Has thanked: 16 times
Been thanked: 35 times
Contact:

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

Unread post by Aspie »

I started playing a game the script had chosen and then after a few minutes while playing the screen went black and it changed game. Is it supposed to do that?
FoxbatStargazer
Posts: 705
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 213 times
Been thanked: 155 times

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

Unread post by FoxbatStargazer »

Looking at the readme it probably is looking for USB inputs, not Blisster or SNAC. Would you be using one of those?
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 49 times

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

Unread post by Mellified »

Aspie wrote: Fri Apr 23, 2021 7:52 pm I started playing a game the script had chosen and then after a few minutes while playing the screen went black and it changed game. Is it supposed to do that?
SAM detects all keyboard key presses, mouse movement, mouse buttons, and controller buttons. Three potential issues come to mind:
  • If you connected a controller or keyboard after the script was started SAM won't pick up the new controller. This is on our TODO list to address.
  • I have a BlisSTer and controllers in USB mode are detected - but sometimes loading a core makes the Linux input devices for BlisSTer reset and fail to be detected. This only applies to controllers on the HDMI ports.
  • If you are using a core with SNAC or LLAPI those aren't visible in Linux, so we can't detect them. You should disable MiSTer SAM using the off script before playing in that case.
Please let me know a bit more about your setup and we can track it down.
keilmillerjr
Posts: 47
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

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

Unread post by keilmillerjr »

Features are spot on. Code has good conventions. Great job!
User avatar
Aspie
Posts: 148
Joined: Sat Sep 26, 2020 1:07 pm
Location: Manchester
Has thanked: 16 times
Been thanked: 35 times
Contact:

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

Unread post by Aspie »

I am using an X-Arcade joystick. The game the script selected was Rescue. I then loaded the Rescue game myself with the core menu and after a few minutes the screen went black again and chose another game. I guess the script was still running.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 49 times

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

Unread post by Mellified »

Aspie wrote: Fri Apr 23, 2021 11:07 pm I am using an X-Arcade joystick. The game the script selected was Rescue. I then loaded the Rescue game myself with the core menu and after a few minutes the screen went black again and chose another game. I guess the script was still running.
Sounds like it. Do you know which mode you're running your X-Arcade in? It has X-Input, D-Input, and keyboard modes. It should be detected in any mode, but it might help me troubleshoot this.

I have one as well, so I'll do some testing.
User avatar
Aspie
Posts: 148
Joined: Sat Sep 26, 2020 1:07 pm
Location: Manchester
Has thanked: 16 times
Been thanked: 35 times
Contact:

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

Unread post by Aspie »

I always have the X-Arcade in mode 4, Xinput. But when I play Rescue I have to switch to mode 1, Keyboard so that I can use the second joystick.
User avatar
redsteakraw
Posts: 198
Joined: Sun May 24, 2020 11:19 pm
Been thanked: 29 times

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

Unread post by redsteakraw »

My recommendations for people trying this is to create a favorites folder for each system, put your favorite game roms in it and set the Attract mode to use the favorites folder. You basically have your whitelist and it is easier to play you favorite games. I lowered the time for it to kick in but I might change that again. I have to say it is awesome. I just wish there was some way of suppressing the mister menu while it switches cores.
Fear is the mind killer!
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 49 times

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

Unread post by Mellified »

Aspie wrote: Sat Apr 24, 2021 10:42 am I always have the X-Arcade in mode 4, Xinput. But when I play Rescue I have to switch to mode 1, Keyboard so that I can use the second joystick.
I see. So thinking about this I know the issue. There are two options.

If you update - just run

Code: Select all

MiSTer_SAM_on.sh
again - the newest version only starts the idle counter on the main MiSTer menu. This will prevents an unwanted game switch while you're playing. This is configurable in the INI if you prefer the old behavior.

If you want SAM to detect activity from the X-Arcade in mode 1 (Keyboard) you'll have to do the following:
1. Connect the X-Arcade and switch to mode 1
2. Cold reboot the MiSTer.
3. Start the game.

This is because SAM only detects keyboards on startup. Hotplugging controllers was added late last night. Adding this for keyboards is on our list of TODOs.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 49 times

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

Unread post by Mellified »

redsteakraw wrote: Sat Apr 24, 2021 5:31 pm My recommendations for people trying this is to create a favorites folder for each system, put your favorite game roms in it and set the Attract mode to use the favorites folder. You basically have your whitelist and it is easier to play you favorite games. I lowered the time for it to kick in but I might change that again.
There's a lot of wisdom in this approach. I'm surprised how many ROMs don't actually load. As part of testing I'll have SAM cycle very quickly through games. When one doesn't load I'll try it from the core after a cold reboot. Almost always the ROM still doesn't load. We are planning to include a list of ROMs we know don't load to cut down on this.

One thing you lose staying with your favorites, though, is the discovery of new games you've never played.
redsteakraw wrote: Sat Apr 24, 2021 5:31 pm I have to say it is awesome. I just wish there was some way of suppressing the mister menu while it switches cores. I just wish there was some way of suppressing the mister menu while it switches cores.
Unfortunately that's out of our hands. We use a 3rd party project - mbc by pocomane - to load roms into cores. The MiSTer doesn't have a standard programmatic way to do this. That means SAM is - very quickly! - using the menu to load the next game for you.
User avatar
LamerDeluxe
Posts: 747
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 455 times
Been thanked: 143 times

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

Unread post by LamerDeluxe »

Doesn't seem to work here for some reason. The previous scripts all did.
It initialized things and then tells me to press enter. Isn't is supposed to work without a keyboard as well?
If I press a button on my controller instead it just returns to the main MiSTer menu and does nothing.
Shuffle7
Posts: 89
Joined: Sun Jan 17, 2021 5:43 pm
Has thanked: 90 times
Been thanked: 9 times

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

Unread post by Shuffle7 »

I’m not having any luck either .
I can’t see a .ini file for SAM anywhere , any ideas ?
User avatar
redsteakraw
Posts: 198
Joined: Sun May 24, 2020 11:19 pm
Been thanked: 29 times

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

Unread post by redsteakraw »

Mellified wrote: Sat Apr 24, 2021 6:07 pm Unfortunately that's out of our hands. We use a 3rd party project - mbc by pocomane - to load roms into cores. The MiSTer doesn't have a standard programmatic way to do this. That means SAM is - very quickly! - using the menu to load the next game for you.
Maybe we can get a menu shortcut that doesn't display the interface but operates the same way just not rendered. I guess MiSTer Menu would have to support that.
Fear is the mind killer!
Lightwave
Posts: 106
Joined: Sun May 24, 2020 10:06 pm
Has thanked: 41 times
Been thanked: 25 times

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

Unread post by Lightwave »

Shuffle7 wrote: Sat Apr 24, 2021 8:31 pm I can’t see a .ini file for SAM anywhere , any ideas ?
Download it from the github page for the script.
Shuffle7
Posts: 89
Joined: Sun Jan 17, 2021 5:43 pm
Has thanked: 90 times
Been thanked: 9 times

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

Unread post by Shuffle7 »

I’ve done that do I need to change settings anywhere. All
I see on mister menu is mister _sam
With its joy and keyboard , and off setting etc . If I chloride the top Sam setting it boots into a random game bust doesn’t change and I have to that manually.
Stupid Dufus
Posts: 119
Joined: Sun Aug 30, 2020 12:04 am
Has thanked: 49 times
Been thanked: 34 times

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

Unread post by Stupid Dufus »

Great work. This is working much better for me than the previous iteration.

Would it be possible to have it keep a record of what games it's cycled though? My thinking is that if it did this, you could have the script cycle through all the user's titles before repeating them again.
User avatar
redsteakraw
Posts: 198
Joined: Sun May 24, 2020 11:19 pm
Been thanked: 29 times

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

Unread post by redsteakraw »

I noticed one thing, the interrupt doesn't seem to work with my Daemonbite 2p Genesis adapter. If I press a key on the keyboard it will stop cycling but not so for my joystick. Is there some extra setting I may have missed or is this a bug? Does it only look for keyboard shortcuts if a keyboard is detected?
Fear is the mind killer!
User avatar
LamerDeluxe
Posts: 747
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 455 times
Been thanked: 143 times

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

Unread post by LamerDeluxe »

Huh, I turn on my MiSTer and the SAM script is running already, I hadn't even turned on my controller, that is super odd.

And that while I couldn't get it to work.
EDIT: Works with the now script.
EDIT 2: But it doesn't change. Seems like either the timer doesn't work or it somehow gets killed, probably by my DS4. Could it be that it is always sending out data? Maybe from the gyro?
EDIT 3: If I try to start it with no game controller and only a keyboard it just repeats the same xxd: /dev/input/js0: No such file or directory error
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 49 times

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

Unread post by Mellified »

Shuffle7 wrote: Sat Apr 24, 2021 8:31 pm I can’t see a .ini file for SAM anywhere , any ideas ?
The INI file is automatically downloaded when you run the "MiSTer_SAM_on.sh" script.
LamerDeluxe wrote: Sun Apr 25, 2021 7:05 pm EDIT 3: If I try to start it with no game controller and only a keyboard it just repeats the same xxd: /dev/input/js0: No such file or directory error
redsteakraw wrote: Sun Apr 25, 2021 1:33 pm I noticed one thing, the interrupt doesn't seem to work with my Daemonbite 2p Genesis adapter. If I press a key on the keyboard it will stop cycling but not so for my joystick. Is there some extra setting I may have missed or is this a bug? Does it only look for keyboard shortcuts if a keyboard is detected?
We've been seeing issues with the detection of some controllers. Either they are always triggering or not at all. There's a new version posted tonight that should help.

Please delete your INI and run the "MiSTer_SAM_on.sh" script again. That will download all the newest files.

Note that once you run the "on" script SAM will look at the keyboard, mouse, and joystick / controllers on the system for activity. It does try to detect added or removed controllers, but isn't smart enough - yet - to detect new keyboard devices.

Once you have been idle on the main MiSTer menu for 2 minutes SAM will start. Note that there's a 60 second wait at startup, so it can be 3 minutes from a cold reboot.

If you are still having problems disable controller detection in the INI file and reboot. That may help if the controller is sending messages that make SAM think you are using the controller.
User avatar
Mellified
Posts: 145
Joined: Sat Aug 22, 2020 8:38 pm
Been thanked: 49 times

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

Unread post by Mellified »

Stupid Dufus wrote: Sun Apr 25, 2021 9:06 am Would it be possible to have it keep a record of what games it's cycled though? My thinking is that if it did this, you could have the script cycle through all the user's titles before repeating them again.
Interesting idea! We've noticed that SAM doesn't seem as random as we'd like. We're definitely considering how to address this. I'll add this to the list of ideas!
User avatar
limi
Posts: 314
Joined: Sun May 24, 2020 6:53 pm
Has thanked: 64 times
Been thanked: 152 times

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

Unread post by limi »

Yeah, you probably want “shuffle”, not “random” — there’s a reason all music players don’t use an actual random selection. 😄
keilmillerjr
Posts: 47
Joined: Wed Mar 24, 2021 12:52 pm
Has thanked: 3 times
Been thanked: 6 times

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

Unread post by keilmillerjr »

Mellified wrote: Mon Apr 26, 2021 3:26 am
Stupid Dufus wrote: Sun Apr 25, 2021 9:06 am Would it be possible to have it keep a record of what games it's cycled though? My thinking is that if it did this, you could have the script cycle through all the user's titles before repeating them again.
Interesting idea! We've noticed that SAM doesn't seem as random as we'd like. We're definitely considering how to address this. I'll add this to the list of ideas!
Try using $RANDOM and and select the game or core within the list instead of shuf. I can provide an example or a pr, but have no way of testing actual script on hardware.

https://github.com/mrchrisster/MiSTer_S ... AM.sh#L221
User avatar
redsteakraw
Posts: 198
Joined: Sun May 24, 2020 11:19 pm
Been thanked: 29 times

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

Unread post by redsteakraw »

Mellified wrote: Mon Apr 26, 2021 3:25 am Please delete your INI and run the "MiSTer_SAM_on.sh" script again. That will download all the newest files.

Note that once you run the "on" script SAM will look at the keyboard, mouse, and joystick / controllers on the system for activity. It does try to detect added or removed controllers, but isn't smart enough - yet - to detect new keyboard devices.

Once you have been idle on the main MiSTer menu for 2 minutes SAM will start. Note that there's a 60 second wait at startup, so it can be 3 minutes from a cold reboot.

If you are still having problems disable controller detection in the INI file and reboot. That may help if the controller is sending messages that make SAM think you are using the controller.
Just deleted the ini file and stated again and it still doesn't work. If I go into a game and start playing it will continue to cycle after 3 minutes. I guess I will try again in a week or so. The problem is minor as I can still launch the game and play it.
Fear is the mind killer!
User avatar
LamerDeluxe
Posts: 747
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 455 times
Been thanked: 143 times

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

Unread post by LamerDeluxe »

Mellified wrote: Mon Apr 26, 2021 3:25 am Please delete your INI and run the "MiSTer_SAM_on.sh" script again. That will download all the newest files.
I've deleted the ini file and ran the script again. It is working now, still with my DS4 controller. It only selects arcade games now for some reason, even though the ini file is still set to run all systems.
Ross_Jolet
Posts: 11
Joined: Sun Jul 12, 2020 2:35 pm
Has thanked: 10 times

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

Unread post by Ross_Jolet »

I’ve modified the .ini file several times not to include the cd systems, yet it still runs those systems. Is anyone else having this problem?
Shuffle7
Posts: 89
Joined: Sun Jan 17, 2021 5:43 pm
Has thanked: 90 times
Been thanked: 9 times

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

Unread post by Shuffle7 »

Seems to work perfect now every core is rotating etc not had to make any amendments to files , just made sure I reloaded up mister , SAM ON etc and run update all . So I haven’t done anything new

Thanks and great work !
Post Reply