Vista TV Pack introduced a new database file for storing the electronic program guide (EPG) and the device configurations for Media Center. This had the unfortunate effect of disabling the well-know registry hack used to enable the reception of over-the-air high definition ATSC broadcasts in Canada. Windows 7 uses the same
mcepg1-0-0.db database and to-date still lacks support for Canadian ATSC reception.
I hope to take an EPG file setup for a Canadian location and insert the parameters needed to enable my digital tuner and define the DTV channels. To that end, I'm starting with an “empty” database and trying to replicate a bare-bones US setup for ATSC reception only. So far, I have been able to insert almost all of the parameters except for one.
A key table in the database is
MergedLineup. I believe it identifies the cable channel lineup and the ATSC lineup used for the merged EPG. I believe the
channel field links this table with the
MergedChannels table which lists all of the available cable/ATSC channels. Unfortunately, while they are very similar to the tables,
Channels and
Lineup, they do not link in the same way.
This is what I've done so far.
Delete
mcepg1-1-0.db. You may have to end the mcglidhost process first. Start 7MC. Copy and save the file it created:
C:\ProgramData\Microsoft\eHome\mcepg1-1-0.db
This is the “empty” EPG database. (approximately 1,684 kb)
Next Set up TV Signal as if in the US but do not agree to use the EPG. Do not accept the Program Guide Terms of Service. Do not install PayReady. Allow 7MC to download settings for your region and examine TV signals. Configure the TV signal manually to select only the settings for the digital tuner. Scan for over-the-air HDTV channels. Copy the new EPG file
mcepg1-1-0.db. It should contain basic information about your tuners, but no EPG data.
You can examine the databases using
mcupdate.exe. I create shortcuts with these commands to open the EPG files.
%windir%\ehome\mcupdate.exe -v c:\hack\mcepg1-1-0-copy1.db (the empty EPG)
%windir%\ehome\mcupdate.exe -v c:\hack\mcepg1-1-0-copy2.db (the ATSC only EPG)
Microsoft uses the command line program,
loadmxf.exe, to load an XML file into the EPG database. You have to open a cmd window to use it.
LoadMXF [-s storename] [-v] [-i input Filename]
Where:
-s storeFilename - the filename of the EPG database. If not specified, the default store will be used.
-v verbose. Show progress during the load
-i inputFilename the filename of the MXF file to load
After some experimentation, I've been able to load this MXF file. But I cannot link the MergedChannels with the MergedLineup. With a little help, I'm sure I can make this work.
Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<MXF version="1.0" xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<!--
2009/03/23
Removed primaryProvider field to prevent an object reference error
Tried unsuccessfully primaryProvider = !MergedLineup!Canadian ATSC
2009/04/02
Added Type LineupMergeRule to mcepg and mcstore assemblies to enable entry to be inserted
Added id=lmr1 to associate entry with lineupMergeField in MergedLineup
Lineup:primaryProvider = "ml1" ID of MergedLineup for default lineup ATSC-US and for Broadband
Lineup:secondaryProvider = "ml1" ID of MergedLineup for default Scanned Digital channel ATSC
Unable to replicate secondaryProvider.
NOTE MergedLinup:primaryLineups = Lineup:primaryProvider when field has ID of the MergedLineup
NOTE MergedLinup:secondaryLineups = Lineup:secondaryProvider when field has ID of the MergedLineup
FavoriteLineup appears to be auto-generated. Try removing entry
NOTE Cannot replicate database loading TC2 or loading TC2 into MCEPG. Why?
2009/04/03
Load TC2 into MCEPG
FavoriteLineup does not get generated? Why?
Cannot link MergedLineup:secondaryLineups to Lineup:secondaryProvider
Added scannedLineups an wmisLineups to Device
Added scannedDevices to Lineup name="Home Baked EPG"
Cannot add ScanDeviceConfig
2009/04/04
Comparing TC2 with MCEPG2
Added MergedLineup:state=2
Removed MergedLineup:primaryLineup
reload TC2 into MCEPG1
2009/04/05
This is not causing Object Reference error referencingPrimaryChannels="!MergedChannel!KVOS-DT"
Added type FavoriteLineup and defined them befoe referencing them in Lineup and MergedLineup
MUST define types before referencing them. Explains why I need to sometimes load a file twice before links etablished
Added type ScanDeviceConfig and moved Devices AFTER DeviceType, DeviceGroups and ScanDeviceConfig
Should Devices be nested?
2009/04/07
Added type DeviceType and was able to update entry already in mcepg1
Moved DeviceGroup after Devices and added link to DeviceGroup:devices, and changed isEnabled=true.
2009/0/08
ContentRecorder instanceId value is from registry entry [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Video\Tuners]
see tuners.reg file.
replace ampersand character (&) with XML entity &
-->
<Assembly name="mcepg" version="6.1.0.0" cultureInfo="" publicKey="0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9">
<NameSpace name="Microsoft.MediaCenter.Guide">
<Type name="Affiliate" />
<Type name="Channel" parentFieldName="lineup" />
<Type name="GuideImage" />
<Type name="Lineup" />
<Type name="Service" />
<Type name="MergedLineup" />
<Type name="MergedChannel" parentFieldName="mergedlineup" />
<Type name="TuningInfo" />
<Type name="ChannelTuningInfo" />
<Type name="DeviceGroup" />
<Type name="ScanDeviceConfig" />
<Type name="Device" />
<Type name="ContentRecorder" />
<Type name="DeviceType" />
<Type name="Region" />
<Type name="LineupMergeRule" />
<Type name="FavoriteLineup" />
</NameSpace>
</Assembly>
<Assembly name="mcstore" version="6.1.0.0" cultureInfo="" publicKey="0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD598ED4DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9">
<NameSpace name="Microsoft.MediaCenter.Store">
<Type name="Attachment" />
<Type name="MergedLineup" />
<Type name="MergedChannel" parentFieldName="mergedlineup" />
<Type name="TuningInfo" />
<Type name="ChannelTuningInfo" />
<Type name="DeviceGroup" />
<Type name="ScanDeviceConfig" />
<Type name="ContentRecorder" />
<Type name="Device" />
<Type name="DeviceType" />
<Type name="Region" />
<Type name="Channel" parentFieldName="lineup" />
<Type name="Lineup" />
<Type name="Service" />
<Type name="Package" />
<Type name="Provider" />
<Type name="UId" parentFieldName="target" />
<Type name="LineupMergeRule" />
<Type name="FavoriteLineup" />
</NameSpace>
</Assembly>
<Providers>
<Provider id="HB" name="Home Baked" displayName="Home Baked Computer Solutions" copyright="Copyright Michael DeAbreu - visit homebakedsolutions.blogspot.com"/>
</Providers>
<With provider="HB">
<FavoriteLineups>
<FavoriteLineup id="fl1" priority="2147483647" isAutoEnabled="1" isAutoGenerated="1" name="Most Viewed" />
<FavoriteLineup id="fl2" priority="2147483647" isAutoEnabled="1" isAutoGenerated="1" name="Most Viewed" />
</FavoriteLineups>
<ChannelTuningInfos>
<ChannelTuningInfo id="cti1" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="12" modulation="0" physicalNumber="35" serializationFormat="1" signalQuality="83" subNumber="1" tuneRequestHash="6122305190831188328" />
<ChannelTuningInfo id="cti2" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="24" modulation="0" physicalNumber="19" serializationFormat="1" signalQuality="81" subNumber="1" tuneRequestHash="8177779702397388314" />
<ChannelTuningInfo id="cti3" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="2" modulation="0" physicalNumber="58" serializationFormat="1" signalQuality="89" subNumber="1" tuneRequestHash="1398354354822166646" />
<ChannelTuningInfo id="cti4" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="32" modulation="0" physicalNumber="33" serializationFormat="1" signalQuality="89" subNumber="1" tuneRequestHash="5383266711928631595" />
<ChannelTuningInfo id="cti5" countryCode="US" frequency="0" isSubscribed="1" logicalNumber="8" modulation="0" physicalNumber="22" serializationFormat="1" signalQuality="88" subNumber="1" tuneRequestHash="117711887397597135" />
</ChannelTuningInfos>
<LineupMergeRules>
<LineupMergeRule id="lmr1" keepAllPrimary="0" keepAllSecondary="1" mergeType="1" />
</LineupMergeRules>
<MergedLineups>
<MergedLineup id="ml1" deviceGroups="!DeviceGroup!all" favoriteLineups="fl2" uid="!MergedLineup!Canadian ATSC" lineupMergeRule="lmr1" name="(Broadband, USA/DefaultLineup:ATSC-US)+(Scanned (Digital Antenna (ATSC)))" state="2" >
</MergedLineup>
</MergedLineups>
<ScanDeviceConfigs>
<ScanDeviceConfig id="sdc1" locatorMaxMins="10" locatorMinSecs="15" periodicScanIntervalSeconds="2147483647" scheduleExitFactor="85" userRunScanSetting="8" />
</ScanDeviceConfigs>
<DeviceTypes>
<DeviceType uid="!DeviceType!ATSC" displayName="Digital Antenna (ATSC)" headendType="ATSC" isSetTopBox="0" name="ATSC" networkType="0dad2fdd-5fd7-11d3-8f50-00c04f7971e2" sqmid="128" tuningSpaceName="ATSC" viewPriority="900" />
</DeviceTypes>
<ContentRecorders>
<ContentRecorder id="cr1" uid="!ContentRecorder!PCI\VEN_1745&DEV_2100&SUBSYS_48B81043&REV_00\4&247B58F0&0&00580" instanceId="PCI\VEN_1745&DEV_2100&SUBSYS_48B81043&REV_00\4&247B58F0&0&00580" lastKnownTuneRequestHash="-3767322195512165671" />
</ContentRecorders>
<Devices>
<Device uid="!Device!ViXS PureTV ATSC/DVBC Tuner" contentRecorder="cr1" countryCode="US" deviceType="!DeviceType!ATSC" name="ViXS PureTV ATSC/DVBC Tuner" preferredOrder="900" recorderId="674743b2-44fa-4620-b102-2308ce6ff3ef" scanDeviceConfig="sdc1" scannedLineup="l1" wmisLineups="l2" />
</Devices>
<DeviceGroups>
<DeviceGroup id="dg1" uid="!DeviceGroup!all" devices="!Device!ViXS PureTV ATSC/DVBC Tuner" isEnabled="1" lineup="!MergedLineup!Canadian ATSC" name="All" rank="0" />
</DeviceGroups>
<Affiliates>
<Affiliate description="" logoImage="" name="KVOS-DT" uid="!Affiliate!KVOS-DT" />
<Affiliate description="" logoImage="" name="KBCB-DT" uid="!Affiliate!KBCB-DT" />
<Affiliate description="" logoImage="" name="CBUT-DT" uid="!Affiliate!CBUT-DT" />
<Affiliate description="" logoImage="" name="CIVT-DT" uid="!Affiliate!CIVT-DT" />
<Affiliate description="" logoImage="" name="CHAN-DT" uid="!Affiliate!CHAN-DT" />
</Affiliates>
<Services>
<Service id="s1" uid="!Service!KVOS-DT" name="KVOS-DT" callSign="KVOS-DT" logoImage="" affiliate="!Affiliate!KVOS-DT" />
<Service id="s2" uid="!Service!KBCB-DT" name="KBCB-DT" callSign="KBCB-DT" logoImage="" affiliate="!Affiliate!KBCB-DT" />
<Service id="s3" uid="!Service!CBUT-DT" name="CBUT-DT" callSign="CBUT-DT" logoImage="" affiliate="!Affiliate!CBUT-DT" />
<Service id="s4" uid="!Service!CIVT-DT" name="CIVT-DT" callSign="CIVT-DT" logoImage="" affiliate="!Affiliate!CIVT-DT" />
<Service id="s5" uid="!Service!CHAN-DT" name="CHAN-DT" callSign="CHAN-DT" logoImage="" affiliate="!Affiliate!CHAN-DT" />
</Services>
<Lineups>
<Lineup name="Home Baked EPG" id="l1" favoriteLineups="fl1" secondaryProvider="ml1" uid="!Lineup!Home Baked EPG" >
<channels>
<Channel lineup="l1" service="s1" tuningInfos ="cti1" uid="!Channel!KVOS-DT" channelNumberPriority="2" channelType="1" matchName="OC:12:1" matchNameCount="1" normalizedMatchName="|oc:12:1|" number="12" oneToucheNumber="-1" originalNumber="12" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<Channel lineup="l1" service="s2" tuningInfos ="cti2" uid="!Channel!KBCB-DT" channelNumberPriority="2" channelType="1" matchName="OC:24:1" matchNameCount="1" normalizedMatchName="|oc:24:1|" number="24" oneToucheNumber="-1" originalNumber="24" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<Channel lineup="l1" service="s3" tuningInfos ="cti3" uid="!Channel!CBUT-DT" channelNumberPriority="2" channelType="1" matchName="OC:2:1" matchNameCount="1" normalizedMatchName="|oc:2:1|" number="2" oneToucheNumber="-1" originalNumber="2" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<Channel lineup="l1" service="s4" tuningInfos ="cti4" uid="!Channel!CIVT-DT" channelNumberPriority="2" channelType="1" matchName="OC:32:1" matchNameCount="1" normalizedMatchName="|oc:32:1|" number="32" oneToucheNumber="-1" originalNumber="32" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<Channel lineup="l1" service="s5" tuningInfos ="cti5" uid="!Channel!CHAN-DT" channelNumberPriority="2" channelType="1" matchName="OC:8:1" matchNameCount="1" normalizedMatchName="|oc:8:1|" number="8" oneToucheNumber="-1" originalNumber="8" originalSubNumber="1" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
</channels>
</Lineup>
<Lineup name="DefaultLineup:ATSC-US" id="l2" primaryProvider="ml1" uid="!Lineup!DefaultLineup:ATSC-US" />
<Lineup name="Broadband" id="l3" primaryProvider="ml1" uid="!Lineup!Broadband" />
</Lineups>
<MergedChannels>
<MergedChannel id="mc1" lineup="!MergedLineup!Canadian ATSC" service="s1" tuningInfos ="cti1" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:12:1" matchNameCount="1" normalizedMatchName="|oc:12:1|" number="12" oneToucheNumber="-1" originalNumber="12" originalSubNumber="1" primaryChannel="!Channel!KVOS-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<MergedChannel id="mc2" lineup="!MergedLineup!Canadian ATSC" service="s2" tuningInfos ="cti2" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:24:1" matchNameCount="1" normalizedMatchName="|oc:24:1|" number="24" oneToucheNumber="-1" originalNumber="24" originalSubNumber="1" primaryChannel="!Channel!KBCB-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<MergedChannel id="mc3" lineup="!MergedLineup!Canadian ATSC" service="s3" tuningInfos ="cti3" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:2:1" matchNameCount="1" normalizedMatchName="|oc:2:1|" number="2" oneToucheNumber="-1" originalNumber="2" originalSubNumber="1" primaryChannel="!Channel!CBUT-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<MergedChannel id="mc4" lineup="!MergedLineup!Canadian ATSC" service="s4" tuningInfos ="cti4" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:32:1" matchNameCount="1" normalizedMatchName="|oc:32:1|" number="32" oneToucheNumber="-1" originalNumber="32" originalSubNumber="1" primaryChannel="!Channel!CIVT-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
<MergedChannel id="mc5" lineup="!MergedLineup!Canadian ATSC" service="s5" tuningInfos ="cti5" channelNumberPriority="2" channelType="1" isBranded="1" isCached="1" matchName="OC:8:1" matchNameCount="1" normalizedMatchName="|oc:8:1|" number="8" oneToucheNumber="-1" originalNumber="8" originalSubNumber="1" primaryChannel="!Channel!CHAN-DT" subNumber="1" userBlockedState="0" visibility="0" watchedDuration="0" />
</MergedChannels>
</With>
</MXF>