Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - j.e.f.f

Pages: [1]
1
General / Re: All Games List?
« on: October 10, 2020, 02:15:03 AM »
As for identifying systems in romlists you can either name the emulator.cfg exactly like the system (e.g. nintendo_entertainment_system.cfg, sega_genesis.cfg) or use any header/ field which is not being utilized like extra, buttons, clone_of etc. The headers deal exclusively with MAME so most fields are not usable elsewhere.

This is what I ended up doing,  but in my case it was the prefix of the emulator, as in many cases I'm using multiple emulators for a system.
e.g.:

Code: [Select]
Arcade - FB Alpha.cfg
Arcade - FBNeo.cfg
Arcade - MAME 2003.cfg
etc.

Then I set global filters for each system like
Code: [Select]
Emulator contains Arcade
Of course I didn't fully think this through... as I ended up with overlap between a few systems:  For example, I named Nintendo emulators
Code: [Select]
NES - <emulator>.cfgand Super Nintendo emulators
Code: [Select]
SNES - <emulator.cfg>
When I filtered with `Emulator contains NES` it also picked up my SNES games.  (Also a similarly with `Sega` and `Sega Genesis`).  Rather than going through the process or renaming those emulators again and doing a search and replace all over again in my romlists, I ended up making the rules a bit more complicated than they needed to be.  For Nintendo, I needed to do two rules:
Code: [Select]
Emulator contains NES
Emulator not_contains SNES
::)

System Identifier is used also to get the "Info.System" data and the [System] magic token.

This is how I plan on using it on the all games list so that multiple listings of the same game can be distinguished from each other


In any case, it all works now!  Thanks for everyone's help.

2
General / Re: All Games List?
« on: October 09, 2020, 05:44:22 AM »
When you define an emulator there's a field called "System Identifier", I use that to add System information to my romlists. I just put the name of the layout there, and when I generate merged romlists this is carried to the whole list so in some way it is transferred to the romlist. Just try to see where it's placed in your romlists.
I use that field in my layout to get System information for each game, so in a multi-system list one can sort or filter by system etc.

Odd... All of my configured emulators have the System Identifier field filled, but none of my romslists, which were all initially generated by scanning, contain this information.  There's not even a column header defined for it. There is also no option for me to filter on it in the global filters. Is this something that an older version supported but the newest does not? I'm on version 2.6.1 (I believe, can't figure out where to verify this, but I downloaded and installed it in April, and I see that 2.6.1 was released in January.  So pretty sure I'm on 2.6.1)

3
General / Re: All Games List?
« on: October 08, 2020, 08:50:16 AM »
I don't suggest using the whole romlist "as is" in a display and add filters to that, because it will be slow in launch and update, but with "default filters" everything will be pretty fast

My thought was to use the master gameslist in its entirety in one display primarily so that I can search against every game included in AM.  Every other Display would represent a "system" (e.g., NES, Genesis, etc.), and it would be the master list filtered list to that particular system

When you say "default filters" are you referring to the global filter you specify in the Display config?  Or something else?  I don't plan on using dynamic filtering in my Displays... none of my current romlists are all that long (about 100-150 games per system, max, even in my Arcade folder). I have no desire to include all 6000+ mame roms, for example, so the ability to filter beyond system, or favourites is not something I need.

Which leads me to my current problem... There is currently nothing in any given rom list to indicate what system it belongs to -- I'm currently using the separate romlists to categorize a game into a particular system. I don't want to filter on emulator, because there are plenty of games that need a specific emulator that is different than most of the games for the particular system, and in some cases, I'm using the same emulator across multiple systems (e.g., PicoDrive for both Sega Mastersystem and Genesis).  Also, I try out different emulators all the time, so it's a bit too transient of a field to filter against, and would require constant maintenance to keep the Display filters up to date.  I'd like to be able to filter on some other field.

Of all of the possible columns in all my romlists, the "Extra" column is empty in all cases.  If I use that field to indicate the System the game belongs to, will that break anything else?  What is the "Extra" column normally used for in AM?

Alternatively, can I just add a column to the rom list and use that?  Will it be available to set a filter against within AM?

Thanks!
 - Jeff

4
General / Re: All Games List?
« on: October 08, 2020, 07:39:41 AM »
Thanks @progets

I was afraid that that was going to be the only option (was hoping there was an automatic way).  I've heavily modified my games lists, so re-scanning will undo all the work I did.  I'll try manually combining all of the games into a single list using a text editor instead.

Nice that I can then filter the master list for each Display, so at least I won't have to manage both the master list and also the individual games lists.

5
General / All Games List?
« on: October 07, 2020, 02:40:46 PM »
Currently I have a separate Displays, each with its own associated games list for each system (e.g., one for NES, one for Neo Geo, etc).  I’d like one more Display that combines all games from all other displays. Is this possible?

Thanks!
 - Jeff

6
Scripting / Re: Number of games in the "Display menu"
« on: October 05, 2020, 02:30:12 AM »
I did this in my theme by loading the contents of the associated gameslist file and counting the lines. Read up on Squirrel's `file()` and `readblob()` functions.  I don't have the code to hand as I am on my work laptop, but I remember it not being very difficult once I learned how these functions worked.

7
Scripting / Thoughts on a global search plugin
« on: October 05, 2020, 02:21:22 AM »
Hello.  I'm. thinking about how I might create a plugin/module for Attract Mode that allows me to search for any game across all of my active games lists.  Generally I'd want it to work as follows:

  • Index all games lists that are currently active in AM (ideally without needing to create a separate "All Games" list for the purpose of searching)
  • Make search available anywhere (e.g., with a configurable custom hot key)
  • Search is operable by both an attached keyboard as well as with a game controller
  • Search automatically lists results as you type, no need to click on an explicit "search" button, and not by scrolling the current display.  I want to results list to be completely independent of any Display.
  • Results list is includes various information available, such as system, year rating, images, video, etc.
  • Game can be launched from results list OR associated display can be raised with the game preselected
  • Search is preserved as I navigate away from search and back.  What I mean by this is that if I search for, say, "MARIO," a number of results will be presented.  If selecting a result takes me to the game in its associated display, and it turns out not to be the one I was looking for, I'd like to return to the search with my previous search term, result list, and navigation position preserved.
  • Search is preserved, as above, even if I launch a game and return to AM.
  • Since all keyboard keys would be available to type in a search term, I'd want to make sure that other keyboard shortcuts are temporarily suppressed while search is active.[\li]
I'm not an expert in Squirrel, but pretty good with JavaScript and having created my own layout, I feel fairly comfortable attempting to code this myself. I'm more unsure about what is available and possible in AM's environment, in particular, indexing all games and preserving the search function's screen state as I navigate away from it and back.  Ideally I'd like it to be preserved for as long as AM is running, or until I take an action to explicitly clear it.

Before I jump in, does anyone have any thoughts on my points above and how I might approach this from a conceptual standpoint?

Of course, I'm more than willing to share this once it's working, as I believe this a feature many of us will want, and as always, any and all help is greatly appreciated.

Thanks!
 - Jeff

8
Scripting / Animate transitions between displays
« on: July 15, 2020, 03:39:05 AM »
Hello.  I've been looking for a way to animate the transition from one display to another.  What I would like is for when I press the RIGHT button on the D-Pad, the current display animates in its entirety to the left off screen, while the new display animates in from the right.  Similarly, a press of the LEFT key animates the current display away to the right, and the new display animates in from the left.  Essentially, the way emulationstation works by default.

My questions are as follows:

1. Is there an automated way to do this?  Maybe a setting in Attract Mode that I've overlooked?  A clever module that someone has written to take care of this?

2. If not, is there a way to group items in the theme so that I can animate them in one go?  Say I make a "container" called screen, and add all of the UI elements -- wheel, snap video, cartridge, boxart, background, etc. to this container. Then on keypress RIGHT or LEFT I can simply animate the "screen" object as I see fit and everything just animates with it.

3. As above, how do I then tell the next display which side to animate in from?  Is there a way to have variables that persist from one display to the next?  I've written a single layout theme for all my displays, so they all share the same code base.

As always, all help is appreciated!
 - Jeff

9
Scripting / Re: Possible to delay starting an emulator?
« on: May 27, 2020, 10:43:34 AM »
Thanks for this plugin tip!

I managed to get it t work anyway... the trick was I couldn't get the animation to work during the  ToGame transition.  So I explicitly used the ToGame transition call back to manually set an alpha value to my veil object,  Code looks like this:

Code: [Select]
function drawVeil() {
log("Drawing veil");
local veil = fe.add_image("veil.jpg", 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
veil.alpha = 0;

//fade in animation - not used. Explicitly set alpha during ToGame transition instead.
local fadeInVeil = {
property = "alpha",
start = 0,
end = 255,
time = L_CONF.TRANSITION_VEIL_FADE_ANIM_DURATION,
onStart = function(anim) {
log("fading in veil");
}
}

//fade in animation
local fadeOutVeil = {
when = Transition.FromGame,
property = "alpha",
start = 255,
end = 0,
delay = L_CONF.TRANSITION_RETURN_FROM_GAME_VEIL_FADE_ANIM_DELAY,
time = L_CONF.TRANSITION_VEIL_FADE_ANIM_DURATION
}
animation.add( PropertyAnimation(veil, fadeOutVeil) );

function toFromGameTransition( ttype, var, transition_time )
{
switch(ttype) {
case Transition.ToGame:
if(transition_time < L_CONF.TRANSITION_VEIL_FADE_ANIM_DURATION) {
local newAlpha = floor( ((transition_time * 1.0) / (L_CONF.TRANSITION_VEIL_FADE_ANIM_DURATION * 1.0)) * 255);
veil.alpha = newAlpha;
} else if (transition_time >= L_CONF.TRANSITION_VEIL_FADE_ANIM_DURATION) {
return false;
}
return true;
break;
}
}
fe.add_transition_callback("toFromGameTransition");

}

The callback works such that it won't do the default action if the callback returns true.  When that happens, the callback is called again, and will be repeatedly called while it returns true.  Kind of like an impromptu tick event handler.  So basically I adjust the value of the veil's opacity until the time is reached, then I return false, and the game loads.

For the return trip, the animation works just fine, as control has been passed back completely to the layout by the time I run the fade in.  I put a bit of a delay in the fade back in because the fade in actually happens a bit too quickly.

Mission accomplished, but I still haven't figured out squirrel's equivalent to JavaScript's setTimeout function  :P

10
Scripting / Possible to delay starting an emulator? SOLVED
« on: May 27, 2020, 03:46:26 AM »
I've noticed with a couple of emulators I'm using (Mednafen via RetroArch, for example) sometimes it takes a considerable amount of time to start, and the Attract interface just appears locked during that time.  I'd like to be able to fade down the interface before the initiating the emulator call to provide a little bit of feedback that something is happening instead of it looking like Attract has frozen

So far I have code that looks like this:

Code: [Select]
function drawVeil() {
log("Drawing veil");
local veil = fe.add_image("veil.jpg", 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
veil.alpha = 0;

//fade in animation
local fadeInVeil = {
when = Transition.ToGame,
property = "alpha",
start = 0,
end = 255,
time = L_CONF.TRANSITION_VEIL_FADE_ANIM_DURATION,
onStart = function(anim) {
log("fading in veil");
}
}

//fade in animation
local fadeOutVeil = {
when = Transition.FromGame,
property = "alpha",
start = 255,
end = 0,
time = L_CONF.TRANSITION_VEIL_FADE_ANIM_DURATION
}

animation.add( PropertyAnimation(veil, fadeInVeil) );
animation.add( PropertyAnimation(veil, fadeOutVeil) );

function toFromGameTransition( ttype, var, transition_time )
{
switch(ttype) {
case Transition.ToGame:
log("ttime " + transition_time);
break;
}
}
fe.add_transition_callback("toFromGameTransition");

}

The problem is that the hand off to the emulator happens immediately before the fade in can happen.  I have a Transition callback in place, and I was hoping I could add something in there to delay the hand off in order to give the UI enough time to update (i.e. complete fading in the veil).

1) I can't figure out what the function call is to create a timer in squirrel.  I'm looking for the equivalent of javascript's setTimeout function.
2) How do I first cancel the handoff, then reinitiate it after the timer fires?
3) Is there a better approach to achieve what I'm after?

All help is appreciated.

Thanks!
 - Jeff

11
Scripting / Re: Layout settings per instance?
« on: April 29, 2020, 04:20:50 AM »
For anyone who has been looking at this thread, I have taken a different approach. 

I get the name of the current display:
Code: [Select]
local displayName = fe.list.name;
The try to match it against an object that associates display names with themes I define:
Code: [Select]
local ThemesList = {
"Nintendo NES": "nes",
"Super Nintendo": "snes",
        "<display name x>" : "<them name y>"
}

It means some manual configuration instead of picking it in the UI, but it works

12
Scripting / Layout settings per instance?
« on: April 27, 2020, 01:55:35 AM »
I'm trying to create a single layout for all my displays, but can be themed for each individual display (e.g.: NES Display gets different artwork than SNES display). I'm trying to do it this way so that I don't have a copy of my layout code for EACH display I set up... I'd like to have all the code in one place. I also want each of my displays to have a consistent layout.  The existing themes that others have made are great, but there are plenty of small differences that make the front end look patched together when you move from one display to another.

Thus far I have approached it as follows:
 - Common code is in layout.nut
 - theme-specific resources are in a subfolder named ./themes/<theme_name>
 - A configuration that allows you to select the <theme_name> from Attract mode's Display configuration

My thought was that I could just set all of my displays to use the same layout, and select a different theme for each, but I have discovered that changing a theme setting for one display changes it for ALL displays that use the layout.

Is it possible to designate a configuration option to be display specific?  Or is there a different way I can approach this to achieve what I want?

Thanks!
 - Jeff

13
General / Re: Video decoder on Mac?
« on: April 26, 2020, 02:38:09 AM »
I think I've got the video problem licked! I noticed most of the videos were 60fps which is totally unnecessary for what we need, and more difficult for the computer to render in software. I transcoded all of my videos using handbrake to constant 30fps and I'm no longer having any video issues.  CPU usage hovers around 13-15%, sometimes spikes to 20.  Screensaver looks great too. Side by side, I can't tell the difference between the original and the transcoded version. It looks just as good!

If anyone is interested, I can share the settings I used in Handbrake




14
General / Re: Video decoder on Mac?
« on: April 23, 2020, 09:43:17 AM »
Do you know if it struggles with any video or are some codecs better than others?  If I were to transcode everything to quicktime, for example can I expect better performance?

15
General / Video decoder on Mac?
« on: April 23, 2020, 09:13:59 AM »
I'm using Attract Mode on MacOS High Sierra -- repurposed an old iMac as a dedicated retro gaming console.

I'm having some sporadic video playback problems.  Sometimes snaps play back fine, other times they don't play or they play really choppy.  When screensaver mode is enabled, video performance is especially poor.

I've noticed there is a configuration for video decoder, but I don't have any options.  How do I add additional encoders?  How do I ensure hardware acceleration is being used?  Admittedly the mac is 10 years old, but it was specced to the gills when I first bought it, and it should be more than beefy enough to playback 640x480 video without issue.

Pages: [1]