Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: AdmiralSnackbar on January 16, 2019, 03:29:36 PM
-
Hi everyone,
I've been trying to get the screen saver to work all day and haven't had much luck. I'm running a Raspberry Pi 3B + on RetroPie 4.4 zero. I added Attract Mode on top of that. I've tried putting videos within the "/opt/retropie/configs/all/attractmode/screensaver" as well as "/opt/retropie/configs/all/attractmode/menu-art". I turned on screensavers through emulation station and in AM settings. Do I require a specific theme, or need to add the code myself in layout.nut in order to run a screen saver? I did notice that the folder for screensaver didn't contain the screensaver.nut file. So I tried adding one, but it still didn't work. Any help towards a solution would be greatly appreciated, thank you!
-
The screensaver will play videos (or images depending on your setting) for the emulator/display that you are currently in when it's activated. The screensaver will use the artwork paths defined in your emulator configuration.
If you need more help, post your attract.cfg and the emulator.cfg for the emulator/display you are activating the screensaver in.
-
I'm looking for emulator.cfg and can't seem to find it. That may be part of the problem. Should it be under the same directory as attract.cfg?
Attract.cfg
# Generated by Attract-Mode v2.5.1
#
display Arcade
layout neon-arcaderoom
romlist Arcade
in_cycle yes
in_menu yes
display Multiple Arcade Machine Emulator
layout Cools
romlist Multiple Arcade Machine Emulator
in_cycle no
in_menu no
display Neo Geo
layout coinops
romlist Neo Geo
in_cycle no
in_menu no
display Final Burn Alpha
layout Basic
romlist Final Burn Alpha
in_cycle no
in_menu no
display Atari 5200
layout robospin-atari 5200
romlist Atari 5200
in_cycle yes
in_menu yes
display Neo Geo Pocket
layout Basic
romlist Neo Geo Pocket
in_cycle no
in_menu no
display Neo Geo Pocket Color
layout coinops
romlist Neo Geo Pocket Color
in_cycle yes
in_menu yes
display PC Engine
layout neon-handheldroom
romlist PC Engine
in_cycle no
in_menu no
display Amstrad CPC
layout Basic
romlist Amstrad CPC
in_cycle no
in_menu no
display Nintendo Entertainment System
layout robospin-nes
romlist Nintendo Entertainment System
in_cycle yes
in_menu yes
display Famicom Disk System
layout Basic
romlist Famicom Disk System
in_cycle no
in_menu no
display ZX Spectrum
layout Basic
romlist ZX Spectrum
in_cycle no
in_menu no
display Game Boy
layout robospin-gameboy
romlist Game Boy
in_cycle yes
in_menu yes
display Game Boy Color
layout robospin-gbcolor
romlist Game Boy Color
in_cycle yes
in_menu yes
display Sega Gamegear
layout robospin-GameGear
romlist Sega Gamegear
in_cycle yes
in_menu yes
display Sega Master System
layout robospin-mastersystem
romlist Sega Master System
in_cycle yes
in_menu yes
display Sega Mega Drive
layout robospin-sega genesis
romlist Sega Mega Drive
in_cycle yes
in_menu yes
display Sega SG-1000
layout Basic
romlist Sega SG-1000
in_cycle no
in_menu no
display Mega CD
layout Basic
romlist Mega CD
in_cycle no
in_menu no
display Game Boy Advance
layout robospin-advance
romlist Game Boy Advance
in_cycle yes
in_menu yes
display Atari Lynx
layout Basic
romlist Atari Lynx
in_cycle no
in_menu no
display PlayStation
layout robospin-psx
romlist PlayStation
in_cycle yes
in_menu yes
display Sega 32X
layout robospin-Sega 32x
romlist Sega 32X
in_cycle yes
in_menu yes
display Atari 7800 ProSystem
layout robospin-atari 7800
romlist Atari 7800 ProSystem
in_cycle yes
in_menu yes
display Super Nintendo
layout robospin-snes
romlist Super Nintendo
in_cycle yes
in_menu yes
display Atari 2600
layout robospin-atari 2600
romlist Atari 2600
in_cycle yes
in_menu yes
display Vectrex
layout Basic
romlist Vectrex
in_cycle no
in_menu no
display RetroPie
layout Basic
romlist RetroPie
in_cycle no
in_menu no
display multi
layout Basic
romlist multi
in_cycle no
in_menu no
filter All
filter Favourites
rule Favourite equals 1
display Atari 800
layout coinops
romlist Atari 800
in_cycle yes
in_menu yes
filter All
filter Favourites
rule Favourite equals 1
sound
sound_volume 100
ambient_volume 100
movie_volume 100
input_map
configure Tab
prev_letter LControl+Up
next_letter LControl+Down
configure Escape+Up
prev_letter Joy0 Up+Joy0 Button0
next_letter Joy0 Down+Joy0 Button0
configure Joy0 Up+Joy0 Button1
down Down
down Joy0 Down
left Left
left Joy0 Left
right Right
right Joy0 Right
select Return
select LControl
select Joy0 Button0
up Joy0 Up
up Up
next_display RBracket
edit_game LShift+Tab
add_favourite Z
displays_menu Num8
filters_menu Space
random_game Num3
next_filter V
prev_filter C
back Escape
back LShift
back X
default back exit
default up prev_game
default down next_game
default left prev_display
default right next_display
general
language en
exit_command
exit_message
default_font FreeSans
font_path /usr/share/fonts/;$HOME/.fonts/
screen_saver_timeout 200
displays_menu_exit yes
hide_brackets no
startup_mode displays_menu
confirm_favourites yes
confirm_exit yes
mouse_threshold 10
joystick_threshold 75
window_mode fullscreen
filter_wrap_mode default
track_usage yes
multiple_monitors no
smooth_images yes
selection_max_step 128
selection_speed_ms 40
move_mouse_on_launch yes
scrape_snaps yes
scrape_marquees yes
scrape_flyers yes
scrape_wheels yes
scrape_fanart no
scrape_videos no
scrape_overview yes
video_decoder software
menu_prompt Displays Menu
menu_layout finalburn
saver_config
param basic_movie No
param blank_start_cmd
param blank_stop_cmd
param blank_time 12000000000000
param image_collage No
param movie_collage Yes
param overlay_art None
param preserve_ar Yes
param rgb_movie Yes
param sound No
layout_config robospin-nes
param enable_Lmarquee Yes
param enable_VertArt No
param enable_bloom No
param enable_cab robo
param enable_colors yes
param enable_crt No
param enable_frame yes
param enable_image blue
param enable_marquee No
param enable_mlogos Yes
param enable_pointer rocket
param enable_scanline none
param enable_slogos Yes
param enable_static yes
param orbit_art wheel
param transition_ms 25
layout_config cosmo-systems
param enable_colors No
param enable_frame Yes
param enable_ganimate Yes
param enable_gboxart Yes
param enable_gcartart cartridge
param enable_ginfo Yes
param enable_list_type wheel
param enable_mlogos Yes
param enable_pointer emulator
param enable_static No
param orbit_art wheel
param ratio Yes
param sound No
param transition_ms 25
intro_config
param detect_aspect Yes
param layout_rotation none
param play_intro Yes
param video_16x9 Epiclnk.mp4
param video_3x4 Epiclnk.mp4
param video_4x3 Epiclnk.mp4
param video_9x16 Epiclnk.mp4
param video_default Epiclnk.mp4
plugin UtilityMenu
enabled no
plugin KonamiCode
enabled yes
param A
param B
param action configure
param code up,up,down,down,left,right,left,right,B,A
param down
param left
param right
param up
plugin KeyboardSearch
enabled no
param results_mode Show Results
param trigger Custom1
plugin ResFix
enabled no
param emulators
plugin IntroVid
enabled yes
param audio Yes
param filename Epiclnk.mp4
plugin AudioMode
enabled no
EDIT: Looking at the docs (if I'm looking at the right one), I'm noticing a default-emulator.cfg. I'm adding that file to my pi under /opt/retropie/configs/all/attractmode giving that a try. The following code in that file is the following.
default-emulator.cfg
# Attract-Mode: Default emulator settings
#
args "[romfilename]"
rompath $HOME/[emulator]/roms/
romext .zip
artwork flyer $HOME/[emulator]/boxart
artwork marquee
artwork snap $HOME/[emulator]/videos;$HOME/[emulator]/snap
artwork wheel
#EDIT: So looking at the default-emulator.cfg I noticed the snap folder was defined. So I redefined it within the Super Nintendo.cfg file. But that still didn't work either.
Super Nintendo.cfg
# Generated by Attract-Mode v2.5.1
#
executable /opt/retropie/supplementary/runcommand/runcommand.sh
args 0 _SYS_ snes "[romfilename]"
rompath /home/pi/RetroPie/roms/snes
romext .7z;.bin;.bs;.smc;.sfc;.fig;.swc;.mgd;.zip;.7Z;.BIN;.BS;.SMC;.SFC;.FIG;.SWC;.MGD;.ZIP
system Super Nintendo
exit_hotkey Escape
artwork flyer /home/pi/RetroPie/roms/snes/flyer
artwork marquee /home/pi/RetroPie/roms/snes/marquee
artwork snap /home/pi/RetroPie/roms/snes/snap
artwork wheel /home/pi/RetroPie/roms/snes/wheel
artwork snap /home/pi/RetroPie/roms/snes/snap
es_settings.cfg
<?xml version="1.0"?>
<bool name="BackgroundJoystickInput" value="false" />
<bool name="CaptionsCompatibility" value="true" />
<bool name="DrawFramerate" value="true" />
<bool name="EnableSounds" value="true" />
<bool name="MoveCarousel" value="true" />
<bool name="ParseGamelistOnly" value="false" />
<bool name="QuickSystemSelect" value="true" />
<bool name="SaveGamelistsOnExit" value="true" />
<bool name="ScrapeRatings" value="false" />
<bool name="ScreenSaverControls" value="true" />
<bool name="ScreenSaverOmxPlayer" value="true" />
<bool name="ShowHelpPrompts" value="true" />
<bool name="ShowHiddenFiles" value="true" />
<bool name="SlideshowScreenSaverCustomImageSource" value="false" />
<bool name="SlideshowScreenSaverRecurse" value="false" />
<bool name="SlideshowScreenSaverStretch" value="false" />
<bool name="SortAllSystems" value="false" />
<bool name="StretchVideoOnScreenSaver" value="false" />
<bool name="UseCustomCollectionsSystem" value="true" />
<bool name="VideoAudio" value="true" />
<bool name="VideoOmxPlayer" value="true" />
<bool name="hideQuitMenuOnKidUI" value="false" />
<int name="MaxVRAM" value="80" />
<int name="ScraperResizeHeight" value="0" />
<int name="ScraperResizeWidth" value="400" />
<int name="ScreenSaverSwapImageTimeout" value="10000" />
<int name="ScreenSaverSwapVideoTimeout" value="30000" />
<int name="ScreenSaverTime" value="60000" />
<string name="AudioDevice" value="PCM" />
<string name="CollectionSystemsAuto" value="" />
<string name="CollectionSystemsCustom" value="" />
<string name="GamelistViewStyle" value="automatic" />
<string name="OMXAudioDev" value="both" />
<string name="PowerSaverMode" value="disabled" />
<string name="Scraper" value="TheGamesDB" />
<string name="ScreenSaverBehavior" value="random video" />
<string name="ScreenSaverGameInfo" value="never" />
<string name="SlideshowScreenSaverBackgroundAudioFile" value="/home/pi/.emulationstation/slideshow/audio/slideshow_bg.wav" />
<string name="SlideshowScreenSaverImageDir" value="/home/pi/.emulationstation/slideshow/image" />
<string name="SlideshowScreenSaverImageFilter" value=".png,.jpg" />
<string name="StartupSystem" value="" />
<string name="ThemeSet" value="carbon" />
<string name="TransitionStyle" value="fade" />
<string name="UIMode" value="Full" />
<string name="UIMode_passkey" value="uuddlrlrba" />
-
default-emulator.cfg is a template and not part of your issue. When I said emulator.cfg, I meant <emulator/system>.cfg. Sorry if I wasn't clear but I wanted the Super Nintendo.cfg file you posted. Es_settings.cfg has nothing to do with AttractMode screensavers, only EmulationStation screensavers.
When you are in your Super Nintendo Display do you see the videos play? If your screensaver is activated while in your Super Nintendo Display do you see the videos?
In your attract.cfg I see these lines
saver_config
param basic_movie No
param blank_start_cmd
param blank_stop_cmd
param blank_time 12000000000000
param image_collage No
param movie_collage Yes
param overlay_art None
param preserve_ar Yes
param rgb_movie Yes
param sound No
You can try to adjust these setting and see if it helps.
Configure-->Screen Saver-->Screen Saver Timeout = 60
Configure-->Screen Saver-->Basic Movie = yes
Configure-->Screen Saver-->Movie Collage = no
Configure-->Screen Saver-->RGB Movie = no
Configure-->Screen Saver-->Preserve Aspect Ratio = no
Configure-->Screen Saver-->Sound = yes
-
Ah yea that's what I thought you meant but wasn't sure which is why I did add that edit with the Super Nintendo.cfg. It's starting to make more sense.
I've been making sure I'm in Super Nintendo Display while making these tests. I just tried those settings you listed and recorded the following video of the repeating behaviour. Before the recording I did try the test when the timeout was 60 seconds, but for this video I switch it to 5 for a simpler upload. Thanks again for your help, I really appreciate it. You're awesome!
https://www.youtube.com/watch?v=LE49UtubNSA (https://www.youtube.com/watch?v=LE49UtubNSA)
-
I just noticed that your Super Nintendo.cfg has duplicate entries for "artwork snap /home/pi/RetroPie/roms/snes/snap". Remove one of them and test again.
-
Ah yea you're right. I must have skimmed over it thinking it wasn't there and put in the duplicate. I just did the test again and still hasn't changed the behaviour. I'm really stumped on this one. Seems like I have all the right settings I should have. Most of my systems definitely have snaps within them. Could something else be interfering?
-
Have you inspected intro.nut?
-
I have not yet. I did have to add a intro.nut and a screensaver.nut from what I've read. Here is what I have so far.
/opt/retropie/configs/all/attractmode/intro/intro.nut
//////////////////////////////////////////////////
//
// Attract-Mode Frontend - Enhanced intro layout
//
// Based on original intro script, updated by Chris Van Graas
//
///////////////////////////////////////////////////
class UserConfig
{
</ label="Play intro", help="Toggle playback of intro video when Attract-Mode starts", options="Yes,No", order=1 />
play_intro = "Yes";
</ label="Detect aspect ratio", help="Toggle detection of aspect ratio (if disabled, default video will play)", options="Yes,No", order=2 />
detect_aspect = "Yes";
</ label="Layout rotation", help="Set the playback rotation to suit your monitor", options="none,right,flip,left", order=3 />
layout_rotation="none";
</ label="Default video", help="Default video to play at startup. Used if aspect ratio detection failed or disabled", order=4 />
video_default = "intro.mp4"
</ label="16:9 video", help="Video to play at startup when 16:9 aspect ratio is detected", order=5 />
video_16x9 = "intro.mp4"
</ label="4:3 video", help="Video to play at startup when 4:3 aspect ratio is detected", order=6 />
video_4x3 = "intro_4x3.mp4"
</ label="9:16 video", help="Video to play at startup when 9:16 aspect ratio is detected", order=7 />
video_9x16 = "intro_9x16.mp4"
</ label="3:4 video", help="Video to play at startup when 3:4 aspect ratio is detected", order=8 />
video_3x4 = "intro_3x4.mp4"
}
// any signal will cause intro mode to exit
function end_mode()
{
fe.signal("select");
}
local config = fe.get_config();
local screen_width = null;
local screen_height = null;
local layout_rotation = null;
local layout_width = null;
local layout_height = null;
local ar = null;
local layout_aspect = "default";
local vid = null;
local Aspect = [ "16x9", "4x3", "9x16", "3x4" ];
screen_width = ScreenWidth;
screen_height = ScreenHeight;
switch (config["play_intro"])
{
case "No":
return end_mode();
break;
case "Yes":
default:
switch (config["layout_rotation"])
{
case "none":
layout_rotation = RotateScreen.None;
layout_width = screen_width;
layout_height = screen_height;
break;
case "right":
layout_rotation = RotateScreen.Right;
layout_width = screen_height;
layout_height = screen_width;
break;
case "flip":
layout_rotation = RotateScreen.Flip;
layout_width = screen_width;
layout_height = screen_height;
break;
case "left":
layout_rotation = RotateScreen.Left;
layout_width = screen_height;
layout_height = screen_width;
break;
}
fe.layout.base_rotation = layout_rotation;
if (config["detect_aspect"] == "Yes")
{
local _layout_ar = layout_width / layout_height.tofloat();
local _best_ar = 0.0;
foreach (_ratio in Aspect)
{
local _x = split(_ratio, "x");
local _try_ar = _x[0].tofloat()/_x[1].tofloat();
if (!(_best_ar != 0.0 && fabs(_layout_ar - _best_ar) < fabs(_layout_ar - _try_ar)))
{
_best_ar = _try_ar;
layout_aspect = _ratio;
}
}
}
vid = fe.add_image(config["video_" + layout_aspect], 0, 0, ScreenWidth, ScreenHeight);
if (vid.file_name.len() == 0 && layout_aspect != "default")
{
vid.file_name = config["video_default"];
}
if (vid.file_name.len() == 0)
{
return end_mode();
}
fe.add_ticks_callback("intro_tick");
break;
}
function intro_tick(ttime)
{
// check if the video has stopped yet
//
if (vid.video_playing == false)
{
end_mode();
}
return false;
}
-
/opt/retropie/configs/all/attractmode/screensaver/screensaver.nut
///////////////////////////////////////////////////
//
// Attract-Mode Frontend - default screensaver script
//
///////////////////////////////////////////////////
class UserConfig {
</ label="Basic Movie", help="Enable basic movie mode", options="Yes,No", order=1 />
basic_movie="Yes";
</ label="Movie Collage", help="Enable 2x2 movie collage mode", options="Yes,No", order=2 />
movie_collage="Yes";
</ label="Image Collage", help="Enable 4x4 image collage mode", options="Yes,No", order=3 />
image_collage="Yes";
</ label="RGB Movie", help="Enable RGB movie mode", options="Yes,No", order=4 />
rgb_movie="Yes";
</ label="Overlay Artwork", help="Artwork to overlay on videos", options="wheel,flyer,marquee,None", order=5 />
overlay_art="wheel";
</ label="Play Sound", help="Play video sounds during screensaver", options="Yes,No", order=6 />
sound="Yes";
</ label="Preserve Aspect Ratio", help="Preserve the aspect ratio of screensaver snaps/videos", options="Yes,No", order=7 />
preserve_ar="No";
</ label="Blank Screen Time", help="Minutes before switching to blank screen (low power) mode. Set this to 0 to disable.", order=8 />
blank_time="120";
</ label="Blank Screen Start Command", help="The command line to run when blank screen (low power) mode starts (to turn the monitor off, for example).", order=9 />
blank_start_cmd="";
</ label="Blank Screen Stop Command", help="The command line to run when blank screen (low power) mode stops (to turn the monitor back on, for example).", order=10 />
blank_stop_cmd="";
}
local actual_rotation = (fe.layout.base_rotation + fe.layout.toggle_rotation)%4;
if (( actual_rotation == RotateScreen.Left )
|| ( actual_rotation == RotateScreen.Right ))
{
// Vertical orientation
//
fe.layout.height = 1024;
fe.layout.width = 1024 * ScreenHeight / ScreenWidth;
}
else
{
// Horizontal orientation
//
fe.layout.width = 1024;
fe.layout.height = 1024 * ScreenHeight / ScreenWidth;
}
local config = fe.get_config();
function get_new_offset( obj )
{
// try a few times to get a file
for ( local i=0; i<6; i++ )
{
obj.index_offset = rand();
if ( obj.file_name.len() > 0 )
return true;
}
return false;
}
//
// Container for a wheel image w/ shadow effect
//
class ArtOverlay
{
logo=0;
logo_shadow=0;
in_time=0;
out_time=0;
constructor( x, y, width, height, shadow_offset )
{
if ( config["overlay_art"] != "None" )
{
logo_shadow = fe.add_artwork(
config["overlay_art"],
x + shadow_offset,
y + shadow_offset,
width,
height );
logo_shadow.preserve_aspect_ratio = true;
logo = fe.add_clone( logo_shadow );
logo.set_pos( x, y );
logo_shadow.set_rgb( 0, 0, 0 );
logo_shadow.visible = logo.visible = false;
}
}
function init( index_offset, ttime, duration )
{
if ( config["overlay_art"] != "None" )
{
logo.index_offset = index_offset;
logo.visible = logo_shadow.visible = true;
logo.alpha = logo_shadow.alpha = 0;
in_time = ttime + 1000; // start fade in one second in
if ( config["overlay_art"] == "wheel" )
{
// start fade out 2 seconds before video ends
// for wheels
out_time = ttime + duration - 2000;
}
else
{
// otherwise just flash for 4 seconds
out_time = ttime + 4000;
}
}
}
function reset()
{
if ( config["overlay_art"] != "None" )
{
logo.visible = logo_shadow.visible = false;
}
}
function on_tick( ttime )
{
if (( config["overlay_art"] != "None" )
&& ( logo.visible ))
{
if ( ttime > out_time + 1000 )
{
logo.visible = logo_shadow.visible = false;
}
else if ( ttime > out_time )
{
logo.alpha = logo_shadow.alpha = 255 - ( 255 * ( ttime - out_time ) / 1000.0 );
}
else if ( ( ttime < in_time + 1000 ) && ( ttime > in_time ) )
{
logo.alpha = logo_shadow.alpha = ( 255 * ( ttime - in_time ) / 1000.0 );
}
}
}
};
//
// Default mode - just play a video through once
//
class MovieMode
{
MIN_TIME = 4000; // the minimum amount of time this mode should run for (in milliseconds)
obj=0;
logo=0;
start_time=0;
is_exclusive=false;
constructor()
{
obj = fe.add_artwork( "", 0, 0, fe.layout.width, fe.layout.height );
if ( config["sound"] == "No" )
obj.video_flags = Vid.NoAudio | Vid.NoAutoStart | Vid.NoLoop;
else
obj.video_flags = Vid.NoAutoStart | Vid.NoLoop;
if ( config["preserve_ar"] == "Yes" )
obj.preserve_aspect_ratio = true;
logo = ArtOverlay( 10, fe.layout.height - 250, 520, 240, 2 );
}
function init( ttime )
{
start_time=ttime;
obj.visible = true;
get_new_offset( obj );
obj.video_playing = true;
logo.init( obj.index_offset, ttime, obj.video_duration );
}
function reset()
{
obj.visible = false;
obj.video_playing = false;
logo.reset();
}
// return true if mode should continue, false otherwise
function check( ttime )
{
local elapsed = ttime - start_time;
return (( obj.video_playing == true ) || ( elapsed <= MIN_TIME ));
}
function on_tick( ttime )
{
logo.on_tick( ttime );
}
function on_select()
{
// select the presently displayed game
fe.list.index += obj.index_offset;
}
};
//
// 2x2 video display. Runs until first video ends
//
class MovieCollageMode
{
objs = [];
logos = [];
ignore = [];
ignore_checked = false;
chance = 25; // precentage chance that this mode is triggered
is_exclusive=false;
constructor()
{
objs.append( _add_obj( 0, 0 ) );
objs.append( _add_obj( 1, 0 ) );
objs.append( _add_obj( 0, 1 ) );
if ( config["sound"] == "No" )
objs.append( _add_obj( 1, 1 ) );
else
objs.append( _add_obj( 1, 1, Vid.NoAutoStart | Vid.NoLoop ) );
for ( local i=0; i<objs.len(); i++ )
{
ignore.append( false );
logos.append( ArtOverlay( objs[i].x + 5, objs[i].y + objs[i].height - 125, 260, 120, 1 ) );
}
}
function _add_obj( x, y, vf=Vid.NoAudio | Vid.NoAutoStart | Vid.NoLoop )
{
local temp = fe.add_artwork( "", x*fe.layout.width/2, y*fe.layout.height/2, fe.layout.width/2, fe.layout.height/2 );
temp.visible = false;
temp.video_playing = false;
temp.video_flags = vf;
if ( config["preserve_ar"] == "Yes" )
temp.preserve_aspect_ratio = true;
return temp;
}
function obj_init( idx, ttime )
{
objs[idx].visible = true;
get_new_offset( objs[idx] );
// try not to duplicate videos
if ( fe.list.size > 7 )
{
for ( local j=0; j<4; j++ )
{
if (( j != idx ) && ( objs[idx].file_name == objs[j].file_name ))
{
get_new_offset( objs[idx] );
break;
}
}
}
objs[idx].video_playing = true;
logos[idx].init( objs[idx].index_offset, ttime, objs[idx].video_duration );
}
function init( ttime )
{
for ( local i=0; i<objs.len(); i++ )
{
obj_init( i, ttime );
ignore[i] = false;
}
ignore_checked = false;
}
function reset()
{
foreach ( o in objs )
{
o.visible = false;
o.video_playing = false;
}
foreach ( l in logos )
l.reset();
}
// return true if mode should continue, false otherwise
function check( ttime )
{
if (( ttime < 4000 ) || ( is_exclusive ))
return true;
else if ( ignore_checked == false )
{
//
// We ignore videos that stopped playing within the first
// 4 seconds (images are captured by this too)
//
local all_are_ignored=true;
for ( local i=0; i<objs.len(); i++ )
{
if ( objs[i].video_playing == false )
ignore[i] = true;
else
all_are_ignored = false;
}
ignore_checked = true;
return (!all_are_ignored);
}
for ( local i=0; i<objs.len(); i++ )
{
if (( objs[i].video_playing == false )
&& ( ignore[i] == false ))
return ( ( rand() % 2 ) == 0 ); // 50/50 chance of leaving mode
}
return true;
}
function on_tick( ttime )
{
foreach ( l in logos )
l.on_tick( ttime );
for ( local i=0; i<objs.len(); i++ )
{
if ( objs[i].video_playing == false )
obj_init( i, ttime );
}
}
function on_select()
{
// randomly select one of the presently displayed games
fe.list.index += objs[ rand() % 4 ].index_offset;
}
};
//
// 4x4 display of screen snapshots. One shot is randomly chnaged every 100ms
//
class ImageCollageMode
{
LENGTH = 12000; // length of time this mode should run (in milliseconds)
objs = [];
start_time=0;
last_switch=0;
chance = 15; // precentage chance that this mode is triggered
is_exclusive=false;
constructor()
{
local width = fe.layout.width / 4;
local height = fe.layout.height / 4;
for ( local i=0; i<4; i++ )
{
for ( local j=0; j<4; j++ )
{
objs.append( fe.add_artwork( "", i * width, j * height, width, height ) );
objs.top().visible = false;
objs.top().video_flags = Vid.ImagesOnly;
if ( config["preserve_ar"] == "Yes" )
objs.top().preserve_aspect_ratio = true;
}
}
}
function init( ttime )
{
last_switch = start_time = ttime;
foreach ( o in objs )
{
o.visible = true;
get_new_offset( o );
}
}
function reset()
{
foreach ( o in objs )
o.visible = false;
}
// return true if mode should continue, false otherwise
function check( ttime )
{
if ( is_exclusive )
return true;
else
return (( ttime - start_time ) < LENGTH );
}
function on_tick( ttime )
{
if (( ttime - last_switch ) > 100 )
{
last_switch = ttime;
objs[ rand() % objs.len() ].index_offset = rand();
}
}
function on_select()
{
// randomly select one of the presently displayed games
fe.list.index += objs[ rand() % 16 ].index_offset;
}
}
//
//
//
class RGBMovieMode
{
MIN_TIME = 4000; // the minimum amount of time this mode should run for (in milliseconds)
chance = 25; // precentage chance that this mode is triggered
_objL=0;
_objL1=0;
_obj=0;
_objR=0;
_objR1=0;
logo=0;
start_time=0;
is_exclusive=false;
cstep ={ red=0, green=0, blue=0 };
last_colour=0;
last_lcycle=1;
last_rcycle=1;
lcycle_ms=1000;
rcycle_ms=1000;
constructor()
{
_objL = fe.add_artwork( "", 0, 0, fe.layout.width/4, fe.layout.height );
_objL1 = fe.add_clone( _objL );
_objR = fe.add_clone( _objL );
_objR1 = fe.add_clone( _objL );
_obj = fe.add_clone( _objL );
_obj.width = fe.layout.width/2;
if ( config["sound"] == "No" )
_all_set( "video_flags", Vid.NoAudio | Vid.NoAutoStart | Vid.NoLoop );
else
_all_set( "video_flags", Vid.NoAutoStart | Vid.NoLoop );
if ( config["preserve_ar"] == "Yes" )
_all_set( "preserve_aspect_ratio", true );
logo = ArtOverlay( 10, fe.layout.height - 250, 520, 240, 2 );
_obj.set_pos( fe.layout.width/4, 0 );
_all_set( "visible", false );
_all_set( "video_playing", false );
}
function _all_set( tag, value )
{
_objL[tag] = value;
_objL1[tag] = value;
_obj[tag] = value;
_objR[tag] = value;
_objR1[tag] = value;
}
function _one_colour( label )
{
local temp = _obj[label] + cstep[label];
if ( temp < 0 )
{
cstep[label] *= -1;
temp = temp * -1;
}
else if ( temp > 255 )
{
cstep[label] *= -1;
temp = 512 - temp;
}
_obj[label] = temp;
}
function _set_colour( ttime )
{
local elapsed = ( ttime - start_time ) / 50.0;
if ( elapsed.tointeger() <= last_colour )
return;
last_colour = elapsed.tointeger();
_one_colour( "red" );
_one_colour( "green" );
_one_colour( "blue" );
}
function _reset_lpos()
{
_objL.set_pos( 0, 0 );
_objL1.set_pos( 0, -fe.layout.height );
}
function _set_lpos( ttime )
{
local elapsed = ( ttime - start_time ) / lcycle_ms.tofloat();
if (( elapsed.tointeger() < last_lcycle ))
return;
else if ( elapsed.tointeger() > last_lcycle )
{
// randomly stick in position reset
last_lcycle = elapsed.tointeger() + (rand()%3);
_reset_lpos();
return;
}
local step= fe.layout.height * ( elapsed - elapsed.tointeger() );
_objL.set_pos( _objL.x, step );
_objL1.set_pos( _objL1.x, -fe.layout.height + step );
}
function _reset_rpos()
{
_objR.set_pos( fe.layout.width - fe.layout.width/4, 0 );
_objR1.set_pos( fe.layout.width - fe.layout.width/4, fe.layout.height );
}
function _set_rpos( ttime )
{
local elapsed = ( ttime - start_time ) / rcycle_ms.tofloat();
if ( elapsed.tointeger() < last_rcycle )
return;
else if ( elapsed.tointeger() > last_rcycle )
{
// randomly stick in position reset
last_rcycle = elapsed.tointeger() + (rand()%3);
_reset_rpos();
return;
}
local step= fe.layout.height * ( elapsed - elapsed.tointeger() );
_objR.set_pos( _objR.x, -step );
_objR1.set_pos( _objR1.x, fe.layout.height-step );
}
function init( ttime )
{
start_time=ttime;
_all_set( "visible", true );
get_new_offset( _obj );
_all_set( "index_offset", _obj.index_offset );
_all_set( "subimg_width", _obj.texture_width / 4 );
_obj.subimg_width = _obj.texture_width / 2;
_obj.subimg_x = _obj.texture_width/4;
_objR1.subimg_x = _objR.subimg_x = _objL.subimg_width + _obj.subimg_width;
_all_set( "video_playing", true );
cstep["red"] = rand()%20-10;
cstep["green"] = rand()%20-10;
cstep["blue"] = rand()%20-10;
lcycle_ms = _get_cycle_ms();
rcycle_ms = _get_cycle_ms();
_reset_rpos();
_reset_lpos();
logo.init( _obj.index_offset, ttime, _obj.video_duration );
}
function _get_cycle_ms()
{
return 250 + rand()%1500;
}
function reset()
{
last_colour=0;
last_lcycle=1;
last_rcycle=1;
_all_set( "visible", false );
_all_set( "video_playing", false );
logo.reset();
}
// return true if mode should continue, false otherwise
function check( ttime )
{
local elapsed = ttime - start_time;
return (( _obj.video_playing == true ) || ( elapsed <= MIN_TIME ));
}
function on_tick( ttime )
{
_set_colour( ttime );
_set_lpos( ttime );
_set_rpos( ttime );
logo.on_tick( ttime );
}
function on_select()
{
// select the presently displayed game
fe.list.index += _obj.index_offset;
}
};
//
// Movie mode is always on, turn on the others as configured by the user
//
local modes = [];
local default_mode = MovieMode();
if ( config["movie_collage"] == "Yes" )
modes.append( MovieCollageMode() );
if ( config["image_collage"] == "Yes" )
modes.append( ImageCollageMode() );
if ( config["rgb_movie"] == "Yes" )
modes.append( RGBMovieMode() );
if (( config["basic_movie"] == "No" ) && ( modes.len() > 0 ))
{
default_mode = modes[0];
modes.remove( 0 );
}
if ( modes.len() == 0 )
default_mode.is_exclusive = true;
local current_mode = default_mode;
local first_time = true;
local blank_time = 0;
try { blank_time = config[ "blank_time" ].tointeger() * 60000; } catch (e) {};
local do_blank=false;
fe.add_ticks_callback( "saver_tick" );
//
// saver_tick gets called repeatedly during screensaver.
// ttime = number of milliseconds since screensaver began.
//
function saver_tick( ttime )
{
if ( do_blank )
return;
if ( blank_time && ( ttime > blank_time ))
{
current_mode.reset();
do_blank = true;
if ( config[ "blank_start_cmd" ].len() > 0 )
system( config[ "blank_start_cmd" ] );
return;
}
if ( first_time ) // special case for initializing the very first mode
{
current_mode.init( ttime );
first_time = false;
}
if ( current_mode.check( ttime ) == false )
{
//
// If check returns false, we change the mode
//
current_mode.reset();
current_mode = default_mode;
foreach ( m in modes )
{
if ( ( rand() % 100 ) < m.chance )
{
current_mode = m;
break;
}
}
current_mode.init( ttime );
}
else
{
current_mode.on_tick( ttime );
}
}
fe.add_transition_callback( "saver_transition" );
function saver_transition( ttype, var, ttime )
{
if (( ttype == Transition.EndLayout ) && ( do_blank )
&& ( config[ "blank_stop_cmd" ].len() > 0 ))
system( config[ "blank_stop_cmd" ] );
return false;
}
fe.add_signal_handler( "saver_signal_handler" );
function saver_signal_handler( sig )
{
if ( sig == "select" )
current_mode.on_select();
return false;
}
-
Ok. One last idea I have - make sure there isn’t an operating system screen saver or screen dimming being activated before the attractmode’s screensaver. Perhaps set attractmode screensaver to an extreme low setting just to test.
-
Configure a key or button to force the screensaver on demand to make further testing easier.
Configure-->Controls-->Screen Saver = P (or any key or button of your choice that isn't already in use)
Go into your Super Nintendo Display and press the key/button you configured above. Do you get the same blank screen? If yes, post you new attract.cfg and Super Nintendo.cfg files.
-
Setup the key press for starting the screensaver. It had the same behaviour by going to a black screen. I made sure to try it not only on the Super Nintendo Display but all of them. I did go through the screensaver.nut code and found something interesting. I see the line of fe.add_artwork( "", 0, 0, layout.width, layout.height) It's not given any folder like its counter parts for overlay. I'm trying to figure out where the screensaver itself is getting the folder name. Because the cfg file for the emulators seemed to be correct.
/opt/retropie/configs/all/attractmode/screensaver/screensaver.nut (snippet)
class MovieMode
{
MIN_TIME = 4000; // the minimum amount of time this mode should run for (in milliseconds)
obj=0;
logo=0;
start_time=0;
is_exclusive=false;
constructor()
{
obj = fe.add_artwork( "", 0, 0, fe.layout.width, fe.layout.height );
if ( config["sound"] == "No" )
obj.video_flags = Vid.NoAudio | Vid.NoAutoStart | Vid.NoLoop;
else
obj.video_flags = Vid.NoAutoStart | Vid.NoLoop;
if ( config["preserve_ar"] == "Yes" )
obj.preserve_aspect_ratio = true;
logo = ArtOverlay( 10, fe.layout.height - 250, 520, 240, 2 );
}
/opt/retropie/configs/all/attractmode/emulators/Super Nintendo.cfg
# Generated by Attract-Mode v2.5.1
#
executable /opt/retropie/supplementary/runcommand/runcommand.sh
args 0 _SYS_ snes "[romfilename]"
rompath /home/pi/RetroPie/roms/snes
romext .7z;.bin;.bs;.smc;.sfc;.fig;.swc;.mgd;.zip;.7Z;.BIN;.BS;.SMC;.SFC;.FIG;.SWC;.MGD;.ZIP
system Super Nintendo
exit_hotkey Escape
artwork flyer /home/pi/RetroPie/roms/snes/flyer
artwork marquee /home/pi/RetroPie/roms/snes/marquee
artwork snap /home/pi/RetroPie/roms/snes/snap
artwork wheel /home/pi/RetroPie/roms/snes/wheel
-
/opt/retropie/configs/all/attractmode/attract.cfg
# Generated by Attract-Mode v2.5.1
#
display Arcade
layout neon-arcaderoom
romlist Arcade
in_cycle yes
in_menu yes
display Multiple Arcade Machine Emulator
layout Cools
romlist Multiple Arcade Machine Emulator
in_cycle no
in_menu no
display Neo Geo
layout coinops
romlist Neo Geo
in_cycle no
in_menu no
display Final Burn Alpha
layout Basic
romlist Final Burn Alpha
in_cycle no
in_menu no
display Atari 5200
layout robospin-atari 5200
romlist Atari 5200
in_cycle yes
in_menu yes
display Neo Geo Pocket
layout Basic
romlist Neo Geo Pocket
in_cycle no
in_menu no
display Neo Geo Pocket Color
layout coinops
romlist Neo Geo Pocket Color
in_cycle yes
in_menu yes
display PC Engine
layout neon-handheldroom
romlist PC Engine
in_cycle no
in_menu no
display Amstrad CPC
layout Basic
romlist Amstrad CPC
in_cycle no
in_menu no
display Nintendo Entertainment System
layout robospin-nes
romlist Nintendo Entertainment System
in_cycle yes
in_menu yes
display Famicom Disk System
layout Basic
romlist Famicom Disk System
in_cycle no
in_menu no
display ZX Spectrum
layout Basic
romlist ZX Spectrum
in_cycle no
in_menu no
display Game Boy
layout robospin-gameboy
romlist Game Boy
in_cycle yes
in_menu yes
display Game Boy Color
layout robospin-gbcolor
romlist Game Boy Color
in_cycle yes
in_menu yes
display Sega Gamegear
layout robospin-GameGear
romlist Sega Gamegear
in_cycle yes
in_menu yes
display Sega Master System
layout robospin-mastersystem
romlist Sega Master System
in_cycle yes
in_menu yes
display Sega Mega Drive
layout robospin-sega genesis
romlist Sega Mega Drive
in_cycle yes
in_menu yes
display Sega SG-1000
layout Basic
romlist Sega SG-1000
in_cycle no
in_menu no
display Mega CD
layout Basic
romlist Mega CD
in_cycle no
in_menu no
display Game Boy Advance
layout robospin-advance
romlist Game Boy Advance
in_cycle yes
in_menu yes
display Atari Lynx
layout Basic
romlist Atari Lynx
in_cycle no
in_menu no
display PlayStation
layout robospin-psx
romlist PlayStation
in_cycle yes
in_menu yes
display Sega 32X
layout robospin-Sega 32x
romlist Sega 32X
in_cycle yes
in_menu yes
display Atari 7800 ProSystem
layout robospin-atari 7800
romlist Atari 7800 ProSystem
in_cycle yes
in_menu yes
display Super Nintendo
layout robospin-snes
romlist Super Nintendo
in_cycle yes
in_menu yes
display Atari 2600
layout robospin-atari 2600
romlist Atari 2600
in_cycle yes
in_menu yes
display Vectrex
layout Basic
romlist Vectrex
in_cycle no
in_menu no
display RetroPie
layout Basic
romlist RetroPie
in_cycle no
in_menu no
display multi
layout Basic
romlist multi
in_cycle no
in_menu no
filter All
filter Favourites
rule Favourite equals 1
display Atari 800
layout coinops
romlist Atari 800
in_cycle yes
in_menu yes
filter All
filter Favourites
rule Favourite equals 1
sound
sound_volume 100
ambient_volume 100
movie_volume 100
input_map
configure Tab
prev_letter LControl+Up
next_letter LControl+Down
configure Escape+Up
prev_letter Joy0 Up+Joy0 Button0
next_letter Joy0 Down+Joy0 Button0
configure Joy0 Up+Joy0 Button1
down Down
down Joy0 Down
left Left
left Joy0 Left
right Right
right Joy0 Right
select Return
select LControl
select Joy0 Button0
up Joy0 Up
up Up
next_display RBracket
edit_game LShift+Tab
add_favourite Z
displays_menu Num8
filters_menu Space
random_game Num3
next_filter V
prev_filter C
back Escape
back LShift
back X
screen_saver P
default back exit
default up prev_game
default down next_game
default left prev_display
default right next_display
general
language en
exit_command
exit_message
default_font FreeSans
font_path /usr/share/fonts/;$HOME/.fonts/
screen_saver_timeout 5
displays_menu_exit yes
hide_brackets no
startup_mode displays_menu
confirm_favourites yes
confirm_exit yes
mouse_threshold 10
joystick_threshold 75
window_mode fullscreen
filter_wrap_mode default
track_usage yes
multiple_monitors no
smooth_images yes
selection_max_step 128
selection_speed_ms 40
move_mouse_on_launch yes
scrape_snaps yes
scrape_marquees yes
scrape_flyers yes
scrape_wheels yes
scrape_fanart no
scrape_videos no
scrape_overview yes
video_decoder software
menu_prompt Displays Menu
menu_layout finalburn
saver_config
param basic_movie Yes
param blank_start_cmd
param blank_stop_cmd
param blank_time 12000000000000
param image_collage No
param movie_collage No
param overlay_art None
param preserve_ar No
param rgb_movie No
param sound Yes
layout_config robospin-nes
param enable_Lmarquee Yes
param enable_VertArt No
param enable_bloom No
param enable_cab robo
param enable_colors yes
param enable_crt No
param enable_frame yes
param enable_image blue
param enable_marquee No
param enable_mlogos Yes
param enable_pointer rocket
param enable_scanline none
param enable_slogos Yes
param enable_static yes
param orbit_art wheel
param transition_ms 25
layout_config cosmo-systems
param enable_colors No
param enable_frame Yes
param enable_ganimate Yes
param enable_gboxart Yes
param enable_gcartart cartridge
param enable_ginfo Yes
param enable_list_type wheel
param enable_mlogos Yes
param enable_pointer emulator
param enable_static No
param orbit_art wheel
param ratio Yes
param sound No
param transition_ms 25
intro_config
param detect_aspect Yes
param layout_rotation none
param play_intro Yes
param video_16x9 Epiclnk.mp4
param video_3x4 Epiclnk.mp4
param video_4x3 Epiclnk.mp4
param video_9x16 Epiclnk.mp4
param video_default Epiclnk.mp4
plugin UtilityMenu
enabled no
plugin KonamiCode
enabled yes
param A
param B
param action configure
param code up,up,down,down,left,right,left,right,B,A
param down
param left
param right
param up
plugin KeyboardSearch
enabled no
param results_mode Show Results
param trigger Custom1
plugin ResFix
enabled no
param emulators
plugin IntroVid
enabled yes
param audio Yes
param filename Epiclnk.mp4
plugin AudioMode
enabled no
-
FOUND THE ISSUE! Sorry for the multiple posts but I think this deserved to be a new posting.
Everything was set up correctly except for the Blank Screen Timeout. I had the following thinking that it would just keep it from turning on for a while. But I'm pretty sure that overwrote a bit somewhere and kept the screen saver from ever starting. Once I changed that value to a more reasonable number, then the videos started working again. Thanks again for all your help I really appreciate it, I am very new at this.
param blank_time 12000000000000
-
I'm glad to hear you fixed your issue. I did think that the long value was unusual but didn't think it was the issue at the time, now I can see why it might fall outside of expected limits.
-
Yeah I assumed there was a safety around those variables. I can't assume that sort of thing with a system I'm not familiar with. That was completely my bad but a good learning experience. Perhaps I can go into the code and add those safeties to keep others from running into the same issue. I need to learn more of the actual code behind it.