PDA

View Full Version : Using Latest OzTiVo 1.62 image on UK S1 TiVos



Dave Hatt
16-01-2010, 02:07 PM
I've been trying to use the latest OzTiVo (1.6.2 Phillips) image on my UK (Thomson) TiVo. Mostly it works well (certainly better than the time I last tried to set it up 5 or 6 years ago) and the additional features over the UK 2.5.5 image are great. However for me there is still one dealbreaker when it comes to enabling RGB on the SCART inputs.

Whem you use the TiVo myworld interface to set s-video output it successfully switches to RGB output on the TV scart, which is fine and exactly what I wanted. But when I do similar for the input setting from the set top box, it can't handle the RGB signal coming in very well at all. Either the scart input is not wired for s-video (or more likely my set top box doesn't transmit s-video on the scart) so all I can do is leave it set to composite as the s-video setting renders live TV unusable (Black and White and lots of snow/artifacts despite that I have it in PAL mode). The Composite input setting yields a watchable picture, its still only very mediocre due to the limitations of the composite input itself (lots of colour runs/bleeding, loss of sharp edges, dot crawl, etc.)

So what I have is a situation where the US image otherwise works perfectly, with all the menus are output nicely in RGB, but the set top box input signal displays in very poor composite quality rather than the RGB format that the UK image supports easily.

What I suspect I need to do is to somehow force the TiVo to "switch on" RGB input/encoding mode. I suspect that there may be an iicsetw command that will do this on the UK TiVo box, and I've been looking at old threads to undestand how this might work. eg: this old tivocommunity.com thread (http://archive2.tivocommunity.com/tivo-vb/showthread.php?t=230291) However many of the old threads on using iicsetw now seem to have been moved or lost and I cant find anything on what the parameters are. (Note that I did consider modifying Palmod_config to do this, but on closer inspection I think it does not actually do any input mode switching - I haven't actually been able to find the place in the code if it does.)

Has anyone tried to do anything with the iicsetw commands? Particularty around swithcing the input source? Or does anyone have any documentation on the iicsetw commands for the encoder chip, or know how to read the settings from an existing TiVo so that I can determine what they are?

catdog
21-01-2010, 07:35 PM
Do you still want help with this? (I tried the component out mod a while back)

You'll need to find the part number of the video scaler chip for the UK tivo - probably easiest to open it up and look. For the US version it is SAA7114H, so UK is probably SAA71?? (not SAA7128 - that is for the output video).

Dave Hatt
21-01-2010, 09:41 PM
I haven't quite got it working yet, but yes I have identified that on the UK TiVos the input chip is the Phillips SAA7118E. I have found the datasheet and I believe I have identified the correct register to flip it from S-Video to RGB (02H). I think I have also identified the subregister of the chip (0x42). I just haven't quite worked out how to form the command using iicsetw just yet, in particular how to make it address 0x42, but I've only just started looking at that code and ran out of time. I also wonder that when I flip the mode that there might need to be other registers poked as well, but I guess that will come down to some testing.

I guess its very similar to the component output mod, except that I looking to adjust the input chip too. What I did notice while looing at the 7118 datasheet was that the chip does Component *input* as well as RGB input. I'm thinking that after I figure out how to get both RGB input and output going, I might try getting both Component input and output going. Given that every modern TV now supports Component in Australia I feel that this will be quite useful to other people. :) (Certainly on my HD TVs there is a noticable difference from S-Video to Component, which is why I purchased UK TiVos in the first place. I'm sure there would be others who feel the same way.)

petestrash
22-01-2010, 04:57 AM
Cool sounds like your on a plan.

Don't have a UK TiVo handy to confirm your findings and really rusty on iicset, but if the location is 0x42 and register is 02H then the command would be something like iicset 0x42 0x02 0x?? (?? is the correct value for the register). Doesn't really matter too much if you get it wrong, as iicset does not survive a reboot.

You may be able to look at current values for the chip using iicdump 0x42 (can't find a copy of iicdump right now though)

I'm sure a lot of people would appreciate a component input and output option.

Peter.

Ps If you get stuck, you may want to pm thompson (http://forums.oztivo.net/member.php?97-thomson) here, he is the palmod software guru and knows iic programing pretty well.

Dave Hatt
22-01-2010, 07:54 AM
So the sub address appears to be 02h with a value of 110000 binary to put the 7118E chip into what the datasheet describes as MODE5.

So I figure that the command should be as follows:

/var/hack/iicsetw 0x42h 0x2h 48

However this yields precisely no discernable impact that I can see. Now there might be other registers involved (and I have a few suspects) but I figure I must be doing something wrong for it to have no impact whatsoever (and I get the right output from iicsetw to know that it is working in itself).

btw: One thing I am worried about is that the 7118 likely gets reset on channel changes, and perhaps even more frequently. But I was still expecting to see some sort of change, even if fleeting!

catdog
22-01-2010, 10:09 PM
Running with an external STB as the active source on UK2.5.5

#iicget 0x42 0x02
Contents of address 02 is: b1
which appears to be mode 0x31.

swapping to the internal tuner changes it

# iicget 0x42 0x02
Contents of address 02 is: 8f
i.e. mode 0x0F

So I'd say that you are on the correct track as far as changing the mode of that IC goes (although you'll want mode 0x31).

I am happy to dump other register values for you if you need them, although it would appear that it will be a manual process of dumping each register one at a time with iicget! (iicdump wants a linked library that I don't have and just throws the error "BUG IN DYNAMIC LINKER ld.so: dynamic-link.h: 46: elf_get_dynamic_info: Assertion `! "bad dynamic tag"' failed!")

Dave Hatt
23-01-2010, 01:31 AM
Thanks catdog, that was the clue that I was looking for!

I compared the subaddresses between two TiVos, one running UK image in RGB input and one running the US image. Subaddresses 0x02H, 0x29H and 0x90H seem to be the material differences. They also seem to need to be changed in a set order.

So far I have been able to get the US OzTiVo image into RBG input mode with the following:


/var/hack/iicsetw 0x42h 0x90h 0
/var/hack/iicsetw 0x42h 0x29h 192
/var/hack/iicsetw 0x42h 0x2h 177

In my testing I also found that subaddress 0F was different between the two boxes (UK was 37h US was 36h) but somehow this register wont update directly. May not be important, but I'm still looking into it.

Meanwhile I'm still running some tests to see if I've missed anything else --- the picture quality is a vast improvement but there are still a few artifacts and I am going to check everything again in case I've missed a setting. But I'm not ruling out the artifacts being in the input source though (Foxtel Digital). :p

Next step will be to get this automated, and in such a way that survives channel changes! :D

catdog
23-01-2010, 08:01 AM
Ok, so I managed to get iicget to dump all of the registers with tivo configured for RGB input.

Contents of address 01 is: 07
Contents of address 02 is: b1
Contents of address 03 is: 28
Contents of address 04 is: 90
Contents of address 05 is: 90
Contents of address 06 is: 97
Contents of address 07 is: e4
Contents of address 08 is: 18
Contents of address 09 is: 40
Contents of address 0a is: 80
Contents of address 0b is: 48
Contents of address 0c is: 40
Contents of address 0d is: 01
Contents of address 0e is: 01
Contents of address 0f is: 35
Contents of address 10 is: fa
Contents of address 11 is: 00
Contents of address 12 is: 09
Contents of address 13 is: 02
Contents of address 14 is: 10
Contents of address 15 is: 11
Contents of address 16 is: 01
Contents of address 17 is: c2
Contents of address 18 is: 40
Contents of address 19 is: 80
Contents of address 1a is: 00
Contents of address 1b is: 00
Contents of address 1c is: 00
Contents of address 1d is: 00
Contents of address 1e is: 02
Contents of address 1f is: 81
Contents of address 20 is: 00
Contents of address 21 is: 00
Contents of address 22 is: 00
Contents of address 23 is: 00
Contents of address 24 is: 90
Contents of address 25 is: 90
Contents of address 26 is: 00
Contents of address 27 is: 00
Contents of address 28 is: 00
Contents of address 29 is: c0
Contents of address 2a is: b1
Contents of address 2b is: 60
Contents of address 2c is: 5d
Contents of address 2d is: 00
Contents of address 2e is: 00
Contents of address 2f is: 00
Contents of address 30 is: 00
Contents of address 31 is: 00
Contents of address 32 is: 00
Contents of address 33 is: 00
Contents of address 34 is: 00
Contents of address 35 is: 00
Contents of address 36 is: 00
Contents of address 37 is: 00
Contents of address 38 is: 00
Contents of address 39 is: 00
Contents of address 3a is: 00
Contents of address 3b is: 00
Contents of address 3c is: 00
Contents of address 3d is: 00
Contents of address 3e is: 00
Contents of address 3f is: 00
Contents of address 40 is: 00
Contents of address 41 is: ff
Contents of address 42 is: ff
Contents of address 43 is: ff
Contents of address 44 is: 88
Contents of address 45 is: 88
Contents of address 46 is: 88
Contents of address 47 is: 88
Contents of address 48 is: 88
Contents of address 49 is: 88
Contents of address 4a is: 88
Contents of address 4b is: 88
Contents of address 4c is: 88
Contents of address 4d is: 88
Contents of address 4e is: 88
Contents of address 4f is: 88
Contents of address 50 is: 88
Contents of address 51 is: 88
Contents of address 52 is: 88
Contents of address 53 is: 88
Contents of address 54 is: 88
Contents of address 55 is: ff
Contents of address 56 is: 88
Contents of address 57 is: ff
Contents of address 58 is: 27
Contents of address 59 is: 47
Contents of address 5a is: 03
Contents of address 5b is: 03
Contents of address 5c is: 00
Contents of address 5d is: 3e
Contents of address 5e is: 0a
Contents of address 5f is: 00
Contents of address 60 is: 40
Contents of address 61 is: 30
Contents of address 62 is: 7f
Contents of address 63 is: 00
Contents of address 64 is: 00
Contents of address 65 is: 00
Contents of address 66 is: 00
Contents of address 67 is: 20
Contents of address 68 is: 00
Contents of address 69 is: 00
Contents of address 6a is: 00
Contents of address 6b is: 00
Contents of address 6c is: 00
Contents of address 6d is: 00
Contents of address 6e is: 00
Contents of address 6f is: 00
Contents of address 70 is: 00
Contents of address 71 is: 00
Contents of address 72 is: 00
Contents of address 73 is: 00
Contents of address 74 is: 00
Contents of address 75 is: 00
Contents of address 76 is: 00
Contents of address 77 is: 00
Contents of address 78 is: 00
Contents of address 79 is: 00
Contents of address 7a is: 00
Contents of address 7b is: 00
Contents of address 7c is: 00
Contents of address 7d is: 00
Contents of address 7e is: 00
Contents of address 7f is: 00
Contents of address 80 is: 10
Contents of address 81 is: 00
Contents of address 82 is: 00
Contents of address 83 is: 01
Contents of address 84 is: a0
Contents of address 85 is: 01
Contents of address 86 is: c0
Contents of address 87 is: 01
Contents of address 88 is: e8
Contents of address 89 is: 00
Contents of address 8a is: 00
Contents of address 8b is: 00
Contents of address 8c is: 00
Contents of address 8d is: 00
Contents of address 8e is: 00
Contents of address 8f is: f3
Contents of address 90 is: 40
Contents of address 91 is: 08
Contents of address 92 is: 00
Contents of address 93 is: 00
Contents of address 94 is: 00
Contents of address 95 is: 00
Contents of address 96 is: d0
Contents of address 97 is: 02
Contents of address 98 is: 16
Contents of address 99 is: 00
Contents of address 9a is: 22
Contents of address 9b is: 01
Contents of address 9c is: 20
Contents of address 9d is: 02
Contents of address 9e is: 20
Contents of address 9f is: 01
Contents of address a0 is: 01
Contents of address a1 is: 00
Contents of address a2 is: 00
Contents of address a3 is: 00
Contents of address a4 is: 80
Contents of address a5 is: 40
Contents of address a6 is: 40
Contents of address a7 is: 00
Contents of address a8 is: 4b
Contents of address a9 is: 05
Contents of address aa is: 00
Contents of address ab is: 00
Contents of address ac is: a5
Contents of address ad is: 02
Contents of address ae is: 00
Contents of address af is: 00
Contents of address b0 is: 00
Contents of address b1 is: 04
Contents of address b2 is: 00
Contents of address b3 is: 04
Contents of address b4 is: 01
Contents of address b5 is: 00
Contents of address b6 is: 00
Contents of address b7 is: 00
Contents of address b8 is: 00
Contents of address b9 is: 00
Contents of address ba is: 00
Contents of address bb is: 00
Contents of address bc is: 00
Contents of address bd is: 00
Contents of address be is: 00
Contents of address bf is: 00
Contents of address c0 is: 00
Contents of address c1 is: 08
Contents of address c2 is: 00
Contents of address c3 is: 00
Contents of address c4 is: 10
Contents of address c5 is: 00
Contents of address c6 is: d0
Contents of address c7 is: 02
Contents of address c8 is: 00
Contents of address c9 is: 00
Contents of address ca is: 22
Contents of address cb is: 01
Contents of address cc is: d0
Contents of address cd is: 02
Contents of address ce is: 20
Contents of address cf is: 01
Contents of address d0 is: 01
Contents of address d1 is: 00
Contents of address d2 is: 00
Contents of address d3 is: 00
Contents of address d4 is: 80
Contents of address d5 is: 40
Contents of address d6 is: 40
Contents of address d7 is: 00
Contents of address d8 is: 00
Contents of address d9 is: 04
Contents of address da is: 00
Contents of address db is: 00
Contents of address dc is: 00
Contents of address dd is: 02
Contents of address de is: 00
Contents of address df is: 00
Contents of address e0 is: 00
Contents of address e1 is: 04
Contents of address e2 is: 00
Contents of address e3 is: 04
Contents of address e4 is: 01
Contents of address e5 is: 00
Contents of address e6 is: 00
Contents of address e7 is: 00
Contents of address e8 is: 00
Contents of address e9 is: 00
Contents of address ea is: 00
Contents of address eb is: 00
Contents of address ec is: 00
Contents of address ed is: 00
Contents of address ee is: 00
Contents of address ef is: 00

Dont worry about the value for address 0x0F - the datasheet says it is the chrominance gain, but it is configured as automatic (so you are just reading the current value that it has automatically set).

Dave Hatt
23-01-2010, 01:37 PM
Wow, that saved me a lot of time to dump them all myself! :) Did you write a TCL script or similar to automate the process, or just do them one at a time manually with iicget?

I'm now going to go through and check these against the 3.0 register values on the OzTiVo 1.6.2 image and then investigate the differences from there. If you had any script that could speed up the iicget process that would help!

When I get the definitive list of changes I will be having a look at where to put them to make them permanent (I'm thinking palmod_config?).

catdog
23-01-2010, 05:44 PM
I dont think I'd ever have the patience to do them all manually. Here is the TCL script I used

!/tvbin/tivosh

for { set i 1 } { $i <= 239 } { incr i } {

set res [exec iicget 0x42 $i]
puts $res

}


Regarding how to make the changes permanent, I don't think palmod is used if you are running a UK tivo (although I could be wrong). Following another recent thread, I think it uses UKchan30.o instead. I guess if that is the case, you could make the changes there and recompile.

Dave Hatt
24-01-2010, 12:04 AM
Agreed, on the UK TiVos with UK image there is no palmod.o. However because I am now using the US 3.0 OzTiVo image I figured that it would be using the palmod.o file though.

Not that I have figured out how to update or decompile palmod.o yet. Looks like my next challenge!

Meanwhile thanks to catdog's script I have a definitive list of the relevant register value differences:



UK Image 2.2.5 _________________ US Oztivo 3.0 (1.6.2) Image ____ Comment
Contents of address 02 is: b1 __ Contents of address 02 is: 81 __ Analog Input Control - RGB Mode31
Contents of address 06 is: 97 __ Contents of address 06 is: 65 __ Horizontal sync start
Contents of address 0e is: 01 __ Contents of address 0e is: 81 __ Chrominance Control
Contents of address 0f is: 35 __ Contents of address 0f is: 37 __ Chrominance Gain Control
Contents of address 29 is: c0 __ Contents of address 29 is: 00 __ Component delay/fast switch control
Contents of address 67 is: 20 __ Contents of address 67 is: 00 __ Reserved
Contents of address 9c is: 20 __ Contents of address 9c is: e0 __ Horizontal output window length
Contents of address 9d is: 02 __ Contents of address 9d is: 01 __ Horizontal output window length
Contents of address a8 is: 4b __ Contents of address a8 is: 00 __ Horizontal luminance scaling increment
Contents of address a9 is: 05 __ Contents of address a9 is: 06 __ Horizontal luminance scaling increment
Contents of address ac is: a5 __ Contents of address ac is: 00 __ Horizontal chrominance scaling increment
Contents of address ad is: 02 __ Contents of address ad is: 03 __ Horizontal chrominance scaling increment

And now I can confirm that the following commands set the TiVo into RGB input mode:


/var/hack/iicsetw 0x42h 0x02h 177
/var/hack/iicsetw 0x42h 0x06h 151
/var/hack/iicsetw 0x42h 0x0eh 1
/var/hack/iicsetw 0x42h 0x29h 192
/var/hack/iicsetw 0x42h 0x9ch 32
/var/hack/iicsetw 0x42h 0x9dh 2
/var/hack/iicsetw 0x42h 0xa8h 75
/var/hack/iicsetw 0x42h 0xa9h 5
/var/hack/iicsetw 0x42h 0xach 165
/var/hack/iicsetw 0x42h 0xadh 2

The colour and quality all seem fine with these settings, however the left hand side of the picture seems to get cut off (about 10%). Possibly this is the Horizontal Shift problem mentioned in the Palmod User Guide.

And of course the changes don't survive a channel change on the TiVo. I'm wondering what would be the best approach here: inserting these commands in palmod or patching fpga7114.o.

Dave Hatt
24-01-2010, 05:23 PM
Update: I found that just the following are suffient to enable RGB mode:


/var/hack/iicsetw 0x42h 0x02h 177
/var/hack/iicsetw 0x42h 0x29h 192


This doesn't seem to trigger the horizontal shift issue. However I am also now using LJ's fpa7114.o file from here (http://www.ljay.org.uk/tivoweb/tivo_fpga.html). The picture quality is far better with no artifacts, and so are the colours, but not sure about whether they are optimal just yet.

I tried patching the fpa7114.o file, finding the relevant offset location from this (http://www.tivocommunity.com/tivo-vb/archive/index.php/t-128288.html) thread, however I haven't quite found registers that survive a channel change as yet. I'm wondering if the fpa7114.0 module only gets read on boot up, and perhaps something else such as palmod is overwriting the values on channel change. More investigative work to do here! :)

Dave Hatt
27-01-2010, 03:17 AM
I think I have finally found the answer! The abovementioned iicsetw commands work when executed, but don't survive channel changes or reboots. Hacking the values into fpa7114.o doesn't have any impact either (in fact from testing I suspect that the values *do* get loaded, but then get overwritten by tivosh).

What did work was to execute the setConn.tcl script:


[TiVo [p0] /var/hack]# /var/hack/setConn.tcl 7 5
Connector changed from 5 to 7
SignalType changed from 5 to 5

Connector type 7 is Scart, and 5 is s-video. Executing this script puts the TiVo into RGB mode on the scart input.

What led me to this discovery was this (http://www.oztivo.net/pipermail/oztivo/2004-March/011400.html.gz) old post on the mailing list from 2004 by John Graham. Just in case, however, I will list the tcl script again here:


------------------start setConn.tcl---------------
#!/tvbin/tivosh
#
# thanks to Phil Hunt for this script

# source of RetryTransaction function
tvsource $tcl_library/tv/mfslib.tcl

proc FIXUP {db conn st} {
try {
RetryTransaction {
set setup [ db $db open /Setup]
set s1 [ dbobj $setup get Source 0]
set oconn [ dbobj $s1 get Connector ]
set ost [ dbobj $s1 get SignalType ]

dbobj $s1 set Connector $conn
puts "Connector changed from $oconn to $conn"

dbobj $s1 set SignalType $st
puts "SignalType changed from $ost to $st"
}
} catch errCode {
puts "Failed, errCode=($errCode)"
return 0
}
return 1
}

set db [dbopen]
set conn [lindex $argv 0]
set st [lindex $argv 1]
if { $conn == "" || $st == "" } {
puts "Usage: setConnector connectorValue signalTypeValue"
} else {
FIXUP $db $conn $st
dbclose $db
}
------------------end setConn.tcl---------------

Note that I see reference to where UK TiVos and Scart should automatically be detected during initialization, however it either isn't working correctly, or it still needs to be run once manually when the UK TiVo is first set up with the 3.0 image. Maybe another way to detect a UK TiVo during initialisation is needed.


Now that I have RGB working I have moved on to putting the TiVo into Mode 0 (720 lines instead of the default 576 or 480) and the increase in quality with this and RGB is just amazing. :D Note that I ended up repatching the fpa7114.o module as its a newer version on the 3.0 image so the copy listed with the instructions here (http://www.ljay.org.uk/tivoweb/tivo_fpga.html) is out of date and I wasn't sure if it was adding to my troubles! I am attaching this updated module for those who want to use it themselves. Basically follow the instructions at LJ's (http://www.ljay.org.uk/tivoweb/tivo_fpga.html) website, but use the attached file instead. Note this file simply changes the horizontal shift problem from putting the TiVo into Mode 0. See also the thread on changing resources to set Mode 0 recordings here (http://www.tivocommunity.com/tivo-vb/showthread.php?s=&threadid=128288&perpage=20&pagenumber=1).

At this point I haven't done any further investigation into setting Component input for the TiVo. The 7118 chip in the UK TiVo is certainly capable of Component input, and I think the following commands will activate it:


/var/hack/iicsetw 0x42h 0x02h 0xa1

However I don't know of any way to make it survive channel changes. Perhaps there is another mode that can be set through a modification of the setConn.tcl to set the correct input, but I suspect it might not be quite that easy! Or if another way can be found to execute the iicsetw command after a channel change then this would likely work well.