Page 1 of 20

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

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

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

Posted: Fri Apr 23, 2021 4:54 pm
by thorr
Sounds cool! Looking forward to trying this out.

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

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

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

Posted: Fri Apr 23, 2021 5:17 pm
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!

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

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

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

Posted: Fri Apr 23, 2021 8:07 pm
by FoxbatStargazer
Looking at the readme it probably is looking for USB inputs, not Blisster or SNAC. Would you be using one of those?

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

Posted: Fri Apr 23, 2021 8:27 pm
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.

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

Posted: Fri Apr 23, 2021 9:06 pm
by keilmillerjr
Features are spot on. Code has good conventions. Great job!

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

Posted: Fri Apr 23, 2021 11:07 pm
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.

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

Posted: Fri Apr 23, 2021 11:13 pm
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.

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

Posted: Sat Apr 24, 2021 10:42 am
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.

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

Posted: Sat Apr 24, 2021 5:31 pm
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.

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

Posted: Sat Apr 24, 2021 5:59 pm
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.

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

Posted: Sat Apr 24, 2021 6:07 pm
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.

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

Posted: Sat Apr 24, 2021 7:29 pm
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.

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

Posted: Sat Apr 24, 2021 8:31 pm
by Shuffle7
I’m not having any luck either .
I can’t see a .ini file for SAM anywhere , any ideas ?

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

Posted: Sat Apr 24, 2021 8:55 pm
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.

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

Posted: Sun Apr 25, 2021 4:17 am
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.

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

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

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

Posted: Sun Apr 25, 2021 9:06 am
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.

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

Posted: Sun Apr 25, 2021 1:33 pm
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?

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

Posted: Sun Apr 25, 2021 7:05 pm
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

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

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

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

Posted: Mon Apr 26, 2021 3:26 am
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!

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

Posted: Mon Apr 26, 2021 6:18 am
by limi
Yeah, you probably want “shuffle”, not “random” — there’s a reason all music players don’t use an actual random selection. 😄

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

Posted: Mon Apr 26, 2021 6:59 am
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

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

Posted: Mon Apr 26, 2021 11:21 am
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.

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

Posted: Mon Apr 26, 2021 7:59 pm
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.

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

Posted: Mon Apr 26, 2021 10:32 pm
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?

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

Posted: Tue Apr 27, 2021 11:13 am
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 !