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

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
jacob.pederson
Posts: 22
Joined: Sun Aug 09, 2020 12:48 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 jacob.pederson »

Loving the new Commodore 64 functionality! Excellent :)

I think I found another bug maybe? Seems that whenever you reinstall, SAM starts out muted even though the default INI is not muted now? If you unmute it in the menu it stays unmuted from then on though so no big deal.
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 »

New cores:

Paradox just added Atari 2600, 5600, 7800 support
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 »

venice wrote: Fri May 20, 2022 3:42 pm
rhester72 wrote: Wed May 18, 2022 12:00 pm
How do I tell? It's the one sold here:

https://www.antoniovillena.es/store/product/tty2oled/
venice wrote: Tue May 17, 2022 3:25 pm Do you use the tty2oled mode with „ttyuseack=yes“?
Yes, otherwise I get the corruption I described (double-printed text in the center)
Antonio sells tty2oled Displays with ESP8266 Processors.
This Processor is slower than the ESP32 I am using for my setup.

My tests showing that some delays in the SAM Script needs to be adjusted to get rid of the the double printed text.
This will slow down the text output but we are not in a hurry :mrgreen:

I will test my findings with the latest SAM release and let you know.
I pushed a small change that now makes tty2oled exit cleanly with ttyuseack=yes. The problem was that the last tty_waitfor (in tty_exit function) broke MiSTer_SAM_on.sh's exit. I'm running it in the background now and that seems to have fixed it. I also have SAM's startup running in background now so it doesn't interfere with tty2oled's startup anymore.
Hopefully this means we can close the github issues now, looking forward to your feedback!
User avatar
venice
Top Contributor
Posts: 788
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 280 times
Been thanked: 278 times

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

Unread post by venice »

Good catch.
I will try to modify the „tty_waitfor“ as the used „read“ command has the possibility to use a timeout.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard (Cardwarez) to me.

jacob.pederson
Posts: 22
Joined: Sun Aug 09, 2020 12:48 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 jacob.pederson »

mrchrister wrote: Wed May 25, 2022 4:24 am New cores:

Paradox just added Atari 2600, 5600, 7800 support
EXCELLENT! Anybody know what the filetype is supposed to be for these, it doesn't seem to be finding .a26, .a78 or .a52 files.

Cancel that, I figured out this issue. The create gamelist option from the menu doesn't find the Atari games; however, if you run SAM normally it does find Atari files A-ok.
jacob.pederson
Posts: 22
Joined: Sun Aug 09, 2020 12:48 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 jacob.pederson »

I pushed a small change that now makes tty2oled exit cleanly with ttyuseack=yes. The problem was that the last tty_waitfor (in tty_exit function) broke MiSTer_SAM_on.sh's exit. I'm running it in the background now and that seems to have fixed it. I also have SAM's startup running in background now so it doesn't interfere with tty2oled's startup anymore.
Hopefully this means we can close the github issues now, looking forward to your feedback!

This works for me! I can now have tty2oled enabled, cancel out of SAM with a keypress and play the game without SAM starting back up again. Maybe found a small bug with this though, the ttyenable="No" text doesn't appear to be in the default .ini file anymore; however, if you add in ttyenable="Yes" it works just fine. Thanks!
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 Jacob, thanks for testing! I actually moved ttyenable to the beginning of the ini because it didn't make sense to have it only under advanced options.

Sorry for the confusion!
jacob.pederson
Posts: 22
Joined: Sun Aug 09, 2020 12:48 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 jacob.pederson »

Got another one for you. With ttyenabled, SAM does not start after a cold boot. If you do a MiSTer_SAM_on.sh monitor from SSH, the process is there but its just sitting at a black screen. Maybe waiting for TTY2oled to do something?

On the other hand, starting from the menu option to "start and monitor" with ttyenabled seems to work fine?

Here is my user-startup.sh file, does this look correct ?

Code: Select all

#!/bin/sh

echo "***" $1 "***"












# Startup tty2oled
[[ -e /media/fat/tty2oled/S60tty2oled ]] && /media/fat/tty2oled/S60tty2oled $1














# Startup MiSTer_SAM - Super Attract Mode
[[ -e /media/fat/Scripts/.MiSTer_SAM/MiSTer_SAM_init ]] && /media/fat/Scripts/.MiSTer_SAM/MiSTer_SAM_init  $1 &
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...
That looks correct. Can you try and delete the '&' on the MiSTer_SAM_init line? It's the last character of the file.
Does that work after cold boot?
This was added recently so I haven't tested it much yet.

Also, delete the second line 'echo "***" $1 "***"'
jacob.pederson
Posts: 22
Joined: Sun Aug 09, 2020 12:48 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 jacob.pederson »

Made the changes you suggested, user-startup.sh now looks like this.

Code: Select all

#!/bin/sh

# Startup tty2oled
[[ -e /media/fat/tty2oled/S60tty2oled ]] && /media/fat/tty2oled/S60tty2oled $1

# Startup MiSTer_SAM - Super Attract Mode
[[ -e /media/fat/Scripts/.MiSTer_SAM/MiSTer_SAM_init ]] && /media/fat/Scripts/.MiSTer_SAM/MiSTer_SAM_init  $1
Still the same issue, when booting up from cold, SAM is getting stuck somewhere.
Here is what MiSTer_SAM_on.sh monitor looks like

LnuL1sF.png
LnuL1sF.png (8.39 KiB) Viewed 6598 times

And it just sticks like that.

The detach with ctrl-b d still works, then if I start back up from the Sam menu everything works normally. (zips by the clear serial input buffer message instantly).
User avatar
venice
Top Contributor
Posts: 788
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 280 times
Been thanked: 278 times

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

Unread post by venice »

Can you tell us a bit more about your used tty2oled hardware?
See here please: https://github.com/venice1200/MiSTer_tt ... nformation

I am testing up and down with different tty2oled MCU's and SAM settings and never stuck there.

SAM works for me without this "clear buffer" function as well, we can disable this part of the script.

Code: Select all

		
2283: # Clear Serial input buffer first
2284: if [ "${samquiet}" == "no" ]; then echo -n " Clear tty2oled Serial Input Buffer..."; fi
2285: while read -t 0 sdummy <${ttydevice}; do continue; done
2286: if [ "${samquiet}" == "no" ]; then echo " Done!"; fi

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard (Cardwarez) to me.

jacob.pederson
Posts: 22
Joined: Sun Aug 09, 2020 12:48 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 jacob.pederson »

venice wrote: Tue May 31, 2022 8:07 pm Can you tell us a bit more about your used tty2oled hardware?
See here please: https://github.com/venice1200/MiSTer_tt ... nformation

I am testing up and down with different tty2oled MCU's and SAM settings and never stuck there.

SAM works for me without this "clear buffer" function as well, we can disable this part of the script.

Code: Select all

		
2283: # Clear Serial input buffer first
2284: if [ "${samquiet}" == "no" ]; then echo -n " Clear tty2oled Serial Input Buffer..."; fi
2285: while read -t 0 sdummy <${ttydevice}; do continue; done
2286: if [ "${samquiet}" == "no" ]; then echo " Done!"; fi
I have the premade tty2oled kit from https://www.pcbway.com/project/sharepro ... m_32d.html
This is all I get from dmesg

Code: Select all

/media/fat/Scripts# dmesg | grep tty
[    1.622937] ch341-uart ttyUSB0: break control not supported, using simulated break
[    1.623240] usb 1-1.5: ch341-uart converter now attached to ttyUSB0
User avatar
venice
Top Contributor
Posts: 788
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 280 times
Been thanked: 278 times

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

Unread post by venice »

I have no Board with an CH341.
But I know the CH340 works a bit different in case of receiving/reading data using the bash.

Try disabling the 3 Script lines from above.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard (Cardwarez) to me.

User avatar
venice
Top Contributor
Posts: 788
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 280 times
Been thanked: 278 times

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

Unread post by venice »

jacob.pederson wrote: Tue May 31, 2022 8:34 pm
I have the premade tty2oled kit from https://www.pcbway.com/project/sharepro ... m_32d.html
This is all I get from dmesg

Code: Select all

/media/fat/Scripts# dmesg | grep tty
[    1.622937] ch341-uart ttyUSB0: break control not supported, using simulated break
[    1.623240] usb 1-1.5: ch341-uart converter now attached to ttyUSB0
That result is strange.
The board is from d.ti but the USB-Serial Chip which is shown by dmesg cannot been added to that PCB as far as i know.
You wrote „premade kit“. Did you get a „ready to use“ device?

Is the „normal“ tty2oled usage working for you?

This is not the right place to discuss tty2oled hardware.
Please answer in the tty2oled thread.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard (Cardwarez) to me.

User avatar
Mr. Encyclopedia
Posts: 111
Joined: Thu Aug 05, 2021 1:52 am
Has thanked: 51 times
Been thanked: 47 times
Contact:

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

Unread post by Mr. Encyclopedia »

The last few builds of SAM have been working great for me, thanks for all your hard work!
jacob.pederson
Posts: 22
Joined: Sun Aug 09, 2020 12:48 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 jacob.pederson »

venice wrote: Tue May 31, 2022 8:56 pm I have no Board with an CH341.
But I know the CH340 works a bit different in case of receiving/reading data using the bash.

Try disabling the 3 Script lines from above.
Disabling the 3 suggested lines fixed my issue, venice figured out it's probably caused by my slow ESP8266 with an CH34x USB-Serial Adapter Chip version of TTY2OLED.
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 »

Great, thanks for reporting back! @venice so can we take these lines out?
User avatar
venice
Top Contributor
Posts: 788
Joined: Tue Jun 16, 2020 9:29 am
Location: Germany
Has thanked: 280 times
Been thanked: 278 times

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

Unread post by venice »

mrchrister wrote: Sat Jun 04, 2022 5:15 pm Great, thanks for reporting back! @venice so can we take these lines out?
Yes, remove them.

My MiSTer Add-On-Projects tty2oled, i2c2oled, SNAC2IEC
You can donate by sending a Postcard (Cardwarez) to me.

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 »

Fixed a problem with Arcade not working and some tty2oled updates
User avatar
HerrBerzerk
Posts: 273
Joined: Tue Feb 01, 2022 1:45 pm
Has thanked: 122 times
Been thanked: 39 times

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

Unread post by HerrBerzerk »

Hi,

I installed SAM for the first time yesterday but I don't get it working. It doesn't start automatically, no matter in what menu I am waiting; and when I start in manually, it switches games exactly once. Means, it is stuck in the second game it loads. I already tried deleting and reinstalling, but same result...

Any idea? Thanks,

Frank
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 Frank, that sounds like a controller problem. If a controller is not detected correctly by SAM it might think that buttons are always being pushed.
What controllers do you have connected to your setup?
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 »

We added support for Amiga! If you have the MegaAGS image, please update SAM and give it a try!

Supporting Amiga was one of my early goals with the project since it has such a diverse and big library so I'm glad we finally have Amiga support in SAM. We're working together with the MegaAGS team to make support in the future even more seamless by directly launching a game (currently SAM is just typing buttons in the menu to launch the "feeling lucky" mode of MegaAGS) and by displaying which game is currently playing.
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 892 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: Tue Jun 07, 2022 8:07 pm We added support for Amiga! If you have the MegaAGS image, please update SAM and give it a try!

Supporting Amiga was one of my early goals with the project since it has such a diverse and big library so I'm glad we finally have Amiga support in SAM. We're working together with the MegaAGS team to make support in the future even more seamless by directly launching a game (currently SAM is just typing buttons in the menu to launch the "feeling lucky" mode of MegaAGS) and by displaying which game is currently playing.
That is great news for Amiga fans, like me. So many great classics and a good way to discover new games.
User avatar
HerrBerzerk
Posts: 273
Joined: Tue Feb 01, 2022 1:45 pm
Has thanked: 122 times
Been thanked: 39 times

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

Unread post by HerrBerzerk »

mrchrister wrote: Tue Jun 07, 2022 2:18 pm Hey Frank, that sounds like a controller problem. If a controller is not detected correctly by SAM it might think that buttons are always being pushed.
What controllers do you have connected to your setup?
Hi,

I tried several conditions with different joysticks and without joysticks and you are right, as long as I do not touch a joystick it is working better. I tried with PS4 and with 3doSN30, both with cable.

Another thing is, that It very often stops working at the Atari 5200 when it asks if I have and 8k or 16k cartridge (not sure why it's asking this) or at the sega boot screen where SEGA is written on the screen of the master system.

Maybe it is something about the compatibility with the Antonio Vallena analog board that I'm using? or just a configuration thing, who knows.

Thanks,

Frank
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 »

@HerrBerzerk
I haven't come across the Atari5200 error but the SMS error means it's only loading the bios (the SEGA logo) instead of an actual game.
It sounds like both errors are related to the roms you are using for these systems.

If you SSH into your Mister you can check /tmp/SAM_game.mgl to see which game it is trying to load or just launch MiSTer_SAM_on.sh from ssh, push the up button to get into the menu and then click on "Start SAM and monitor" to see what it's doing..
therourke
Posts: 24
Joined: Mon May 17, 2021 9:09 pm
Location: London
Has thanked: 1 time
Been thanked: 1 time
Contact:

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

Unread post by therourke »

Any idea why occasionally SAM gets stuck on a game? It seems to be random, and could be from any system. But after being random for a while my installation will stop on one game and just never change. The only way to move on is reset.

I have thousands upon thousands of games across 8 or so systems. There's no way I am going to be able to add those particular games that SAM gets stuck on without watching it cycle for the rest of my life.

It doesn't seem to be a controller issue, since when I do push a button the little overlay shows (i.e. the button overlay in arcade mode) to show it is the first time that has happened.

Anyone else seen this behaviour?
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 therourke, not sure why SAM stops cycling for you.
What controllers do you have connected?
Please ssh into the mister and check with "/media/fat/Scripts/MiSTer_SAM_on.sh monitor" while SAM is running to see what it's doing.
User avatar
Captain FPGA
Top Contributor
Posts: 373
Joined: Sun Apr 11, 2021 9:19 pm
Has thanked: 195 times
Been thanked: 25 times

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

Unread post by Captain FPGA »

mrchrister wrote: Fri Jun 17, 2022 7:42 pm Hey therourke, not sure why SAM stops cycling for you.
What controllers do you have connected?
Please ssh into the mister and check with "/media/fat/Scripts/MiSTer_SAM_on.sh monitor" while SAM is running to see what it's doing.
My Sam also stopped working.

I know FTP well but am not good with ssh. I have Putty, how do I set it up to shh into the MiSTer to send you guys a bug report.

I believe SAM stopped working when I introduced "BGM" and "@Favorites" into my MiSTer. Didn't think SAM would conflict with these.
Dreams don't die!
Image
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 »

https://www.jamesfmackenzie.com/2021/01 ... ing-files/

This should help. We're trying to include BGM currently with SAM usage. I haven't tested it yet but probably unlikely that it's BGM related
User avatar
Captain FPGA
Top Contributor
Posts: 373
Joined: Sun Apr 11, 2021 9:19 pm
Has thanked: 195 times
Been thanked: 25 times

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

Unread post by Captain FPGA »

mrchrister wrote: Sun Jun 19, 2022 3:13 pm https://www.jamesfmackenzie.com/2021/01 ... ing-files/

This should help. We're trying to include BGM currently with SAM usage. I haven't tested it yet but probably unlikely that it's BGM related
It did I think.

Provided a images, this tell you guys anything? Let me know if I sshed correctly. Before anyone asks yes I did activate the SAM script before I sshed into the MiSTer.

DELAYED MVC2 HYPER COMBO EDIT!!!!

It works. Turns out just using update all and the individual MiSTer_SAM_on.sh by itself wasn't enough. Had to ssh into MiSTer and copy/paste or type the words MiSTer_SAM_on.sh update into the MiSTer and it finally updated. Of course when it did this I still had the errored SAM screen on so I had to reboot MiSTer and reun the former script for the changes to finally take effect. As for @mrchrister you have my gratitude. :mrgreen: Anywho ignore the pictures now they're no longer relevant.

Proton Cannon!
Attachments
20220620_214843.jpg
20220620_214843.jpg (1.35 MiB) Viewed 6711 times
20220620_214528.jpg
20220620_214528.jpg (2.16 MiB) Viewed 6711 times
Dreams don't die!
Image
Post Reply