Idea: PXML enhancement to define TV-Out type (main layer or overlay)


hmc

Active Member
Joined
Dec 19, 2011
Messages
787
Location
Bavaria, Germany
 

Hi guys,

 

it happens often to me, that I don't remember, which kind of TV-Out I have to use for a specific application, game or emulator.

Especially if you only occasionally use a program, remembering may be hard.

 

So what about a PXML specification and pndlib implementation enhancement, that resides in each <application> area of a PXML, that denotes, which kind of TV-Out needs to be used for the application? 

The pndlib would then take care that TV-Out is switched to the correct mode after the application has been started (ideally no matter, if TV-Out has been activated before launching the application or not; if not, the mode is applied once TV-Out is activated).

 


Code:
<application>
  <tvout_mode>mainlayer</tvout_mode>
</application>

or

 


Code:
<application>
  <tvout_mode>overlay</tvout_mode>
</application>

One problem could be:

pndlib can probably take care about activating the correct mode when launching an application, but if you switch between different applications, that are already running, switching tv-out mode cannot be done via pndlib I guess. That's a situation when you still have to adjust tv-out mode manually. 

But I guess this is no too common usecase either.

 

 
 
Good idea, but things that require all PNDs on the repo to be updated are unlikely to happen in practice anytime soon.

Wouldn't it be possible somehow to auto-detect the correct layer? It's better if we can solve this with a firmware update instead of having to update the entire repo.
 
^ Well can't those tags be counted as optional elements in the schema? If they exist fine, if the don't fine as well?.. 

About how a this would be handled, if the tags don't exist just assume it's main layer or ignore changing the tvout config, if they do exist just follow what's in the tags.. I would think that would be fairly simple to implement without having to retroactively change all the PNDs.
 
Last edited by a moderator:
Heh, I had the same idea a few days as well :)

As an optional tag would be fine, as it won't break old apps and devs could easily update them.

If the tags don't exist, it should NOT assume it's main layer, as that would break all current games using notaz' SDL.

If the tags don't exist, don't do anything.
 
Yes, my thought was also that those tags should eb optional. Sorry, should have mentioned that.

Another was to handle it could be:

If tag does not exist, assume main layer (or overlay?).

(I actually don't know which is better. What is used more often? It seems to me that the newer emulator ports in the repo tend to use main layer, while older ones use the overlay; don#t know about the statistics for games....)

okay, ED, scratch my idea about default main layer. ;-) (your reply arrived just when I hit "Post" for my reply)
 
Really, it could be added without change to libpnd -- just a _specification change_.

ie: libpnd does a lot of stuff, but mostly its there to offer pnd services.. get things running, etc. It doesn't really concern itself with some of the metadata; ex: the package info is not important to libpnd, so parsing and using it is optional and 'not yet added' (I think, I might have and forgotten.)  Menus may care, etc. (Minimenu does not, and I don't think I aded it to libpnd anyway for minimenu to use; it probably shoudl be added to libpnd, but anyway :)

So some apps require heavy validation of the PXML; libpnd on the other hand errs on the side of 'getting stuff to work'; result -- the repo cares abotu correctness (so that we can force developers to correct PXML), but the runtime system allows errors in many ways (so that the user can just run apps, broken or otherwise.) Best user experience.

So libpnd will safely ignore unknown XML tags in there,.

As such.. change the specification, change the XML validator in the libpnd distribution, and change the repo to require it _ongoing_ if we so desire (or just leave it optional.)

--> Then we change the tv-out script to grep for the term in the PXML and do its best default guess (or use command line arguments.)

Strikes me as not too hard to add (without thinking about it much :)

jeff
 
Hi Jeff,

but don't we need a trigger? How should the TV-Out script know, when to look for a setting, and in which PXML?

I thought this is wht libpnd should do here: trigger setting change (if necessary), when the user starts a PND.
 
I see what you mean.. when an app is executed, automatically trigger off the tv-out?

I guess theres a couple scenarios --

On launch request..

i) If tv-out is not already on .. don't do anything

ii) if tv-out is in fact already on .. if PXML has a setting, then invoke tv-out script to change to that setting

In that case, something could be added to pnd_run.sh I imagine (as that is pretty much the lowest custom level of libpnd.. the C code etc alll comes down to invoking pnd_run.sh to do the mount, execute, unmount, etc.)

Still, mostly a spec change, a validator change (and repo change to match), and pnd_run.sh change.

I don't sleep much, so I'll leave the decision for yea/nay to the masses ;) all lin favour of automated tv-out mode changes.. yea/nay!

jeff
 
For i) (TV-Out not already on) I'd not do nothing, but instead write the desired setting to some /tmp File, and as soon as TV-Out is activated, the TV-Out script grabs that value and uses it.

Using pnd_run is a good idea, I think.
 
Back
Top