Click here to go to the forum index Click here for the home page
 
Author Message

<  TAP and patch development  ~  EPG Navigator source code tweaks

Page 1 of 7
Goto page 1, 2, 3, 4, 5, 6, 7  Next
simonc
Posted: Sat Dec 13, 2008 4:34 pm Reply with quote
Frequent contributor Joined: 12 Apr 2005 Posts: 5640 Location: Cheltenham
I've an update to the EPG Navigator source code. This includes
  • Makefile for the open source toolchain. Note that Dave has only released object files for some of his source, so you'll need to unzip all the .o files.
  • DescExt patch handling, including genres
  • Basic RemExt patch support. V+ and V- punch through to the firmware. P+ and P- are ignored.
I've not added auto detection of the DescExt patch. This could be easily achieved by linking with FirebirdLib, but that's a decision for Dave to make. The configuration screen simply gives options of 0, 1 and 2 for the Description Extender item.

For comparison, Dave's original code can be found on his site


Last edited by simonc on Tue Dec 30, 2008 1:21 am; edited 1 time in total
View user's profile Send private message Visit poster's website
R2-D2
Posted: Sat Dec 13, 2008 5:35 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
simonc wrote:
This could be easily achieved by linking with FirebirdLib
Or just copy the bit of code you need (two very simple functions from the fwpatches section, IIRC).

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website
DGB
Posted: Sat Dec 13, 2008 7:08 pm Reply with quote
Frequent contributor Joined: 24 Jun 2005 Posts: 453
For AllenG

Use
Debug("my message");
with
Config.Debug = TRUE; (in EPG.c)

This will write to the serial port. You can then set Config.Debug = FALSE to kill all the debug messages. Saves having to add/remove the debug prints.

Dave
View user's profile Send private message
AllenG
Posted: Sun Dec 14, 2008 12:39 am Reply with quote
Frequent contributor Joined: 08 Jun 2008 Posts: 117 Location: New Zealand
Thankyou all.

Simon, I have been trying to track down a bug with my '6000 firmware where EPGN sometimes fails to launch when pressing the guide key. I have tracked it down to the code that checks for other taps in epg.c. This code gives false positives when there is no TAP display on screen, also sometimes gives false negatives and allows EPGN to launch when another TAP like UKAS or UKTimers is on screen

// We cannot tell if a TAP is active
// so we have to check the PVR OSD memory
//ShowOSDPixels();

// Pixels at screen centre
sprintf(s,"OSDPixelC 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x",
*OSDPixelC1,*(OSDPixelC1+1),
*OSDPixelC2,*(OSDPixelC2+1),
*OSDPixelC3,*(OSDPixelC3+1)); Debug(s);
// The pixel left most bit has to be 1 for opaque
// so only need to check the left most byte of each pixel
// Must check a few pixels since some may be set to transparent
if(*OSDPixelC1 || *OSDPixelC2 || *OSDPixelC3)
return Param1;


R2D2 suggested that there may some better code for checking that works with '6000 firmwares. Maybe while you're on a roll, you can have a look at that? I'll keep playing, but it's probably a 10 minute job for you Wink

Regards, Allen.

_________________
NZ TF6000PVR ES
Autostart: UK Timers v1.2c, Quickjump v1.73(masterpiece), UKAS v0.73.1, EPGnavigator V6.0.1
Patches: PlayNoCYR [Xp] v5, DescExt [De] v6
Other: LCNforSat vE4 (Experimental), HDFW v2.3, Surfer v0.14, Recording Fixer v1.3, JustEPG v15.3, AutoDel, Memory Dump, Memory Dump (Flash), Tap Commander 1.33, FIS_Test, MemLog v1.03.
View user's profile Send private message
jumbo
Posted: Sun Dec 14, 2008 5:55 am Reply with quote
Frequent contributor Joined: 11 Apr 2005 Posts: 4731
Here's a function from Elle4u's StopExit TAP that checks whether there is anything drawn onscreen:
Code:
int IsAnythingShown(void)
{
   TYPE_OsdBaseInfo osdBaseInfo;               // stores OSD-BaseInfo
   word *_vAddr[576];                  // stores vertical addresses
   dword i;                     // stores loop-variable for building addresses
   dword x;                     // stores x-position for screen-scan
   dword y;                     // stores y-position for screen-scan

   TAP_Osd_GetBaseInfo( &osdBaseInfo );            // get baseadresses of screen-buffer
   for( i=0; i<576; i+=2 )                  // set vertical address
   {
      _vAddr[i] = osdBaseInfo.eAddr + 720*i;
      _vAddr[i+1] = osdBaseInfo.oAddr + 720*i;
   }
   for( y=0; y<576; y+=2 )                  // scan entire screen-buffer
   {
      for ( x=0; x<720; x++ )
      {
         if ((*(_vAddr[y]+x)) != 0)         // if any value then graphics are shown
            return TRUE;            // something is on screen
      }
   }
   return FALSE;                     // nothing is on screen
}

Will this work for you?
View user's profile Send private message
AllenG
Posted: Sun Dec 14, 2008 6:22 am Reply with quote
Frequent contributor Joined: 08 Jun 2008 Posts: 117 Location: New Zealand
jumbo wrote:
Here's a function from Elle4u's StopExit TAP that checks whether there is anything drawn onscreen
Will this work for you?

Thanks Jumbo, I'll try it.

My understanding of C is pretty rudimentary. where do I insert this code, anywhere in EPG.C before the "event handler" and "main" ? and how do I use the Call? Do I just replace
Code:
if(*OSDPixelC1 || *OSDPixelC2 || *OSDPixelC3)
return Param1;

with
Code:
if(IsAnythingShown=TRUE)
return Param1;


Thanks

_________________
NZ TF6000PVR ES
Autostart: UK Timers v1.2c, Quickjump v1.73(masterpiece), UKAS v0.73.1, EPGnavigator V6.0.1
Patches: PlayNoCYR [Xp] v5, DescExt [De] v6
Other: LCNforSat vE4 (Experimental), HDFW v2.3, Surfer v0.14, Recording Fixer v1.3, JustEPG v15.3, AutoDel, Memory Dump, Memory Dump (Flash), Tap Commander 1.33, FIS_Test, MemLog v1.03.
View user's profile Send private message
jumbo
Posted: Sun Dec 14, 2008 6:35 am Reply with quote
Frequent contributor Joined: 11 Apr 2005 Posts: 4731
if ( IsAnythingShown() ) return Param1;

Also make sure you add the main function body to the file towards the top before you call it or you'll get the compiler moaning.


Last edited by jumbo on Sun Dec 14, 2008 6:47 am; edited 3 times in total
View user's profile Send private message
AllenG
Posted: Sun Dec 14, 2008 6:39 am Reply with quote
Frequent contributor Joined: 08 Jun 2008 Posts: 117 Location: New Zealand
Cool. About to try a compile

Thanks.

_________________
NZ TF6000PVR ES
Autostart: UK Timers v1.2c, Quickjump v1.73(masterpiece), UKAS v0.73.1, EPGnavigator V6.0.1
Patches: PlayNoCYR [Xp] v5, DescExt [De] v6
Other: LCNforSat vE4 (Experimental), HDFW v2.3, Surfer v0.14, Recording Fixer v1.3, JustEPG v15.3, AutoDel, Memory Dump, Memory Dump (Flash), Tap Commander 1.33, FIS_Test, MemLog v1.03.
View user's profile Send private message
AllenG
Posted: Sun Dec 14, 2008 7:09 am Reply with quote
Frequent contributor Joined: 08 Jun 2008 Posts: 117 Location: New Zealand
Thanks Jumbo

Compiled and running. Seems to do what its supposed to. The old test used to work 99% of the time too, so I will test it for a while and see what happens.

Regards, Allen.

_________________
NZ TF6000PVR ES
Autostart: UK Timers v1.2c, Quickjump v1.73(masterpiece), UKAS v0.73.1, EPGnavigator V6.0.1
Patches: PlayNoCYR [Xp] v5, DescExt [De] v6
Other: LCNforSat vE4 (Experimental), HDFW v2.3, Surfer v0.14, Recording Fixer v1.3, JustEPG v15.3, AutoDel, Memory Dump, Memory Dump (Flash), Tap Commander 1.33, FIS_Test, MemLog v1.03.
View user's profile Send private message
R2-D2
Posted: Sun Dec 14, 2008 10:35 am Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
As suggested before, FireBirdLib has a more advanced version of that code (isAnyOSDVisible()). But I've never really understood the need, since a TAP should ExitNormal() if it's properly claiming the OSD display (which seems to be the specific case that Allen is saying doesn't work). There are cases where the firmware does a pop-up that cannot be detected by normal means, but there may be simpler checks for the common ones (ToppyState and IsPinShowing). And, finally, isn't there an issue with Masterpiece-like firmwares killing regions in an unexpected way? (Or differently to non-Masterpiece firmwares, anyway.)

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website
DGB
Posted: Sun Dec 14, 2008 7:10 pm Reply with quote
Frequent contributor Joined: 24 Jun 2005 Posts: 453
The last time I looked the TAP get state API call only returned a few of the possible/documented PVR states. And the state for 'TAP running' was not returned. Hence the check on the OSD memory.

But I may be out of date.

Dave
View user's profile Send private message
AllenG
Posted: Sun Dec 14, 2008 7:28 pm Reply with quote
Frequent contributor Joined: 08 Jun 2008 Posts: 117 Location: New Zealand
R2-D2 wrote:
As suggested before, FireBirdLib has a more advanced version of that code (isAnyOSDVisible()).

The code that Jumbo posted seems to have done the trick, at least on my firmware. I'll have a look in firebirdlib for an update to that.

The one liner check that was there before was definitely giving both false positives and negatives.

Regards, Allen.

_________________
NZ TF6000PVR ES
Autostart: UK Timers v1.2c, Quickjump v1.73(masterpiece), UKAS v0.73.1, EPGnavigator V6.0.1
Patches: PlayNoCYR [Xp] v5, DescExt [De] v6
Other: LCNforSat vE4 (Experimental), HDFW v2.3, Surfer v0.14, Recording Fixer v1.3, JustEPG v15.3, AutoDel, Memory Dump, Memory Dump (Flash), Tap Commander 1.33, FIS_Test, MemLog v1.03.
View user's profile Send private message
DGB
Posted: Sun Dec 14, 2008 7:50 pm Reply with quote
Frequent contributor Joined: 24 Jun 2005 Posts: 453
Well done Allen.

But the purist in me says thats 500,000 OSD pixel checks every time a remote key is pressed. Do you see any performance impact from this?

Dave
View user's profile Send private message
R2-D2
Posted: Sun Dec 14, 2008 7:53 pm Reply with quote
Frequent contributor Joined: 18 Dec 2006 Posts: 12148
DGB wrote:
The last time I looked the TAP get state API call only returned a few of the possible/documented PVR states.
It copes fairly reasonable with the exception of "urgent" things like the PIN code prompt and the common (err... now less common?) CYR, but both of those can (I think) be detected fairly cheaply with the code linked above.

If a TAP puts up some GUI then it ought to TAP_ExitNormal() -- i.e. transition from Normal/Normal (0/31) to Normal/MainMenu[?!?!] (0,0) -- and then transition back with TAP_EnterNormal() when its GUI is removed. The only issues I can see with this are those urgent firmware prompts -- the rest of the time the firmware checks first to see if it's in the Normal/Normal state (or the more appropriate one) before splatting its own OSD over things. Indeed, MyStuff exploits this to avoid the "Playback Stopped" message, I think.
Quote:
And the state for 'TAP running' was not returned.
Do you mean State_TAP? That's only used while a TAP is running its TAP_Main(). I don't think there's much point in TAP_EnterNormal() also setting this state, especially if it still cocks things up with the PIN and CYR prompts.

_________________
Troubleshooting -- User Manual -- Dark Side of the Matrix: Firmwares and Patches
View user's profile Send private message Visit poster's website
AllenG
Posted: Mon Dec 15, 2008 12:28 am Reply with quote
Frequent contributor Joined: 08 Jun 2008 Posts: 117 Location: New Zealand
DGB wrote:
Do you see any performance impact from this?
Dave

Hi Dave.

No. EPGN main display comes up with no noticable delay: I havn't timed it but my guess is under half a second?

Has SimonC updated you with the changes he has made for the De patch support etc? I have compiled his changes together with this fix. do you want the updated source so that you can post a new version?

P.S the V6 De patch and EPGN De support works on my Satellite TF6000

Regards, Allen.

_________________
NZ TF6000PVR ES
Autostart: UK Timers v1.2c, Quickjump v1.73(masterpiece), UKAS v0.73.1, EPGnavigator V6.0.1
Patches: PlayNoCYR [Xp] v5, DescExt [De] v6
Other: LCNforSat vE4 (Experimental), HDFW v2.3, Surfer v0.14, Recording Fixer v1.3, JustEPG v15.3, AutoDel, Memory Dump, Memory Dump (Flash), Tap Commander 1.33, FIS_Test, MemLog v1.03.
View user's profile Send private message

Display posts from previous:  

All times are GMT + 1 Hour
Page 1 of 7
Goto page 1, 2, 3, 4, 5, 6, 7  Next

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum