mrchrisster / MiSTer_SAM

154 stars 22 forks source link

alt text MiSTer_SAM (Thanks to @HendrixTrog for the video!) Main_Menu

MiSTer Super Attract Mode (SAM)

What is it?

Super Attract Mode puts all your games on display to enjoy whenever your MiSTer is idle.
Like a screen saver, SAM comes on when your MiSTer is idle. Just wait a couple of minutes in the main menu and SAM will launch a random game from your library. Every few minutes it will randomly select and load a new game. If you like a game that's currently playing, just pick up your controller and push a button, press a key, or move the mouse. Back in the main menu, wait another two minutes and the gaming tour begins again!

Installation

or

or

Offline Installation

If your MiSTer is not connected to the internet, click on "Code" -> "Download Zip" and download the project package.

Update

Usage

Simply wait at the main MiSTer menu for 2 minutes (default setting) without touching the mouse, keyboard, or controller and SAM will start.

Don't want to wait? You can start SAM instantly by launching MiSTer_SAM_on.sh script in your MiSTer's Scripts folder!

Features

Reset to Defaults

This process can be used if you want to return MiSTer SAM to default settings or ensure you have the latest files.
Method 1

Method 2

Configuration

The script is highly customizable through the included ini file MiSTer_SAM.ini (details below).

Supported Systems

Currently supported MiSTer cores:

MiSTer Setup

The Update-all script works great for putting system files in the right places. Make sure you have Arcade Organizer enabled for some of SAM's advanced features.

Attract Mode Configuration

Arcade Horizontal or Vertical Only

Uncomment one of the "arcadepath" settings in the MiSTer_SAM.ini file to choose from only horizontal or vertical arcade games.

Enhanced tty2oled output

IMG_1029

tty2oled adds a 3" OLED screen to your MiSTer! By default, tty2oled displays the current core name. With SAM's enhanced tty2oled support you can see the core and game name!

Simply edit the MiSTer_SAM.ini and change the ttyenable setting to ttyenable="Yes". If you need to use a non-standard device change it with ttydevice="/dev/ttyUSB0".

FAQs

How does it work?

A Linux startup daemon runs in the background of your MiSTer's ARM CPU. It looks for any keyboard activity, mouse movement, or controller button presses via Linux. This is being achieved by monitoring the hardware devices on your MiSTer while using minimal resources - with only native tools (CPU load of >1%). When your MiSTer is displaying the main menu and it's idle for several minutes, SAM will start launching random games.

MiSTer arcade cores are launched via MRA files, all other cores are launched through generating MGL files.

Do you support SNAC?

SNAC is not handled by the Linux kernel so unfortunately we wont be able to support SNAC devices.

I don't like how SAM does something!

MiSTer SAM is designed to be highly configurable. Please check the /media/fat/Scripts/MiSTer_SAM.ini file to see if the behavior you want is configurable. If not, please open an issue! We love feedback and feature requests.

Will this break my MiSTer? Will attract mode reduce the life of the MiSTer cycling between cores if left on long term?

Short answer is no. FPGAs don't have a limited number of writes. They are solid state devices that are configured at boot up or - in the case of MiSTer - when a core is loaded. There is no wear from this configuration step.

Also, all files that SAM creates (with the exception of the startup file during first install) are written to RAM mounted storage so you don't need to worry about wearing out your SD card when using SAM.

How do I know what game is on?

If you would like to know what game is currently playing, you can check the file /tmp/SAM_Game.txt. Some folks even use this with OBS to automatically change the game name for their Twitch stream!

Where'd this come from? What happened to the other attract mode projects?

The great work began with MrChrisster building a MiSTer Attract feature for the NES core. This begat Attract_Arcade after Mellified kept opening issues started helping. Once MrChrisster worked with mbc it unlocked the power to load ROMs for more MiSTer cores, resulting in Attract_Mode. We wanted to bring the project to the next level by automating the process. From this collaboration and passion was born SAM - Super Attract Mode! Since MiSTer SAM does everything the old projects did - and lots more! - we wanted to create a new name appropriate for its new superpowers.

Troubleshooting

- When I try to launch the script, it fails and says something about Document Type
You most likely didn't download the "raw" file.
When downloading a file from github, click on the file, then click on "raw".
Now push Ctrl+S to save

- Core is loaded but just hangs on the menu
Sometimes this happens (even on our test setups) and it could be for a variety of reasons.

If you are still having trouble it could simply be that the rom failed to load, it seems to happen every now and then.

- Turbografx16 CD and MegaCD just showing Run/Start button but not starting into the game
If SAM's auto start feature fails for whatever reason, you can try and use a bios that auto launches the game.

- Can I use a CIFS mount for my games?
CIFS is supported. Here is an example of some values in cifs_mount.sh that should get you started. The idea is to mount The SMB Games folder over the MiSTer SD card Games folder:

SERVER="192.168.1.10"  
SHARE="Games/Mister/Games"  
LOCAL_DIR="*"  
BASE_PATH="/media/fat/Games" 

Advanced Usage

For technical users here are a few handy tricks to observe and debug SAM.

SSH features

Some commands to control SAM from the command line

Credits

SAM has been a joined effort from the start. Huge thanks to Mellified and all other supporters!
Original concept and implementation: mrchrisster
Script layout & watchdog functionality: Mellified
tty2oled submodule: Paradox
Indexing tool & input detection: wizzomafizzo

Release History